From 3123d6ad87f2d4a0011215f9bb945327f853501c Mon Sep 17 00:00:00 2001 From: Rich O Date: Wed, 27 Nov 2019 15:39:18 -0500 Subject: [PATCH] fixing data --- r0b3bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r0b3bot.py b/r0b3bot.py index eae213e..ae4177b 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -292,7 +292,7 @@ async def printstat(ctx): # REST API call to home assistant to turn the light off. #remote.call_service(hassapi, 'switch', 'turn_on', {'entity_id':'{}'.format(HASS_LIGHT)}) hassAPIURL = HASS_IP_ADDRESS + "/api/services/switch/turn_off" - payload = f'service_data={{"entity_id": "{HASS_LIGHT}"}}' + payload = f'{{"entity_id": "{HASS_LIGHT}"}}' response = requests.post(hassAPIURL, headers=hassHEADERS, data=payload) except: -- 2.39.5