Initil after Upgrade

This commit is contained in:
2026-06-15 10:53:52 -04:00
parent 2fe9bf0dd6
commit 887feaa50a
143 changed files with 2288 additions and 881 deletions
@@ -12,7 +12,7 @@ import uuid
import aiohttp
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import __version__ as HA_VERSION # noqa
from homeassistant.const import __version__ as HA_VERSION # noqa: N812
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry
from homeassistant.helpers.aiohttp_client import async_get_clientsession
@@ -123,7 +123,7 @@ class AnalyticsCollector:
counter: Counter[Hashable] = self._data.setdefault(key, Counter()) # type:ignore
counter[value] += 1
def add(self, key: str, value: Any) -> None: # noqa: ANN401
def add(self, key: str, value: object) -> None:
"""Add value to listing"""
if self._already_seen(key) or value is None:
return
@@ -194,7 +194,11 @@ class Analytics:
cutoff = datetime(2000, 1, 1, tzinfo=UTC)
dates = chain(
(e.created_at for e in self.hass.config_entries.async_entries(DOMAIN) if e.created_at > cutoff),
(e.created_at for e in entity_registry.async_get(self.hass).entities.values() if e.domain != DOMAIN and e.created_at > cutoff),
(
e.created_at
for e in entity_registry.async_get(self.hass).entities.values()
if e.domain != DOMAIN and e.created_at > cutoff
),
)
try: