mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-13 07:14:04 +02:00
keep line length under 100
This commit is contained in:
parent
beece5c06f
commit
461efb5fed
1 changed files with 4 additions and 6 deletions
|
|
@ -1137,12 +1137,10 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
listener = self.turn_on_off_listener
|
||||
last_service_data = listener.last_service_data.get(light)
|
||||
ignore_fields = {ATTR_TRANSITION}
|
||||
if (
|
||||
not force
|
||||
and last_service_data
|
||||
and {k for k, _ in last_service_data.items() ^ service_data.items()}
|
||||
== ignore_fields
|
||||
):
|
||||
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:
|
||||
_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