Skip to content

Commit

Permalink
Fix Cooker Normal5: get_prop only works if "all" properties are reque…
Browse files Browse the repository at this point in the history
…sted (Closes: #380) (#389)
  • Loading branch information
syssi authored Oct 8, 2018
1 parent 8569e75 commit 8eb7097
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion miio/cooker.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,13 @@ def status(self) -> CookerStatus:
"""Retrieve properties."""
properties = ['func', 'menu', 'stage', 'temp', 't_func', 't_precook',
't_cook', 'setting', 'delay', 'version', 'favorite', 'custom']
values = self.send("get_prop", properties)

"""
Some cookers doesn't support a list of properties here. Therefore "all" properties
are requested. If the property count or order changes the property list above must
be updated.
"""
values = self.send("get_prop", ['all'])

properties_count = len(properties)
values_count = len(values)
Expand Down

0 comments on commit 8eb7097

Please sign in to comment.