Skip to content

Commit

Permalink
Release 0.16
Browse files Browse the repository at this point in the history
Release 0.16
  • Loading branch information
pvizeli authored Apr 26, 2017
2 parents e01b2da + d58e847 commit b5b68c5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ See HostControl info command.
"last_version": "",
"features": ["shutdown", "reboot", "update", "network_info", "network_control"],
"hostname": "",
"os": ""
}
```

Expand Down
4 changes: 3 additions & 1 deletion hassio/api/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

from .util import api_process_hostcontrol, api_process, api_validate
from ..const import (
ATTR_VERSION, ATTR_LAST_VERSION, ATTR_TYPE, ATTR_HOSTNAME, ATTR_FEATURES)
ATTR_VERSION, ATTR_LAST_VERSION, ATTR_TYPE, ATTR_HOSTNAME, ATTR_FEATURES,
ATTR_OS)

_LOGGER = logging.getLogger(__name__)

Expand All @@ -32,6 +33,7 @@ async def info(self, request):
ATTR_LAST_VERSION: self.host_control.last,
ATTR_FEATURES: self.host_control.features,
ATTR_HOSTNAME: self.host_control.hostname,
ATTR_OS: self.host_control.os_info,
}

@api_process_hostcontrol
Expand Down
13 changes: 7 additions & 6 deletions hassio/const.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Const file for HassIO."""
HASSIO_VERSION = '0.15'
HASSIO_VERSION = '0.16'

URL_HASSIO_VERSION = \
'https://raw.githubusercontent.com/pvizeli/hassio/master/version.json'
URL_HASSIO_VERSION_BETA = \
'https://raw.githubusercontent.com/pvizeli/hassio/master/version_beta.json'
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
'hassio/master/version.json')
URL_HASSIO_VERSION_BETA = ('https://raw.githubusercontent.com/home-assistant/'
'hassio/master/version_beta.json')

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

DOCKER_REPO = "pvizeli"

Expand All @@ -32,6 +32,7 @@
RESULT_OK = 'ok'

ATTR_HOSTNAME = 'hostname'
ATTR_OS = 'os'
ATTR_TYPE = 'type'
ATTR_FEATURES = 'features'
ATTR_ADDONS = 'addons'
Expand Down
4 changes: 3 additions & 1 deletion hassio/host_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .const import (
SOCKET_HC, ATTR_LAST_VERSION, ATTR_VERSION, ATTR_TYPE, ATTR_FEATURES,
ATTR_HOSTNAME)
ATTR_HOSTNAME, ATTR_OS)

_LOGGER = logging.getLogger(__name__)

Expand All @@ -35,6 +35,7 @@ def __init__(self, loop):
self.type = UNKNOWN
self.features = []
self.hostname = UNKNOWN
self.os_info = UNKNOWN

mode = os.stat(SOCKET_HC)[stat.ST_MODE]
if stat.S_ISSOCK(mode):
Expand Down Expand Up @@ -94,6 +95,7 @@ async def load(self):
self.type = info.get(ATTR_TYPE, UNKNOWN)
self.features = info.get(ATTR_FEATURES, [])
self.hostname = info.get(ATTR_HOSTNAME, UNKNOWN)
self.os_info = info.get(ATTR_OS, UNKNOWN)

def reboot(self):
"""Reboot the host system.
Expand Down

0 comments on commit b5b68c5

Please sign in to comment.