From 355f88bf8f8160206153e25aa1931759a3a17f26 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 20 Sep 2020 22:53:24 +0200 Subject: [PATCH] add comment --- custom_components/adaptive_lighting/switch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 5a25bec8..f5258661 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -173,6 +173,8 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): if attr is not None and attr != "none": setattr(self, name, validate(attr)) elif attr == "none": + # FIX: Can't use `None` in OptionsFlow. For reasons I do + # not understand, I cannot save an option that is empty. setattr(self, name, None) # Initialize attributes that will be set in self._update_attrs