Skip to content

Commit

Permalink
Fix Xiaomi Rice Cooker Normal5: get_prop only works if "all" properti…
Browse files Browse the repository at this point in the history
…es are requested (Closes: rytilahti#380)
  • Loading branch information
syssi committed Oct 8, 2018
1 parent e3da229 commit b9c0b81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion miio/cooker.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,10 @@ 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 b9c0b81

Please sign in to comment.