Limit Github event subscription if polling is disabled (#78662)
This commit is contained in:
@@ -38,7 +38,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
)
|
||||
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
await coordinator.subscribe()
|
||||
|
||||
if not entry.pref_disable_polling:
|
||||
await coordinator.subscribe()
|
||||
|
||||
hass.data[DOMAIN][repository] = coordinator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user