From 058e9a83d16e01ed86e4d59b596a157a3bb46aa4 Mon Sep 17 00:00:00 2001 From: Rich O Date: Wed, 27 Nov 2019 15:13:00 -0500 Subject: [PATCH] adding response output to console --- r0b3bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r0b3bot.py b/r0b3bot.py index 69716a7..13b04dc 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -266,7 +266,8 @@ async def printstat(ctx): hassAPIRUL = HASS_IP_ADDRESS + "/api/services/switch/turn_on" payload = f'service_data={{"entity_id": "{HASS_LIGHT}"}}' print(f" - Payload String: {payload}") - requests.post(hassAPIURL, data=payload, headers=hassHEADERS) + response = requests.post(hassAPIURL, data=payload, headers=hassHEADERS) + print(f" - POST Response: {response.text}") except: # Do nothing if this fails print(" ! Unable to turn on light") -- 2.39.5