mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Get supervisor client in analytics only on systems with supervisor (#126375)
fix supervisor dependency
This commit is contained in:
parent
c07db352f3
commit
91c1e75c00
@ -177,7 +177,6 @@ class Analytics:
|
|||||||
hass = self.hass
|
hass = self.hass
|
||||||
supervisor_info = None
|
supervisor_info = None
|
||||||
operating_system_info: dict[str, Any] = {}
|
operating_system_info: dict[str, Any] = {}
|
||||||
supervisor_client = hassio.get_supervisor_client(hass)
|
|
||||||
|
|
||||||
if not self.onboarded or not self.preferences.get(ATTR_BASE, False):
|
if not self.onboarded or not self.preferences.get(ATTR_BASE, False):
|
||||||
LOGGER.debug("Nothing to submit")
|
LOGGER.debug("Nothing to submit")
|
||||||
@ -262,6 +261,7 @@ class Analytics:
|
|||||||
integrations.append(integration.domain)
|
integrations.append(integration.domain)
|
||||||
|
|
||||||
if supervisor_info is not None:
|
if supervisor_info is not None:
|
||||||
|
supervisor_client = hassio.get_supervisor_client(hass)
|
||||||
installed_addons = await asyncio.gather(
|
installed_addons = await asyncio.gather(
|
||||||
*(
|
*(
|
||||||
supervisor_client.addons.addon_info(addon[ATTR_SLUG])
|
supervisor_client.addons.addon_info(addon[ATTR_SLUG])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user