mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix Nanoleaf light turn_off transition (#57305)
This commit is contained in:
parent
c04be4f5d0
commit
4dafd42154
@ -182,8 +182,8 @@ class NanoleafLight(LightEntity):
|
|||||||
|
|
||||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||||
"""Instruct the light to turn off."""
|
"""Instruct the light to turn off."""
|
||||||
transition = kwargs.get(ATTR_TRANSITION)
|
transition: float | None = kwargs.get(ATTR_TRANSITION)
|
||||||
await self._nanoleaf.turn_off(transition)
|
await self._nanoleaf.turn_off(None if transition is None else int(transition))
|
||||||
|
|
||||||
async def async_update(self) -> None:
|
async def async_update(self) -> None:
|
||||||
"""Fetch new state data for this light."""
|
"""Fetch new state data for this light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user