File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
custom_components/cryptostate Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 14
14
SCAN_INTERVAL = timedelta (hours = 3 )
15
15
16
16
_LOGGER : logging .Logger = logging .getLogger (__package__ )
17
-
17
+ PLATFORMS = [ "sensor" ]
18
18
19
19
async def async_setup (hass : HomeAssistant , config : Config ):
20
20
"""Set this integration using YAML is not supported."""
@@ -43,9 +43,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
43
43
44
44
if entry .options .get ("sensor" , True ):
45
45
coordinator .platforms .append ("sensor" )
46
- hass .async_add_job (
47
- hass .config_entries .async_forward_entry_setup (entry , "sensor" )
48
- )
46
+ await hass .config_entries .async_forward_entry_setups (entry , PLATFORMS )
49
47
50
48
entry .async_on_unload (entry .add_update_listener (async_reload_entry ))
51
49
return True
You can’t perform that action at this time.
0 commit comments