Adjust inheritance in rflink lights (#69541)
* Add color-more to RflinkLight * Adjust inheritance
This commit is contained in:
parent
54bb86d198
commit
4fe6b0c140
1 changed files with 5 additions and 5 deletions
|
@ -174,6 +174,9 @@ async def async_setup_platform(
|
|||
class RflinkLight(SwitchableRflinkDevice, LightEntity):
|
||||
"""Representation of a Rflink light."""
|
||||
|
||||
_attr_color_mode = COLOR_MODE_ONOFF
|
||||
_attr_supported_color_modes = {COLOR_MODE_ONOFF}
|
||||
|
||||
|
||||
class DimmableRflinkLight(SwitchableRflinkDevice, LightEntity):
|
||||
"""Rflink light device that support dimming."""
|
||||
|
@ -225,7 +228,7 @@ class DimmableRflinkLight(SwitchableRflinkDevice, LightEntity):
|
|||
return self._brightness
|
||||
|
||||
|
||||
class HybridRflinkLight(DimmableRflinkLight, LightEntity):
|
||||
class HybridRflinkLight(DimmableRflinkLight):
|
||||
"""Rflink light device that sends out both dim and on/off commands.
|
||||
|
||||
Used for protocols which support lights that are not exclusively on/off
|
||||
|
@ -249,7 +252,7 @@ class HybridRflinkLight(DimmableRflinkLight, LightEntity):
|
|||
await self._async_handle_command("turn_on")
|
||||
|
||||
|
||||
class ToggleRflinkLight(SwitchableRflinkDevice, LightEntity):
|
||||
class ToggleRflinkLight(RflinkLight):
|
||||
"""Rflink light device which sends out only 'on' commands.
|
||||
|
||||
Some switches like for example Livolo light switches use the
|
||||
|
@ -258,9 +261,6 @@ class ToggleRflinkLight(SwitchableRflinkDevice, LightEntity):
|
|||
and if the light is off and 'on' gets sent, the light will turn on.
|
||||
"""
|
||||
|
||||
_attr_color_mode = COLOR_MODE_ONOFF
|
||||
_attr_supported_color_modes = {COLOR_MODE_ONOFF}
|
||||
|
||||
def _handle_event(self, event):
|
||||
"""Adjust state if Rflink picks up a remote command for this device."""
|
||||
self.cancel_queued_send_commands()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue