Merge branch '2-homeassistant-api-connection-is-broken' into 'master'

gah, forgot it's entity_id!!

See merge request Bots/r0b3BOT!21
This commit was merged in pull request #31.
This commit is contained in:
rich committed 2019-11-27 14:43:41 -05:00
commit fdcef375d4
1 file changed
+2 -2
+2 -2
View File
@@ -255,7 +255,7 @@ async def printstat(ctx):
#remote.call_service(hassapi, 'switch', 'turn_on', {'entity_id':'{}'.format(HASS_LIGHT)})
hassAPIRUL = HASS_IP_ADDRESS + "/api/services/switch/turn_on"
payload = {
"entity": f"{HASS_LIGHT}"
"entity_id": f"{HASS_LIGHT}"
}
requests.post(hassAPIURL, data=payload, headers=hassHEADERS)
except:
@@ -289,7 +289,7 @@ async def printstat(ctx):
#remote.call_service(hassapi, 'switch', 'turn_on', {'entity_id':'{}'.format(HASS_LIGHT)})
hassAPIRUL = HASS_IP_ADDRESS + "/api/services/switch/turn_off"
payload = {
"entity": f"{HASS_LIGHT}"
"entity_id": f"{HASS_LIGHT}"
}
requests.post(hassAPIURL, data=payload, headers=hassHEADERS)
except: