Fix vallow test fixtures (#118003)

This commit is contained in:
Marc Mueller 2024-05-24 08:31:21 +02:00 committed by GitHub
parent 528d67ee06
commit 301c484e05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,19 +20,19 @@ def set_tz(request):
@pytest.fixture @pytest.fixture
async def utc(hass: HomeAssistant) -> None: async def utc(hass: HomeAssistant) -> None:
"""Set the default TZ to UTC.""" """Set the default TZ to UTC."""
hass.config.async_set_time_zone("UTC") await hass.config.async_set_time_zone("UTC")
@pytest.fixture @pytest.fixture
async def helsinki(hass: HomeAssistant) -> None: async def helsinki(hass: HomeAssistant) -> None:
"""Set the default TZ to Europe/Helsinki.""" """Set the default TZ to Europe/Helsinki."""
hass.config.async_set_time_zone("Europe/Helsinki") await hass.config.async_set_time_zone("Europe/Helsinki")
@pytest.fixture @pytest.fixture
async def new_york(hass: HomeAssistant) -> None: async def new_york(hass: HomeAssistant) -> None:
"""Set the default TZ to America/New_York.""" """Set the default TZ to America/New_York."""
hass.config.async_set_time_zone("America/New_York") await hass.config.async_set_time_zone("America/New_York")
def _sensor_to_datetime(sensor): def _sensor_to_datetime(sensor):