mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Improve type hints in lw12wifi light (#77656)
This commit is contained in:
parent
759f12bcda
commit
5632e33426
@ -116,7 +116,7 @@ class LW12WiFi(LightEntity):
|
||||
"""Return True if unable to access real state of the entity."""
|
||||
return True
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
def turn_on(self, **kwargs: Any) -> None:
|
||||
"""Instruct the light to turn on."""
|
||||
self._light.light_on()
|
||||
if ATTR_HS_COLOR in kwargs:
|
||||
@ -124,7 +124,7 @@ class LW12WiFi(LightEntity):
|
||||
self._light.set_color(*self._rgb_color)
|
||||
self._effect = None
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
self._brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||
self._brightness = kwargs[ATTR_BRIGHTNESS]
|
||||
brightness = int(self._brightness / 255 * 100)
|
||||
self._light.set_light_option(lw12.LW12_LIGHT.BRIGHTNESS, brightness)
|
||||
if ATTR_EFFECT in kwargs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user