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

Commit

Permalink
Ascend json output
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Mar 12, 2020
1 parent f77f0ef commit 2f7cb0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smarthome.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def smarthome_post(self, s):

self._request_id = message.get('requestId')

logger.info("Request " + json.dumps(message, indent=2, sort_keys=False, ensure_ascii=False))
logger.info("Request " + json.dumps(message, indent=2, sort_keys=True, ensure_ascii=False))
response = self.smarthome_process(message, token)

try:
Expand All @@ -615,7 +615,7 @@ def smarthome_post(self, s):
pass
s.send_json(200, json.dumps(response, ensure_ascii=False).encode('utf-8'), True)

logger.info("Response " + json.dumps(response, indent=2, sort_keys=False, ensure_ascii=False))
logger.info("Response " + json.dumps(response, indent=2, sort_keys=True, ensure_ascii=False))

def smarthome(self, s):
s.send_message(500, "not supported")
Expand Down Expand Up @@ -820,7 +820,7 @@ def smarthome_query(self, payload, token):

e = _GoogleEntity(state)
devices[devid] = e.query_serialize()

devices[devid].update({'status':'SUCCESS'})
return {'devices': devices}

def smarthome_exec(self, payload, token):
Expand Down

0 comments on commit 2f7cb0d

Please sign in to comment.