diff --git a/custom_components/maestro_mcz/__init__.py b/custom_components/maestro_mcz/__init__.py index 3e0ab63..fde4a96 100644 --- a/custom_components/maestro_mcz/__init__.py +++ b/custom_components/maestro_mcz/__init__.py @@ -54,7 +54,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: stove:MaestroStove = stove coordinator = MczCoordinator(hass, stove, pollling_interval) await coordinator.async_config_entry_first_refresh() - if(coordinator.maestroapi.Status.sm_sn): #avoid adding a disconnected stove without serial number + if(coordinator.maestroapi.UniqueCode): #avoid adding a disconnected stove without serial number stoveList.append(coordinator) hass.data[DOMAIN][entry.entry_id] = stoveList @@ -113,7 +113,7 @@ def maestroapi(self) -> MaestroStove: def get_device_info(self) -> DeviceInfo: return DeviceInfo( - identifiers={(DOMAIN, self._maestroapi.Status.sm_sn)}, + identifiers={(DOMAIN, self._maestroapi.UniqueCode)}, name=self._maestroapi.Name, manufacturer=MANUFACTURER, model=self._maestroapi.Model.model_name,