Fix Jewish Calendar unique id migration (#119683)
* Implement correct passing fix * Keep the test as is, as it simulates the current behavior * Last minor changepull/115891/head
parent
e0378f79a4
commit
369f9772f2
|
@ -72,11 +72,14 @@ def get_unique_prefix(
|
||||||
havdalah_offset: int | None,
|
havdalah_offset: int | None,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Create a prefix for unique ids."""
|
"""Create a prefix for unique ids."""
|
||||||
|
# location.altitude was unset before 2024.6 when this method
|
||||||
|
# was used to create the unique id. As such it would always
|
||||||
|
# use the default altitude of 754.
|
||||||
config_properties = [
|
config_properties = [
|
||||||
location.latitude,
|
location.latitude,
|
||||||
location.longitude,
|
location.longitude,
|
||||||
location.timezone,
|
location.timezone,
|
||||||
location.altitude,
|
754,
|
||||||
location.diaspora,
|
location.diaspora,
|
||||||
language,
|
language,
|
||||||
candle_lighting_offset,
|
candle_lighting_offset,
|
||||||
|
|
|
@ -38,7 +38,6 @@ async def test_import_unique_id_migration(hass: HomeAssistant) -> None:
|
||||||
latitude=yaml_conf[DOMAIN][CONF_LATITUDE],
|
latitude=yaml_conf[DOMAIN][CONF_LATITUDE],
|
||||||
longitude=yaml_conf[DOMAIN][CONF_LONGITUDE],
|
longitude=yaml_conf[DOMAIN][CONF_LONGITUDE],
|
||||||
timezone=hass.config.time_zone,
|
timezone=hass.config.time_zone,
|
||||||
altitude=hass.config.elevation,
|
|
||||||
diaspora=DEFAULT_DIASPORA,
|
diaspora=DEFAULT_DIASPORA,
|
||||||
)
|
)
|
||||||
old_prefix = get_unique_prefix(location, DEFAULT_LANGUAGE, 20, 50)
|
old_prefix = get_unique_prefix(location, DEFAULT_LANGUAGE, 20, 50)
|
||||||
|
|
Loading…
Reference in New Issue