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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user