fix updater

This commit is contained in:
Andrey
2020-12-29 08:51:43 +03:00
parent 7822f50500
commit a6ff177577
4 changed files with 46 additions and 47 deletions

View File

@@ -107,6 +107,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
CONF_KEY: key,
})
devices.append(sensor)
hub.sensors.append(sensor)
async_add_devices(devices)
@@ -135,11 +136,6 @@ class Mega1WSensor(BaseMegaEntity):
self._device_class = device_class
self._unit_of_measurement = unit_of_measurement
async def async_added_to_hass(self) -> None:
await super(Mega1WSensor, self).async_added_to_hass()
self.mega.sensors.append(self)
@property
def unit_of_measurement(self):
return self._unit_of_measurement