diff --git a/homeassistant/components/mystrom/__init__.py b/homeassistant/components/mystrom/__init__.py index 96bc49ca853..3b033e3338c 100644 --- a/homeassistant/components/mystrom/__init__.py +++ b/homeassistant/components/mystrom/__init__.py @@ -16,7 +16,7 @@ from homeassistant.exceptions import ConfigEntryNotReady from .const import DOMAIN from .models import MyStromData -PLATFORMS_PLUGS = [Platform.SWITCH, Platform.SENSOR] +PLATFORMS_PLUGS = [Platform.SENSOR, Platform.SWITCH] PLATFORMS_BULB = [Platform.LIGHT] _LOGGER = logging.getLogger(__name__) @@ -43,7 +43,6 @@ def _get_mystrom_switch(host: str) -> MyStromSwitch: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Set up myStrom from a config entry.""" host = entry.data[CONF_HOST] - device = None try: info = await pymystrom.get_device_info(host) except MyStromConnectionError as err: diff --git a/homeassistant/components/mystrom/sensor.py b/homeassistant/components/mystrom/sensor.py index 982528bd97c..606a6275acf 100644 --- a/homeassistant/components/mystrom/sensor.py +++ b/homeassistant/components/mystrom/sensor.py @@ -64,7 +64,6 @@ class MyStromSwitchSensor(SensorEntity): """Representation of the consumption or temperature of a myStrom switch/plug.""" entity_description: MyStromSwitchSensorEntityDescription - device: MyStromSwitch _attr_has_entity_name = True