mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-15 00:04:05 +02:00
add 'manually_controlled' attribute to switch
This commit is contained in:
parent
6c6fe59e6f
commit
f1c2101148
1 changed files with 6 additions and 1 deletions
|
|
@ -384,7 +384,12 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
"""Return the attributes of the switch."""
|
||||
if not self.is_on:
|
||||
return {key: None for key in self._settings}
|
||||
return self._settings
|
||||
manually_controlled = [
|
||||
light
|
||||
for light in self._lights
|
||||
if self.turn_on_off_listener.manually_controlled.get(light)
|
||||
]
|
||||
return dict(self._settings, manually_controlled=manually_controlled)
|
||||
|
||||
async def async_turn_on( # pylint: disable=arguments-differ
|
||||
self, adapt_lights: bool = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue