Skip to content

Commit b5b68c5

Browse files
authored
Release 0.16
Release 0.16
2 parents e01b2da + d58e847 commit b5b68c5

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

API.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ See HostControl info command.
8282
"last_version": "",
8383
"features": ["shutdown", "reboot", "update", "network_info", "network_control"],
8484
"hostname": "",
85+
"os": ""
8586
}
8687
```
8788

hassio/api/host.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
from .util import api_process_hostcontrol, api_process, api_validate
77
from ..const import (
8-
ATTR_VERSION, ATTR_LAST_VERSION, ATTR_TYPE, ATTR_HOSTNAME, ATTR_FEATURES)
8+
ATTR_VERSION, ATTR_LAST_VERSION, ATTR_TYPE, ATTR_HOSTNAME, ATTR_FEATURES,
9+
ATTR_OS)
910

1011
_LOGGER = logging.getLogger(__name__)
1112

@@ -32,6 +33,7 @@ async def info(self, request):
3233
ATTR_LAST_VERSION: self.host_control.last,
3334
ATTR_FEATURES: self.host_control.features,
3435
ATTR_HOSTNAME: self.host_control.hostname,
36+
ATTR_OS: self.host_control.os_info,
3537
}
3638

3739
@api_process_hostcontrol

hassio/const.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""Const file for HassIO."""
2-
HASSIO_VERSION = '0.15'
2+
HASSIO_VERSION = '0.16'
33

4-
URL_HASSIO_VERSION = \
5-
'https://raw.githubusercontent.com/pvizeli/hassio/master/version.json'
6-
URL_HASSIO_VERSION_BETA = \
7-
'https://raw.githubusercontent.com/pvizeli/hassio/master/version_beta.json'
4+
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
5+
'hassio/master/version.json')
6+
URL_HASSIO_VERSION_BETA = ('https://raw.githubusercontent.com/home-assistant/'
7+
'hassio/master/version_beta.json')
88

9-
URL_HASSIO_ADDONS = 'https://github.com/pvizeli/hassio-addons'
9+
URL_HASSIO_ADDONS = 'https://github.com/home-assistant/hassio-addons'
1010

1111
DOCKER_REPO = "pvizeli"
1212

@@ -32,6 +32,7 @@
3232
RESULT_OK = 'ok'
3333

3434
ATTR_HOSTNAME = 'hostname'
35+
ATTR_OS = 'os'
3536
ATTR_TYPE = 'type'
3637
ATTR_FEATURES = 'features'
3738
ATTR_ADDONS = 'addons'

hassio/host_control.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .const import (
1111
SOCKET_HC, ATTR_LAST_VERSION, ATTR_VERSION, ATTR_TYPE, ATTR_FEATURES,
12-
ATTR_HOSTNAME)
12+
ATTR_HOSTNAME, ATTR_OS)
1313

1414
_LOGGER = logging.getLogger(__name__)
1515

@@ -35,6 +35,7 @@ def __init__(self, loop):
3535
self.type = UNKNOWN
3636
self.features = []
3737
self.hostname = UNKNOWN
38+
self.os_info = UNKNOWN
3839

3940
mode = os.stat(SOCKET_HC)[stat.ST_MODE]
4041
if stat.S_ISSOCK(mode):
@@ -94,6 +95,7 @@ async def load(self):
9495
self.type = info.get(ATTR_TYPE, UNKNOWN)
9596
self.features = info.get(ATTR_FEATURES, [])
9697
self.hostname = info.get(ATTR_HOSTNAME, UNKNOWN)
98+
self.os_info = info.get(ATTR_OS, UNKNOWN)
9799

98100
def reboot(self):
99101
"""Reboot the host system.

0 commit comments

Comments
 (0)