From 4fdf42bea142d65c776f08497124ac8eeaf0888e Mon Sep 17 00:00:00 2001 From: Benjamin Auquite Date: Mon, 10 Apr 2023 05:39:05 -0500 Subject: [PATCH] small fixes --- custom_components/adaptive_lighting/const.py | 2 +- custom_components/adaptive_lighting/switch.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/adaptive_lighting/const.py b/custom_components/adaptive_lighting/const.py index 62be1d6e..51e76bbf 100644 --- a/custom_components/adaptive_lighting/const.py +++ b/custom_components/adaptive_lighting/const.py @@ -239,7 +239,7 @@ def int_between(min_int, max_int): VALIDATION_TUPLES = [ (CONF_LIGHTS, DEFAULT_LIGHTS, cv.entity_ids), - (CONF_WATCHED_LIGHTS, DEFAULT_WATCHED_LIGHTS, cv.entity_ids), + (CONF_WATCHED_LIGHTS, DEFAULT_WATCHED_LIGHTS, dict[str]), (CONF_PREFER_RGB_COLOR, DEFAULT_PREFER_RGB_COLOR, bool), (CONF_INCLUDE_CONFIG_IN_ATTRIBUTES, DEFAULT_INCLUDE_CONFIG_IN_ATTRIBUTES, bool), (CONF_INITIAL_TRANSITION, DEFAULT_INITIAL_TRANSITION, VALID_TRANSITION), diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index e2af4f23..af6d5279 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1308,7 +1308,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): all_lights = {k: k for k in lights} all_lights.update(self._watched_lights) - for wlight, mlight in all_lights: + for wlight, mlight in all_lights.items(): if not is_on(self.hass, mlight): continue