From 0a4c7ed1dd3aa2d411bf6bb3a70fb5aacd6c8240 Mon Sep 17 00:00:00 2001 From: Benjamin Auquite Date: Sun, 9 Apr 2023 23:26:41 -0500 Subject: [PATCH] Revert "keep line length under 100" This reverts commit 461efb5fed6bf42a8d65be41dae761410d3d9dcb. --- custom_components/adaptive_lighting/switch.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 759bc891..75f90361 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -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,