mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-09-18 09:29:34 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d685d8539b | ||
![]() |
bb3b8891bc | ||
![]() |
44e4e727cc | ||
![]() |
acc49579f6 | ||
![]() |
48eb1e8958 | ||
![]() |
a5e3f6f0b4 | ||
![]() |
d309524fe7 |
4
.github/workflows/builder.yml
vendored
4
.github/workflows/builder.yml
vendored
@@ -128,7 +128,7 @@ jobs:
|
||||
run: echo "BUILD_ARGS=--test" >> $GITHUB_ENV
|
||||
|
||||
- name: Build supervisor
|
||||
uses: home-assistant/builder@2022.06.1
|
||||
uses: home-assistant/builder@2022.06.2
|
||||
with:
|
||||
args: |
|
||||
$BUILD_ARGS \
|
||||
@@ -213,7 +213,7 @@ jobs:
|
||||
|
||||
- name: Build the Supervisor
|
||||
if: needs.init.outputs.publish != 'true'
|
||||
uses: home-assistant/builder@2022.06.1
|
||||
uses: home-assistant/builder@2022.06.2
|
||||
with:
|
||||
args: |
|
||||
--test \
|
||||
|
@@ -12,4 +12,4 @@ pytest-cov==3.0.0
|
||||
pytest-timeout==2.1.0
|
||||
pytest==7.1.2
|
||||
pyupgrade==2.34.0
|
||||
time-machine==2.7.0
|
||||
time-machine==2.7.1
|
||||
|
@@ -52,7 +52,6 @@ from ..const import (
|
||||
ATTR_INGRESS_PANEL,
|
||||
ATTR_INGRESS_PORT,
|
||||
ATTR_INGRESS_URL,
|
||||
ATTR_INSTALLED,
|
||||
ATTR_IP_ADDRESS,
|
||||
ATTR_KERNEL_MODULES,
|
||||
ATTR_LOGO,
|
||||
@@ -158,10 +157,10 @@ class APIAddons(CoreSysAttributes):
|
||||
ATTR_VERSION: addon.version,
|
||||
ATTR_VERSION_LATEST: addon.latest_version,
|
||||
ATTR_UPDATE_AVAILABLE: addon.need_update,
|
||||
ATTR_INSTALLED: addon.is_installed,
|
||||
ATTR_AVAILABLE: addon.available,
|
||||
ATTR_DETACHED: addon.is_detached,
|
||||
ATTR_HOMEASSISTANT: addon.homeassistant_version,
|
||||
ATTR_STATE: addon.state,
|
||||
ATTR_REPOSITORY: addon.repository,
|
||||
ATTR_BUILD: addon.need_build,
|
||||
ATTR_URL: addon.url,
|
||||
|
@@ -103,6 +103,12 @@ class APIStore(CoreSysAttributes):
|
||||
) -> dict[str, Any]:
|
||||
"""Generate addon information."""
|
||||
|
||||
installed = (
|
||||
self.sys_addons.get(addon.slug, local_only=True)
|
||||
if addon.is_installed
|
||||
else None
|
||||
)
|
||||
|
||||
data = {
|
||||
ATTR_ADVANCED: addon.advanced,
|
||||
ATTR_ARCH: addon.supported_arch,
|
||||
@@ -118,10 +124,12 @@ class APIStore(CoreSysAttributes):
|
||||
ATTR_REPOSITORY: addon.repository,
|
||||
ATTR_SLUG: addon.slug,
|
||||
ATTR_STAGE: addon.stage,
|
||||
ATTR_UPDATE_AVAILABLE: addon.need_update if addon.is_installed else False,
|
||||
ATTR_UPDATE_AVAILABLE: installed.need_update
|
||||
if addon.is_installed
|
||||
else False,
|
||||
ATTR_URL: addon.url,
|
||||
ATTR_VERSION_LATEST: addon.latest_version,
|
||||
ATTR_VERSION: addon.version if addon.is_installed else None,
|
||||
ATTR_VERSION: installed.version if addon.is_installed else None,
|
||||
}
|
||||
if extended:
|
||||
data.update(
|
||||
|
@@ -21,7 +21,7 @@ class AddonStore(AddonModel):
|
||||
@property
|
||||
def is_installed(self) -> bool:
|
||||
"""Return True if an add-on is installed."""
|
||||
return False
|
||||
return self.sys_addons.get(self.slug, local_only=True) is not None
|
||||
|
||||
@property
|
||||
def is_detached(self) -> bool:
|
||||
|
@@ -248,7 +248,7 @@ class Supervisor(CoreSysAttributes):
|
||||
timeout = aiohttp.ClientTimeout(total=10)
|
||||
try:
|
||||
await self.sys_websession.head(
|
||||
"https://version.home-assistant.io/online.txt", timeout=timeout
|
||||
"https://checkonline.home-assistant.io/online.txt", timeout=timeout
|
||||
)
|
||||
except (ClientError, asyncio.TimeoutError):
|
||||
self.connectivity = False
|
||||
|
Reference in New Issue
Block a user