Limit Github event subscription if polling is disabled (#78662)
This commit is contained in:
parent
69c5d910d4
commit
87f8ebceb2
2 changed files with 43 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue