mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 23:04:03 +02:00
parent
461efb5fed
commit
0a4c7ed1dd
1 changed files with 6 additions and 4 deletions
|
|
@ -1137,10 +1137,12 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
listener = self.turn_on_off_listener
|
||||
last_service_data = listener.last_service_data.get(light)
|
||||
ignore_fields = {ATTR_TRANSITION}
|
||||
differing_fields = {
|
||||
k for k, _ in last_service_data.items() ^ service_data.items()
|
||||
}
|
||||
if not force and last_service_data and differing_fields == ignore_fields:
|
||||
if (
|
||||
not force
|
||||
and last_service_data
|
||||
and {k for k, _ in last_service_data.items() ^ service_data.items()}
|
||||
== ignore_fields
|
||||
):
|
||||
_LOGGER.debug(
|
||||
"%s: Cancelling adapt to light %s, there's no new values to set (context.id='%s')",
|
||||
self._name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue