Simplify timezone setting in recorder test (#116220)
This commit is contained in:
parent
b582d51a8a
commit
10be8f9683
3 changed files with 50 additions and 91 deletions
|
@ -1404,8 +1404,12 @@ def hass_recorder(
|
|||
),
|
||||
):
|
||||
|
||||
def setup_recorder(config: dict[str, Any] | None = None) -> HomeAssistant:
|
||||
def setup_recorder(
|
||||
*, config: dict[str, Any] | None = None, timezone: str | None = None
|
||||
) -> HomeAssistant:
|
||||
"""Set up with params."""
|
||||
if timezone is not None:
|
||||
hass.config.set_time_zone(timezone)
|
||||
init_recorder_component(hass, config, recorder_db_url)
|
||||
hass.start()
|
||||
hass.block_till_done()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue