Fix zha light bugs (#20825)
This commit is contained in:
parent
542f024356
commit
32f2221b22
2 changed files with 3 additions and 1 deletions
|
@ -69,6 +69,8 @@ def decorate_command(listener, command):
|
|||
"{}: {}".format("with args", args),
|
||||
"{}: {}".format("with kwargs", kwds),
|
||||
"{}: {}".format("and result", result))
|
||||
if isinstance(result, bool):
|
||||
return result
|
||||
return result[1] is Status.SUCCESS
|
||||
except DeliveryError:
|
||||
_LOGGER.debug("%s: command failed: %s", listener.unique_id,
|
||||
|
|
|
@ -113,7 +113,7 @@ class Light(ZhaEntity, light.Light):
|
|||
"""Set the brightness of this light between 0..255."""
|
||||
value = max(0, min(255, value))
|
||||
self._brightness = value
|
||||
self.async_set_state(value)
|
||||
self.async_schedule_update_ha_state()
|
||||
|
||||
@property
|
||||
def hs_color(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue