Skip to content

Commit

Permalink
More explicit warning for unsupported properties
Browse files Browse the repository at this point in the history
  • Loading branch information
deiger authored Apr 22, 2020
1 parent 7faec95 commit 761f773
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hisense.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@ def property_update_handler(self, path: str, query: dict, data: dict) -> None:
return # Old update
_data.updates_seq_no = update['seq_no']
try:
if not update['data']:
logging.warning('No value returned for seq_no %d, likely an unsupported property key.',
update['seq_no'])
return
name = update['data']['name']
data_type = _data.properties.get_type(name)
value = data_type(update['data']['value'])
Expand Down

0 comments on commit 761f773

Please sign in to comment.