Skip to content

Commit

Permalink
Merge pull request #73 from Robbe-B/Disconnected_Stove
Browse files Browse the repository at this point in the history
Avoid adding a stove without a valid serial number
  • Loading branch information
Robbe-B authored Oct 20, 2023
2 parents 13893ee + 21056fc commit 86839ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/maestro_mcz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ 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()
stoveList.append(coordinator)
if(coordinator.maestroapi.Status.sm_sn): #avoid adding a disconnected stove without serial number
stoveList.append(coordinator)

hass.data[DOMAIN][entry.entry_id] = stoveList

Expand Down

0 comments on commit 86839ac

Please sign in to comment.