Skip to content

Commit

Permalink
Fix wrong check in genericmiot for writable properties (#1758)
Browse files Browse the repository at this point in the history
Fixes regression to make `miiocli genericmiot set` work again.
  • Loading branch information
rytilahti committed Mar 7, 2023
1 parent 79a3617 commit 73c61ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/integrations/genericmiot/genericmiot.py
Expand Up @@ -188,7 +188,7 @@ def change_setting(self, name: str, params=None):
setting = self._properties.get(name, None)
if setting is None:
raise ValueError("No property found for name %s" % name)
if setting.access ^ AccessFlags.Write:
if setting.access & AccessFlags.Write == 0:
raise ValueError("Property %s is not writable" % name)

return setting.setter(value=params)
Expand Down

0 comments on commit 73c61ff

Please sign in to comment.