mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
Simplify timezone setting in recorder test (#116220)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user