Drop @bind_hass use from hassio component (#111522)

* Drop `@bind_hass` use from hassio component

* Add comment why we import locally

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Jan-Philipp Benecke 2024-02-28 00:25:46 +01:00 committed by GitHub
parent 0e329d2572
commit 4e4345f04e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 35 additions and 51 deletions

View file

@ -15,7 +15,9 @@ from homeassistant.components.hassio import (
DOMAIN,
STORAGE_KEY,
async_get_addon_store_info,
get_core_info,
hostname_from_addon_slug,
is_hassio,
)
from homeassistant.components.hassio.const import REQUEST_REFRESH_DELAY
from homeassistant.components.hassio.handler import HassioAPIError
@ -246,8 +248,8 @@ async def test_setup_api_ping(
assert result
assert aioclient_mock.call_count == 19
assert hass.components.hassio.get_core_info()["version_latest"] == "1.0.0"
assert hass.components.hassio.is_hassio()
assert get_core_info(hass)["version_latest"] == "1.0.0"
assert is_hassio(hass)
async def test_setup_api_panel(
@ -465,7 +467,7 @@ async def test_warn_when_cannot_connect(
result = await async_setup_component(hass, "hassio", {})
assert result
assert hass.components.hassio.is_hassio()
assert is_hassio(hass)
assert "Not connected with the supervisor / system too busy!" in caplog.text