Address MyStrom late review (#102306)

* Address MyStrom late review

* Address MyStrom late review
This commit is contained in:
Joost Lekkerkerker 2023-10-20 00:08:26 +02:00 committed by GitHub
parent f4e7c5aed3
commit fd435a5416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -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:

View File

@ -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