Upgrade pyhaversion to 3.1.0 (#26232)

This commit is contained in:
Fabian Affolter 2019-09-03 10:17:03 +02:00 committed by Pascal Vizeli
parent 0cffd61481
commit 245450a402
3 changed files with 12 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"name": "Version",
"documentation": "https://www.home-assistant.io/components/version",
"requirements": [
"pyhaversion==3.0.2"
"pyhaversion==3.1.0"
],
"dependencies": [],
"codeowners": [

View File

@ -28,7 +28,7 @@ ALL_IMAGES = [
"odroid-c2",
"odroid-xu",
]
ALL_SOURCES = ["local", "pypi", "hassio", "docker"]
ALL_SOURCES = ["local", "pypi", "hassio", "docker", "haio"]
CONF_BETA = "beta"
CONF_IMAGE = "image"
@ -54,7 +54,13 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Version sensor platform."""
from pyhaversion import LocalVersion, DockerVersion, HassioVersion, PyPiVersion
from pyhaversion import (
LocalVersion,
DockerVersion,
HassioVersion,
PyPiVersion,
HaIoVersion,
)
beta = config.get(CONF_BETA)
image = config.get(CONF_IMAGE)
@ -74,6 +80,8 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
haversion = VersionData(HassioVersion(hass.loop, session, branch, image))
elif source == "docker":
haversion = VersionData(DockerVersion(hass.loop, session, branch, image))
elif source == "haio":
haversion = VersionData(HaIoVersion(hass.loop, session))
else:
haversion = VersionData(LocalVersion(hass.loop, session))

View File

@ -1193,7 +1193,7 @@ pygtfs==0.1.5
pygtt==1.1.2
# homeassistant.components.version
pyhaversion==3.0.2
pyhaversion==3.1.0
# homeassistant.components.heos
pyheos==0.6.0