Update Hass.io when core config is updated (#24461)
* Update Hass.io when core config is updated * Lint * Fix tests * Lint sigh
This commit is contained in:
1 parent
236c5deeee
commit
820b381a8d
5 files changed
+45
-32
No files matched your search
@@ -11,7 +11,7 @@ from homeassistant.components.http import (
|
||||
CONF_SERVER_PORT,
|
||||
CONF_SSL_CERTIFICATE,
|
||||
)
|
||||
from homeassistant.const import CONF_TIME_ZONE, SERVER_PORT
|
||||
from homeassistant.const import SERVER_PORT
|
||||
|
||||
from .const import X_HASSIO
|
||||
|
||||
@@ -140,13 +140,13 @@ class HassIO:
|
||||
payload=options)
|
||||
|
||||
@_api_bool
|
||||
def update_hass_timezone(self, core_config):
|
||||
def update_hass_timezone(self, timezone):
|
||||
"""Update Home-Assistant timezone data on Hass.io.
|
||||
|
||||
This method return a coroutine.
|
||||
"""
|
||||
return self.send_command("/supervisor/options", payload={
|
||||
'timezone': core_config.get(CONF_TIME_ZONE)
|
||||
'timezone': timezone
|
||||
})
|
||||
|
||||
async def send_command(self, command, method="post", payload=None,
|
||||
|
||||
Reference in new issue
Block a user