diff --git a/custom_components/ledfxrm/light.py b/custom_components/ledfxrm/light.py index e341f1d..e4690a4 100644 --- a/custom_components/ledfxrm/light.py +++ b/custom_components/ledfxrm/light.py @@ -182,7 +182,7 @@ def friendly_name(self): @property def icon(self): """Return the icon of this light.""" - if self.deviceconfig.has_key("icon_name") + if "icon_name" in self.deviceconfig: if self.deviceconfig["icon_name"].startswith("mdi:"): return self.deviceconfig["icon_name"] else: