Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Update smarthome.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Dec 21, 2022
1 parent 1886b96 commit 9c20bc6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smarthome.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ def notification_post(self, s):
request_id = random_string(20)

message = s.body

if '|' in message: message = message.replace('|', ' ').split()
if '>>' in message: message.remove('>>')
devid = message[0]
Expand Down Expand Up @@ -785,7 +786,7 @@ def notification_post(self, s):
}
}
}
ReportState.call_homegraph_api(REPORT_STATE_BASE_URL, data)
ReportState.call_homegraph_api(REPORT_STATE_BASE_URL, data)
elif aog.domain in DOMAINS['smokedetector']:
data = {
'requestId': str(request_id),
Expand Down Expand Up @@ -1030,11 +1031,11 @@ def smarthome_query(self, payload, token):
"""
response = {}
devices = {}
#getDevices()
getDevices()

for device in payload.get('devices', []):
devid = device['id']
_GoogleEntity(aogDevs.get(devid, None)).async_update()
#_GoogleEntity(aogDevs.get(devid, None)).async_update()
state = aogDevs.get(devid, None)
if not state:
# If we can't find a state, the device is offline
Expand Down

0 comments on commit 9c20bc6

Please sign in to comment.