Import hassio (#64561)
* Import hassio * Fix HassioAPIError * Use relative import * Adjust import Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
f622bf4ff2
commit
6f631c542c
7 changed files with 33 additions and 33 deletions
|
@ -7,6 +7,7 @@ import async_timeout
|
|||
from awesomeversion import AwesomeVersion
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import hassio
|
||||
from homeassistant.const import Platform, __version__ as current_version
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import discovery, update_coordinator
|
||||
|
@ -79,8 +80,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
_LOGGER.debug("Fetched version %s: %s", newest, release_notes)
|
||||
|
||||
# Load data from Supervisor
|
||||
if hass.components.hassio.is_hassio():
|
||||
core_info = hass.components.hassio.get_core_info()
|
||||
if hassio.is_hassio(hass):
|
||||
core_info = hassio.get_core_info(hass)
|
||||
newest = core_info["version_latest"]
|
||||
|
||||
# Validate version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue