diff --git a/homeassistant/components/mystrom/light.py b/homeassistant/components/mystrom/light.py index 8c4998fa45e..d32a64dc1e6 100644 --- a/homeassistant/components/mystrom/light.py +++ b/homeassistant/components/mystrom/light.py @@ -83,6 +83,8 @@ async def async_setup_platform( class MyStromLight(LightEntity): """Representation of the myStrom WiFi bulb.""" + _attr_has_entity_name = True + _attr_name = None _attr_color_mode = ColorMode.HS _attr_supported_color_modes = {ColorMode.HS} _attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.FLASH @@ -91,7 +93,6 @@ class MyStromLight(LightEntity): def __init__(self, bulb, name, mac): """Initialize the light.""" self._bulb = bulb - self._attr_name = name self._attr_available = False self._attr_unique_id = mac self._attr_hs_color = 0, 0 diff --git a/homeassistant/components/mystrom/switch.py b/homeassistant/components/mystrom/switch.py index 7180862758c..54c1dc9ad5a 100644 --- a/homeassistant/components/mystrom/switch.py +++ b/homeassistant/components/mystrom/switch.py @@ -70,10 +70,12 @@ async def async_setup_platform( class MyStromSwitch(SwitchEntity): """Representation of a myStrom switch/plug.""" + _attr_has_entity_name = True + _attr_name = None + def __init__(self, plug, name): """Initialize the myStrom switch/plug.""" self.plug = plug - self._attr_name = name self._attr_unique_id = self.plug.mac self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, self.plug.mac)},