Remove HacsFrontend (#2338)

This commit is contained in:
Joakim Sørensen
2021-12-12 13:26:05 +01:00
committed by GitHub
parent 3c59987df7
commit 4edcebe677
3 changed files with 4 additions and 17 deletions

View File

@ -87,16 +87,6 @@ class HacsConfiguration:
self.__setattr__(key, data[key])
@dataclass
class HacsFrontend:
"""HacsFrontend."""
version_running: str | None = None
version_available: str | None = None
version_expected: str | None = None
update_pending: bool = False
@dataclass
class HacsCore:
"""HACS Core info."""
@ -223,7 +213,7 @@ class HacsBase:
core = HacsCore()
data: HacsData | None = None
factory: HacsTaskFactory | None = None
frontend = HacsFrontend()
frontend_version: str | None = None
github: GitHub | None = None
githubapi: GitHubAPI | None = None
hass: HomeAssistant | None = None

View File

@ -66,10 +66,7 @@ class Task(HacsTask):
cache_headers=use_cache,
)
self.hacs.frontend.version_running = FE_VERSION
for requirement in self.hacs.integration.requirements:
if "hacs_frontend" in requirement:
self.hacs.frontend.version_expected = requirement.split("==")[-1]
self.hacs.frontend_version = FE_VERSION
# Add to sidepanel if needed
if DOMAIN not in self.hass.data.get("frontend_panels", {}):

View File

@ -96,8 +96,8 @@ async def hacs_config(_hass, connection, msg):
"frontend_compact": hacs.configuration.frontend_compact,
"onboarding_done": hacs.configuration.onboarding_done,
"version": hacs.version,
"frontend_expected": hacs.frontend.version_expected,
"frontend_running": hacs.frontend.version_running,
"frontend_expected": hacs.frontend_version,
"frontend_running": hacs.frontend_version,
"dev": hacs.configuration.dev,
"debug": hacs.configuration.debug,
"country": hacs.configuration.country,