1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Pass timezone to aioesphomeapi to ensure HA timezone takes precedence (#152756)

This commit is contained in:
J. Nick Koston
2025-09-22 09:54:15 -06:00
committed by GitHub
parent d565fb3cb4
commit d9d42b3ad5
2 changed files with 4 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ESPHomeConfigEntry) -> b
client_info=CLIENT_INFO,
zeroconf_instance=zeroconf_instance,
noise_psk=noise_psk,
timezone=hass.config.time_zone,
)
domain_data = DomainData.get(hass)

View File

@@ -187,13 +187,15 @@ def mock_client(mock_device_info) -> Generator[APIClient]:
zeroconf_instance: Zeroconf = None,
noise_psk: str | None = None,
expected_name: str | None = None,
):
timezone: str | None = None,
) -> None:
"""Fake the client constructor."""
mock_client.host = address
mock_client.port = port
mock_client.password = password
mock_client.zeroconf_instance = zeroconf_instance
mock_client.noise_psk = noise_psk
mock_client.timezone = timezone
return mock_client
mock_client.side_effect = mock_constructor