Add supervisor key to homassistant_alerts (#82862)

This commit is contained in:
Joakim Sørensen
2022-11-29 19:22:36 +01:00
committed by GitHub
parent 4ab6f97341
commit 10e7d6e04d
6 changed files with 63 additions and 8 deletions

View File

@@ -113,8 +113,10 @@ class Analytics:
if stored:
self._data = stored
if self.supervisor:
supervisor_info = hassio.get_supervisor_info(self.hass)
if (
self.supervisor
and (supervisor_info := hassio.get_supervisor_info(self.hass)) is not None
):
if not self.onboarded:
# User have not configured analytics, get this setting from the supervisor
if supervisor_info[ATTR_DIAGNOSTICS] and not self.preferences.get(