mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix zha light bugs (#20825)
This commit is contained in:
parent
542f024356
commit
32f2221b22
@ -69,6 +69,8 @@ def decorate_command(listener, command):
|
|||||||
"{}: {}".format("with args", args),
|
"{}: {}".format("with args", args),
|
||||||
"{}: {}".format("with kwargs", kwds),
|
"{}: {}".format("with kwargs", kwds),
|
||||||
"{}: {}".format("and result", result))
|
"{}: {}".format("and result", result))
|
||||||
|
if isinstance(result, bool):
|
||||||
|
return result
|
||||||
return result[1] is Status.SUCCESS
|
return result[1] is Status.SUCCESS
|
||||||
except DeliveryError:
|
except DeliveryError:
|
||||||
_LOGGER.debug("%s: command failed: %s", listener.unique_id,
|
_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."""
|
"""Set the brightness of this light between 0..255."""
|
||||||
value = max(0, min(255, value))
|
value = max(0, min(255, value))
|
||||||
self._brightness = value
|
self._brightness = value
|
||||||
self.async_set_state(value)
|
self.async_schedule_update_ha_state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hs_color(self):
|
def hs_color(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user