mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-09-18 17:39:39 +00:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a5cc3cba63 | ||
![]() |
9266062709 | ||
![]() |
bacedd1622 | ||
![]() |
7227f022b1 | ||
![]() |
0ce91f2e25 | ||
![]() |
fdb195cf59 | ||
![]() |
b85936774a | ||
![]() |
bd106be026 | ||
![]() |
e588541fe3 | ||
![]() |
d685d8539b | ||
![]() |
bb3b8891bc | ||
![]() |
44e4e727cc | ||
![]() |
acc49579f6 | ||
![]() |
48eb1e8958 | ||
![]() |
a5e3f6f0b4 | ||
![]() |
d309524fe7 |
6
.github/workflows/builder.yml
vendored
6
.github/workflows/builder.yml
vendored
@@ -91,7 +91,7 @@ jobs:
|
||||
|
||||
- name: Build wheels
|
||||
if: needs.init.outputs.requirements == 'true'
|
||||
uses: home-assistant/wheels@master
|
||||
uses: home-assistant/wheels@2022.01.2
|
||||
with:
|
||||
tag: ${{ env.WHEELS_TAG }}
|
||||
arch: ${{ matrix.arch }}
|
||||
@@ -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 \
|
||||
|
@@ -1,6 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.3.0
|
||||
rev: 22.6.0
|
||||
hooks:
|
||||
- id: black
|
||||
args:
|
||||
|
2
pytest.ini
Normal file
2
pytest.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[pytest]
|
||||
asyncio_mode = auto
|
@@ -3,13 +3,13 @@ aiohttp==3.8.1
|
||||
async_timeout==4.0.2
|
||||
atomicwrites==1.4.0
|
||||
attrs==21.4.0
|
||||
awesomeversion==22.5.2
|
||||
awesomeversion==22.6.0
|
||||
brotli==1.0.9
|
||||
cchardet==2.1.7
|
||||
ciso8601==2.2.0
|
||||
colorlog==6.6.0
|
||||
cpe==1.2.1
|
||||
cryptography==36.0.2
|
||||
cryptography==37.0.4
|
||||
debugpy==1.6.0
|
||||
deepmerge==1.0.1
|
||||
dirhash==0.2.1
|
||||
@@ -20,6 +20,6 @@ pulsectl==22.3.2
|
||||
pyudev==0.23.2
|
||||
ruamel.yaml==0.17.17
|
||||
securetar==2022.2.0
|
||||
sentry-sdk==1.5.12
|
||||
sentry-sdk==1.6.0
|
||||
voluptuous==0.13.1
|
||||
dbus-next==0.2.3
|
||||
|
@@ -1,15 +1,15 @@
|
||||
black==22.3.0
|
||||
black==22.6.0
|
||||
codecov==2.1.12
|
||||
coverage==6.4.1
|
||||
flake8-docstrings==1.6.0
|
||||
flake8==4.0.1
|
||||
pre-commit==2.19.0
|
||||
pydocstyle==6.1.1
|
||||
pylint==2.14.3
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16)
|
||||
pylint==2.14.4
|
||||
pytest-aiohttp==1.0.4
|
||||
pytest-asyncio==0.18.3
|
||||
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(
|
||||
|
@@ -56,10 +56,10 @@ class DockerInfo:
|
||||
def new(data: dict[str, Any]):
|
||||
"""Create a object from docker info."""
|
||||
return DockerInfo(
|
||||
AwesomeVersion(data["ServerVersion"]),
|
||||
data["Driver"],
|
||||
data["LoggingDriver"],
|
||||
data["CgroupVersion"],
|
||||
AwesomeVersion(data.get("ServerVersion", "0.0.0")),
|
||||
data.get("Driver", "unknown"),
|
||||
data.get("LoggingDriver", "unknown"),
|
||||
data.get("CgroupVersion", "1"),
|
||||
)
|
||||
|
||||
@property
|
||||
|
@@ -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