From b9ca03be9cba2df303ca166a2d222077a14ecf86 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 31 Aug 2020 00:40:53 +0200 Subject: [PATCH] simplify self._entity_id --- custom_components/circadian_lighting/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/circadian_lighting/switch.py b/custom_components/circadian_lighting/switch.py index 93dd4457..256289c3 100644 --- a/custom_components/circadian_lighting/switch.py +++ b/custom_components/circadian_lighting/switch.py @@ -163,7 +163,7 @@ class CircadianSwitch(SwitchEntity, RestoreEntity): self.hass = hass self._circadian_lighting = circadian_lighting self._name = name - self._entity_id = "switch." + slugify(f"circadian_lighting {name}") + self._entity_id = f"switch.circadian_lighting_{slugify(name)}" self._state = None self._icon = ICON self._hs_color = None