Update home zone when core config updated (#24237)
* Update home zone when core config updated * Lint
This commit is contained in:
parent
b4374c8c4c
commit
b90636f640
7 changed files with 57 additions and 31 deletions
|
@ -955,7 +955,7 @@ async def test_event_on_update(hass, hass_storage):
|
|||
|
||||
assert hass.config.latitude != 12
|
||||
|
||||
await hass.config.update(latitude=12)
|
||||
await hass.config.async_update(latitude=12)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert hass.config.latitude == 12
|
||||
|
@ -963,10 +963,10 @@ async def test_event_on_update(hass, hass_storage):
|
|||
assert events[0].data == {'latitude': 12}
|
||||
|
||||
|
||||
def test_bad_timezone_raises_value_error(hass):
|
||||
async def test_bad_timezone_raises_value_error(hass):
|
||||
"""Test bad timezone raises ValueError."""
|
||||
with pytest.raises(ValueError):
|
||||
hass.config.set_time_zone('not_a_timezone')
|
||||
await hass.config.async_update(time_zone='not_a_timezone')
|
||||
|
||||
|
||||
@patch('homeassistant.core.monotonic')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue