File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
homeassistant/components/ohme Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1010from ohme import ApiException , OhmeApiClient
1111
1212from homeassistant .config_entries import ConfigEntry
13- from homeassistant .core import HomeAssistant
13+ from homeassistant .core import HomeAssistant , callback
1414from homeassistant .helpers .update_coordinator import DataUpdateCoordinator , UpdateFailed
1515
1616from .const import DOMAIN
@@ -83,6 +83,21 @@ class OhmeAdvancedSettingsCoordinator(OhmeBaseCoordinator):
8383
8484 coordinator_name = "Advanced Settings"
8585
86+ def __init__ (
87+ self , hass : HomeAssistant , config_entry : OhmeConfigEntry , client : OhmeApiClient
88+ ) -> None :
89+ """Initialise coordinator."""
90+ super ().__init__ (hass , config_entry , client )
91+
92+ @callback
93+ def _dummy_listener () -> None :
94+ pass
95+
96+ # This coordinator is used by the API library to determine whether the
97+ # charger is online and available. It is therefore required even if no
98+ # entities are using it.
99+ self .async_add_listener (_dummy_listener )
100+
86101 async def _internal_update_data (self ) -> None :
87102 """Fetch data from API endpoint."""
88103 await self .client .async_get_advanced_settings ()
You can’t perform that action at this time.
0 commit comments