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