From a772832917e465199cf549a3c0be9d7356df04e1 Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Mon, 14 Apr 2025 21:24:52 +0200 Subject: [PATCH 01/27] Bump devolo_plc_api to 1.5.1 (#142908) --- homeassistant/components/devolo_home_network/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/devolo_home_network/manifest.json b/homeassistant/components/devolo_home_network/manifest.json index 9b1e181d7c0..31f3a51ebeb 100644 --- a/homeassistant/components/devolo_home_network/manifest.json +++ b/homeassistant/components/devolo_home_network/manifest.json @@ -8,7 +8,7 @@ "integration_type": "device", "iot_class": "local_polling", "loggers": ["devolo_plc_api"], - "requirements": ["devolo-plc-api==1.4.1"], + "requirements": ["devolo-plc-api==1.5.1"], "zeroconf": [ { "type": "_dvl-deviceapi._tcp.local.", diff --git a/requirements_all.txt b/requirements_all.txt index 52c55ce64a4..6cd82479f7f 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -781,7 +781,7 @@ devialet==1.5.7 devolo-home-control-api==0.18.3 # homeassistant.components.devolo_home_network -devolo-plc-api==1.4.1 +devolo-plc-api==1.5.1 # homeassistant.components.chacon_dio dio-chacon-wifi-api==1.2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b09974e6369..62b97e7ccb4 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -672,7 +672,7 @@ devialet==1.5.7 devolo-home-control-api==0.18.3 # homeassistant.components.devolo_home_network -devolo-plc-api==1.4.1 +devolo-plc-api==1.5.1 # homeassistant.components.chacon_dio dio-chacon-wifi-api==1.2.1 From 074378bef69efdf68f9cf8c3b57a4cfc3406e642 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Mon, 14 Apr 2025 21:40:32 +0200 Subject: [PATCH 02/27] Bump python-linkplay to 0.2.3 (#142571) --- homeassistant/components/linkplay/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/linkplay/manifest.json b/homeassistant/components/linkplay/manifest.json index 02acd0f04f4..b57a7b68881 100644 --- a/homeassistant/components/linkplay/manifest.json +++ b/homeassistant/components/linkplay/manifest.json @@ -7,6 +7,6 @@ "integration_type": "hub", "iot_class": "local_polling", "loggers": ["linkplay"], - "requirements": ["python-linkplay==0.2.2"], + "requirements": ["python-linkplay==0.2.3"], "zeroconf": ["_linkplay._tcp.local."] } diff --git a/requirements_all.txt b/requirements_all.txt index 6cd82479f7f..0535ca66a2a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2436,7 +2436,7 @@ python-juicenet==1.1.0 python-kasa[speedups]==0.10.2 # homeassistant.components.linkplay -python-linkplay==0.2.2 +python-linkplay==0.2.3 # homeassistant.components.lirc # python-lirc==1.2.3 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 62b97e7ccb4..37f4d1ba094 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1976,7 +1976,7 @@ python-juicenet==1.1.0 python-kasa[speedups]==0.10.2 # homeassistant.components.linkplay -python-linkplay==0.2.2 +python-linkplay==0.2.3 # homeassistant.components.matter python-matter-server==7.0.0 From 8cb62341ef352bfc20eb9bd5dace81b84b01d112 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 14 Apr 2025 09:42:23 -1000 Subject: [PATCH 03/27] Fix race to rename entity (#142584) --- homeassistant/components/recorder/__init__.py | 2 +- .../components/recorder/entity_registry.py | 20 ++++++++++--------- tests/components/recorder/test_init.py | 20 +++++++++++++++++++ 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 7cb71e70f65..c0bffbe9615 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -170,12 +170,12 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: exclude_event_types=exclude_event_types, ) get_instance.cache_clear() + entity_registry.async_setup(hass) instance.async_initialize() instance.async_register() instance.start() async_register_services(hass, instance) websocket_api.async_setup(hass) - entity_registry.async_setup(hass) await _async_setup_integration_platform(hass, instance) diff --git a/homeassistant/components/recorder/entity_registry.py b/homeassistant/components/recorder/entity_registry.py index 07f8f2f88de..30a3a1b8239 100644 --- a/homeassistant/components/recorder/entity_registry.py +++ b/homeassistant/components/recorder/entity_registry.py @@ -4,8 +4,9 @@ import logging from typing import TYPE_CHECKING from homeassistant.core import Event, HomeAssistant, callback +from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import entity_registry as er -from homeassistant.helpers.start import async_at_start +from homeassistant.helpers.event import async_has_entity_registry_updated_listeners from .core import Recorder from .util import filter_unique_constraint_integrity_error, get_instance, session_scope @@ -40,16 +41,17 @@ def async_setup(hass: HomeAssistant) -> None: """Handle entity_id changed filter.""" return event_data["action"] == "update" and "old_entity_id" in event_data - @callback - def _setup_entity_registry_event_handler(hass: HomeAssistant) -> None: - """Subscribe to event registry events.""" - hass.bus.async_listen( - er.EVENT_ENTITY_REGISTRY_UPDATED, - _async_entity_id_changed, - event_filter=entity_registry_changed_filter, + if async_has_entity_registry_updated_listeners(hass): + raise HomeAssistantError( + "The recorder entity registry listener must be installed" + " before async_track_entity_registry_updated_event is called" ) - async_at_start(hass, _setup_entity_registry_event_handler) + hass.bus.async_listen( + er.EVENT_ENTITY_REGISTRY_UPDATED, + _async_entity_id_changed, + event_filter=entity_registry_changed_filter, + ) def update_states_metadata( diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index 95cd959db3b..2023e15176f 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -77,6 +77,7 @@ from homeassistant.helpers import ( issue_registry as ir, recorder as recorder_helper, ) +from homeassistant.helpers.event import async_track_entity_registry_updated_event from homeassistant.helpers.typing import ConfigType from homeassistant.setup import async_setup_component from homeassistant.util import dt as dt_util @@ -2798,3 +2799,22 @@ async def test_empty_entity_id( hass.bus.async_fire("hello", {"entity_id": ""}) await async_wait_recording_done(hass) assert "Invalid entity ID" not in caplog.text + + +async def test_setting_up_recorder_fails_entity_registry_listener( + hass: HomeAssistant, caplog: pytest.LogCaptureFixture +) -> None: + """Test recorder setup fails if an entity registry listener is in place.""" + async_track_entity_registry_updated_event(hass, "test.test", lambda x: x) + recorder_helper.async_initialize_recorder(hass) + with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True): + assert not await async_setup_component( + hass, + recorder.DOMAIN, + {recorder.DOMAIN: {recorder.CONF_DB_URL: "sqlite://"}}, + ) + await hass.async_block_till_done() + assert ( + "The recorder entity registry listener must be installed before " + "async_track_entity_registry_updated_event is called" in caplog.text + ) From fb2a671e866375f6d4942a3fe0231f9649fd23d2 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 14 Apr 2025 21:42:35 +0200 Subject: [PATCH 04/27] Use common state for "Auto" in `matter` (#142947) --- homeassistant/components/matter/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/matter/strings.json b/homeassistant/components/matter/strings.json index 54db8c695e6..f6e7187f8c0 100644 --- a/homeassistant/components/matter/strings.json +++ b/homeassistant/components/matter/strings.json @@ -147,7 +147,7 @@ "low": "[%key:common::state::low%]", "medium": "[%key:common::state::medium%]", "high": "[%key:common::state::high%]", - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "natural_wind": "Natural wind", "sleep_wind": "Sleep wind" } From 6ba2d0be31faca87809de32ad8c8decef3e4a287 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 14 Apr 2025 22:17:21 +0200 Subject: [PATCH 05/27] Replace reference from `climate` with common "Auto" state in `baf` (#142936) --- homeassistant/components/baf/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/baf/strings.json b/homeassistant/components/baf/strings.json index 64956984bb8..629a3041df5 100644 --- a/homeassistant/components/baf/strings.json +++ b/homeassistant/components/baf/strings.json @@ -31,7 +31,7 @@ "state_attributes": { "preset_mode": { "state": { - "auto": "[%key:component::climate::entity_component::_::state_attributes::fan_mode::state::auto%]" + "auto": "[%key:common::state::auto%]" } } } From a4f75ca24953988cbf2f8823d029134dde221ad7 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 14 Apr 2025 22:18:03 +0200 Subject: [PATCH 06/27] Use common states "Auto" and "Manual" in `osoenergy` (#142950) --- homeassistant/components/osoenergy/strings.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/osoenergy/strings.json b/homeassistant/components/osoenergy/strings.json index ef7e2abb89b..465f3f15c6b 100644 --- a/homeassistant/components/osoenergy/strings.json +++ b/homeassistant/components/osoenergy/strings.json @@ -55,12 +55,12 @@ "heater_mode": { "name": "Heater mode", "state": { - "auto": "Auto", + "off": "[%key:common::state::off%]", + "auto": "[%key:common::state::auto%]", + "manual": "[%key:common::state::manual%]", "extraenergy": "Extra energy", "ffr": "Fast frequency reserve", "legionella": "Legionella", - "manual": "Manual", - "off": "[%key:common::state::off%]", "powersave": "Power save", "voltage": "Voltage" } From e418491f192327ca0d610ee2cb4f54c8823f64f3 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 14 Apr 2025 22:19:14 +0200 Subject: [PATCH 07/27] Add support for device sub units in AVM Fritz!SmartHome (#142845) --- .../components/fritzbox/coordinator.py | 34 ++++++++++++++----- homeassistant/components/fritzbox/entity.py | 9 +---- tests/components/fritzbox/__init__.py | 1 + .../components/fritzbox/test_binary_sensor.py | 1 + tests/components/fritzbox/test_coordinator.py | 18 ++++++++-- tests/components/fritzbox/test_sensor.py | 1 + 6 files changed, 45 insertions(+), 19 deletions(-) diff --git a/homeassistant/components/fritzbox/coordinator.py b/homeassistant/components/fritzbox/coordinator.py index 34df3885deb..adc63dd2c2e 100644 --- a/homeassistant/components/fritzbox/coordinator.py +++ b/homeassistant/components/fritzbox/coordinator.py @@ -77,12 +77,11 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat self.configuration_url = self.fritz.get_prefixed_host() await self.async_config_entry_first_refresh() - self.cleanup_removed_devices( - list(self.data.devices) + list(self.data.templates) - ) + self.cleanup_removed_devices(self.data) - def cleanup_removed_devices(self, available_ains: list[str]) -> None: + def cleanup_removed_devices(self, data: FritzboxCoordinatorData) -> None: """Cleanup entity and device registry from removed devices.""" + available_ains = list(data.devices) + list(data.templates) entity_reg = er.async_get(self.hass) for entity in er.async_entries_for_config_entry( entity_reg, self.config_entry.entry_id @@ -91,8 +90,13 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat LOGGER.debug("Removing obsolete entity entry %s", entity.entity_id) entity_reg.async_remove(entity.entity_id) + available_main_ains = [ + ain + for ain, dev in data.devices.items() + if dev.device_and_unit_id[1] is None + ] device_reg = dr.async_get(self.hass) - identifiers = {(DOMAIN, ain) for ain in available_ains} + identifiers = {(DOMAIN, ain) for ain in available_main_ains} for device in dr.async_entries_for_config_entry( device_reg, self.config_entry.entry_id ): @@ -165,12 +169,26 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat """Fetch all device data.""" new_data = await self.hass.async_add_executor_job(self._update_fritz_devices) + for device in new_data.devices.values(): + # create device registry entry for new main devices + if ( + device.ain not in self.data.devices + and device.device_and_unit_id[1] is None + ): + dr.async_get(self.hass).async_get_or_create( + config_entry_id=self.config_entry.entry_id, + name=device.name, + identifiers={(DOMAIN, device.ain)}, + manufacturer=device.manufacturer, + model=device.productname, + sw_version=device.fw_version, + configuration_url=self.configuration_url, + ) + if ( self.data.devices.keys() - new_data.devices.keys() or self.data.templates.keys() - new_data.templates.keys() ): - self.cleanup_removed_devices( - list(new_data.devices) + list(new_data.templates) - ) + self.cleanup_removed_devices(new_data) return new_data diff --git a/homeassistant/components/fritzbox/entity.py b/homeassistant/components/fritzbox/entity.py index cd619588bc1..bbc7d9fe276 100644 --- a/homeassistant/components/fritzbox/entity.py +++ b/homeassistant/components/fritzbox/entity.py @@ -58,11 +58,4 @@ class FritzBoxDeviceEntity(FritzBoxEntity): @property def device_info(self) -> DeviceInfo: """Return device specific attributes.""" - return DeviceInfo( - name=self.data.name, - identifiers={(DOMAIN, self.ain)}, - manufacturer=self.data.manufacturer, - model=self.data.productname, - sw_version=self.data.fw_version, - configuration_url=self.coordinator.configuration_url, - ) + return DeviceInfo(identifiers={(DOMAIN, self.data.device_and_unit_id[0])}) diff --git a/tests/components/fritzbox/__init__.py b/tests/components/fritzbox/__init__.py index 1f310e1d3cb..5792ccf85b1 100644 --- a/tests/components/fritzbox/__init__.py +++ b/tests/components/fritzbox/__init__.py @@ -60,6 +60,7 @@ class FritzEntityBaseMock(Mock): """base mock of a AVM Fritz!Box binary sensor device.""" ain = CONF_FAKE_AIN + device_and_unit_id = (CONF_FAKE_AIN, None) manufacturer = CONF_FAKE_MANUFACTURER name = CONF_FAKE_NAME productname = CONF_FAKE_PRODUCTNAME diff --git a/tests/components/fritzbox/test_binary_sensor.py b/tests/components/fritzbox/test_binary_sensor.py index 3244d007fa6..5a300b6643a 100644 --- a/tests/components/fritzbox/test_binary_sensor.py +++ b/tests/components/fritzbox/test_binary_sensor.py @@ -110,6 +110,7 @@ async def test_discover_new_device(hass: HomeAssistant, fritz: Mock) -> None: new_device = FritzDeviceBinarySensorMock() new_device.ain = "7890 1234" + new_device.device_and_unit_id = ("7890 1234", None) new_device.name = "new_device" set_devices(fritz, devices=[device, new_device]) diff --git a/tests/components/fritzbox/test_coordinator.py b/tests/components/fritzbox/test_coordinator.py index 401fab8f169..3e51ff38260 100644 --- a/tests/components/fritzbox/test_coordinator.py +++ b/tests/components/fritzbox/test_coordinator.py @@ -85,8 +85,16 @@ async def test_coordinator_automatic_registry_cleanup( ) -> None: """Test automatic registry cleanup.""" fritz().get_devices.return_value = [ - FritzDeviceSwitchMock(ain="fake ain switch", name="fake_switch"), - FritzDeviceCoverMock(ain="fake ain cover", name="fake_cover"), + FritzDeviceSwitchMock( + ain="fake ain switch", + device_and_unit_id=("fake ain switch", None), + name="fake_switch", + ), + FritzDeviceCoverMock( + ain="fake ain cover", + device_and_unit_id=("fake ain cover", None), + name="fake_cover", + ), ] entry = MockConfigEntry( domain=FB_DOMAIN, @@ -101,7 +109,11 @@ async def test_coordinator_automatic_registry_cleanup( assert len(dr.async_entries_for_config_entry(device_registry, entry.entry_id)) == 2 fritz().get_devices.return_value = [ - FritzDeviceSwitchMock(ain="fake ain switch", name="fake_switch") + FritzDeviceSwitchMock( + ain="fake ain switch", + device_and_unit_id=("fake ain switch", None), + name="fake_switch", + ) ] async_fire_time_changed(hass, utcnow() + timedelta(seconds=35)) diff --git a/tests/components/fritzbox/test_sensor.py b/tests/components/fritzbox/test_sensor.py index 28d21f9fd39..7912aaf8d12 100644 --- a/tests/components/fritzbox/test_sensor.py +++ b/tests/components/fritzbox/test_sensor.py @@ -108,6 +108,7 @@ async def test_discover_new_device(hass: HomeAssistant, fritz: Mock) -> None: new_device = FritzDeviceSensorMock() new_device.ain = "7890 1234" + new_device.device_and_unit_id = ("7890 1234", None) new_device.name = "new_device" set_devices(fritz, devices=[device, new_device]) From cf1cbc6d753544ac5a7e8b625f8059b819af0943 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Mon, 14 Apr 2025 22:22:21 +0200 Subject: [PATCH 08/27] Add Reolink recording packing time (#142847) --- homeassistant/components/reolink/icons.json | 3 +++ homeassistant/components/reolink/select.py | 11 +++++++++++ homeassistant/components/reolink/strings.json | 3 +++ tests/components/reolink/conftest.py | 2 ++ 4 files changed, 19 insertions(+) diff --git a/homeassistant/components/reolink/icons.json b/homeassistant/components/reolink/icons.json index 7d1dba099ed..7df82dfc512 100644 --- a/homeassistant/components/reolink/icons.json +++ b/homeassistant/components/reolink/icons.json @@ -380,6 +380,9 @@ }, "scene_mode": { "default": "mdi:view-list" + }, + "packing_time": { + "default": "mdi:record-rec" } }, "sensor": { diff --git a/homeassistant/components/reolink/select.py b/homeassistant/components/reolink/select.py index e5d66ed3901..2ee2b790687 100644 --- a/homeassistant/components/reolink/select.py +++ b/homeassistant/components/reolink/select.py @@ -263,6 +263,17 @@ HOST_SELECT_ENTITIES = ( value=lambda api: api.baichuan.active_scene, method=lambda api, name: api.baichuan.set_scene(scene_name=name), ), + ReolinkHostSelectEntityDescription( + key="packing_time", + cmd_key="GetRec", + translation_key="packing_time", + entity_category=EntityCategory.CONFIG, + entity_registry_enabled_default=False, + get_options=lambda api: api.recording_packing_time_list, + supported=lambda api: api.supported(None, "pak_time"), + value=lambda api: api.recording_packing_time, + method=lambda api, value: api.set_recording_packing_time(value), + ), ) CHIME_SELECT_ENTITIES = ( diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index e478f06b556..10b4a07f971 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -845,6 +845,9 @@ "home": "[%key:common::state::home%]", "away": "[%key:common::state::not_home%]" } + }, + "packing_time": { + "name": "Recording packing time" } }, "sensor": { diff --git a/tests/components/reolink/conftest.py b/tests/components/reolink/conftest.py index 3bd1539fc36..a2155ba00eb 100644 --- a/tests/components/reolink/conftest.py +++ b/tests/components/reolink/conftest.py @@ -138,6 +138,8 @@ def reolink_connect_class() -> Generator[MagicMock]: host_mock.daynight_state.return_value = "Black&White" host_mock.hub_alarm_tone_id.return_value = 1 host_mock.hub_visitor_tone_id.return_value = 1 + host_mock.recording_packing_time_list = ["30 Minutes", "60 Minutes"] + host_mock.recording_packing_time = "60 Minutes" # Baichuan host_mock.baichuan = create_autospec(Baichuan) From 881079ccc156233c6fb5ae32584438e50bd09eae Mon Sep 17 00:00:00 2001 From: Alex L <9060360+AlexLamond@users.noreply.github.com> Date: Mon, 14 Apr 2025 22:22:53 +0200 Subject: [PATCH 09/27] Update UK Transport Integration URL (#142949) --- homeassistant/components/uk_transport/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/uk_transport/sensor.py b/homeassistant/components/uk_transport/sensor.py index 594d46c74ab..a52750282df 100644 --- a/homeassistant/components/uk_transport/sensor.py +++ b/homeassistant/components/uk_transport/sensor.py @@ -163,7 +163,7 @@ class UkTransportLiveBusTimeSensor(UkTransportSensor): self._destination_re = re.compile(f"{bus_direction}", re.IGNORECASE) sensor_name = f"Next bus to {bus_direction}" - stop_url = f"bus/stop/{stop_atcocode}/live.json" + stop_url = f"bus/stop/{stop_atcocode}.json" UkTransportSensor.__init__(self, sensor_name, api_app_id, api_app_key, stop_url) self.update = Throttle(interval)(self._update) @@ -226,7 +226,7 @@ class UkTransportLiveTrainTimeSensor(UkTransportSensor): self._next_trains = [] sensor_name = f"Next train to {calling_at}" - query_url = f"train/station/{station_code}/live.json" + query_url = f"train/station/{station_code}.json" UkTransportSensor.__init__( self, sensor_name, api_app_id, api_app_key, query_url From 3378b8d7ced55cb47c10bc7609dd376746dbed51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 14 Apr 2025 23:31:27 +0300 Subject: [PATCH 10/27] Simplify huawei_lte entities event setup (#142501) --- homeassistant/components/huawei_lte/entity.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/homeassistant/components/huawei_lte/entity.py b/homeassistant/components/huawei_lte/entity.py index 99d7ca112c4..b69d2e79fb6 100644 --- a/homeassistant/components/huawei_lte/entity.py +++ b/homeassistant/components/huawei_lte/entity.py @@ -2,7 +2,6 @@ from __future__ import annotations -from collections.abc import Callable from datetime import timedelta from homeassistant.helpers.device_registry import DeviceInfo @@ -25,7 +24,6 @@ class HuaweiLteBaseEntity(Entity): def __init__(self, router: Router) -> None: """Initialize.""" self.router = router - self._unsub_handlers: list[Callable] = [] @property def _device_unique_id(self) -> str: @@ -48,7 +46,7 @@ class HuaweiLteBaseEntity(Entity): async def async_added_to_hass(self) -> None: """Connect to update signals.""" - self._unsub_handlers.append( + self.async_on_remove( async_dispatcher_connect(self.hass, UPDATE_SIGNAL, self._async_maybe_update) ) @@ -57,12 +55,6 @@ class HuaweiLteBaseEntity(Entity): if config_entry_unique_id == self.router.config_entry.unique_id: self.async_schedule_update_ha_state(True) - async def async_will_remove_from_hass(self) -> None: - """Invoke unsubscription handlers.""" - for unsub in self._unsub_handlers: - unsub() - self._unsub_handlers.clear() - class HuaweiLteBaseEntityWithDevice(HuaweiLteBaseEntity): """Base entity with device info.""" From 3fab596518a616d4b7f8718c329f9983827a5483 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Mon, 14 Apr 2025 22:52:21 +0200 Subject: [PATCH 11/27] Bump holidays to 0.70 (#142954) --- homeassistant/components/holiday/manifest.json | 2 +- homeassistant/components/workday/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/holiday/manifest.json b/homeassistant/components/holiday/manifest.json index 4c73210c36e..d54d6955087 100644 --- a/homeassistant/components/holiday/manifest.json +++ b/homeassistant/components/holiday/manifest.json @@ -5,5 +5,5 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/holiday", "iot_class": "local_polling", - "requirements": ["holidays==0.69", "babel==2.15.0"] + "requirements": ["holidays==0.70", "babel==2.15.0"] } diff --git a/homeassistant/components/workday/manifest.json b/homeassistant/components/workday/manifest.json index b08a5ed9fff..60196fb15b7 100644 --- a/homeassistant/components/workday/manifest.json +++ b/homeassistant/components/workday/manifest.json @@ -7,5 +7,5 @@ "iot_class": "local_polling", "loggers": ["holidays"], "quality_scale": "internal", - "requirements": ["holidays==0.69"] + "requirements": ["holidays==0.70"] } diff --git a/requirements_all.txt b/requirements_all.txt index 0535ca66a2a..0f097916061 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1154,7 +1154,7 @@ hole==0.8.0 # homeassistant.components.holiday # homeassistant.components.workday -holidays==0.69 +holidays==0.70 # homeassistant.components.frontend home-assistant-frontend==20250411.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 37f4d1ba094..e07d1976896 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -984,7 +984,7 @@ hole==0.8.0 # homeassistant.components.holiday # homeassistant.components.workday -holidays==0.69 +holidays==0.70 # homeassistant.components.frontend home-assistant-frontend==20250411.0 From c9ccc7978958c4540c3a339b2beabb9d743043b9 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 14 Apr 2025 22:53:01 +0200 Subject: [PATCH 12/27] Use common state for "Auto" in `vesync` (#142958) --- homeassistant/components/vesync/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/vesync/strings.json b/homeassistant/components/vesync/strings.json index 241ccfa0af0..b74ebc4f00e 100644 --- a/homeassistant/components/vesync/strings.json +++ b/homeassistant/components/vesync/strings.json @@ -86,7 +86,7 @@ "state_attributes": { "preset_mode": { "state": { - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "sleep": "Sleep", "advanced_sleep": "Advanced sleep", "pet": "Pet", From 9e9be6055dc280ae36f6a0a10240f8a1ed16d762 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 14 Apr 2025 23:19:25 +0200 Subject: [PATCH 13/27] Use common state for "Auto" in `knx` (#142959) --- homeassistant/components/knx/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/knx/strings.json b/homeassistant/components/knx/strings.json index b13667a65b0..737cc2d8b2d 100644 --- a/homeassistant/components/knx/strings.json +++ b/homeassistant/components/knx/strings.json @@ -315,7 +315,7 @@ "preset_mode": { "name": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::name%]", "state": { - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "building_protection": "Building protection", "comfort": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::comfort%]", "economy": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::eco%]", From 4950bda40662290b218b81158199e708d5d81b89 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 14 Apr 2025 23:32:52 +0200 Subject: [PATCH 14/27] Fix homeaticip_cloud RuntimeWarnings (#142961) --- .../components/homematicip_cloud/test_hap.py | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/components/homematicip_cloud/test_hap.py b/tests/components/homematicip_cloud/test_hap.py index 8f56c2e0b99..1732459149c 100644 --- a/tests/components/homematicip_cloud/test_hap.py +++ b/tests/components/homematicip_cloud/test_hap.py @@ -129,10 +129,6 @@ async def test_hap_reset_unloads_entry_if_setup( assert hass.data[HMIPC_DOMAIN] == {} -@patch( - "homeassistant.components.homematicip_cloud.hap.ConnectionContextBuilder.build_context_async", - return_value=ConnectionContext(), -) async def test_hap_create( hass: HomeAssistant, hmip_config_entry: MockConfigEntry, simple_mock_home ) -> None: @@ -140,15 +136,17 @@ async def test_hap_create( hass.config.components.add(HMIPC_DOMAIN) hap = HomematicipHAP(hass, hmip_config_entry) assert hap - with patch.object(hap, "async_connect"): + with ( + patch( + "homeassistant.components.homematicip_cloud.hap.ConnectionContextBuilder.build_context_async", + return_value=ConnectionContext(), + ), + patch.object(hap, "async_connect"), + ): async with hmip_config_entry.setup_lock: assert await hap.async_setup() -@patch( - "homeassistant.components.homematicip_cloud.hap.ConnectionContextBuilder.build_context_async", - return_value=ConnectionContext(), -) async def test_hap_create_exception( hass: HomeAssistant, hmip_config_entry: MockConfigEntry, mock_connection_init ) -> None: @@ -158,13 +156,23 @@ async def test_hap_create_exception( hap = HomematicipHAP(hass, hmip_config_entry) assert hap - with patch( - "homeassistant.components.homematicip_cloud.hap.AsyncHome.get_current_state_async", - side_effect=Exception, + with ( + patch( + "homeassistant.components.homematicip_cloud.hap.ConnectionContextBuilder.build_context_async", + return_value=ConnectionContext(), + ), + patch( + "homeassistant.components.homematicip_cloud.hap.AsyncHome.get_current_state_async", + side_effect=Exception, + ), ): assert not await hap.async_setup() with ( + patch( + "homeassistant.components.homematicip_cloud.hap.ConnectionContextBuilder.build_context_async", + return_value=ConnectionContext(), + ), patch( "homeassistant.components.homematicip_cloud.hap.AsyncHome.get_current_state_async", side_effect=HmipConnectionError, From 514f83cc96adf6f150d858226050e575397b2dd6 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 08:12:30 +0200 Subject: [PATCH 15/27] Use common state for "Auto" in `reolink` (#142971) The common state replaces the internal references, too. --- homeassistant/components/reolink/strings.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index 10b4a07f971..8b7d276a9e3 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -652,7 +652,7 @@ "name": "Floodlight mode", "state": { "off": "[%key:common::state::off%]", - "auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]", + "auto": "[%key:common::state::auto%]", "onatnight": "On at night", "schedule": "Schedule", "adaptive": "Adaptive", @@ -662,7 +662,7 @@ "day_night_mode": { "name": "Day night mode", "state": { - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "color": "Color", "blackwhite": "Black & white" } @@ -691,7 +691,7 @@ "name": "Doorbell LED", "state": { "stayoff": "Stay off", - "auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]", + "auto": "[%key:common::state::auto%]", "alwaysonatnight": "Auto & always on at night", "always": "Always on", "alwayson": "Always on" @@ -702,7 +702,7 @@ "state": { "off": "[%key:common::state::off%]", "on": "[%key:common::state::on%]", - "auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]" + "auto": "[%key:common::state::auto%]" } }, "binning_mode": { @@ -710,7 +710,7 @@ "state": { "off": "[%key:common::state::off%]", "on": "[%key:common::state::on%]", - "auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]" + "auto": "[%key:common::state::auto%]" } }, "hub_alarm_ringtone": { From 33a0db39353e6262e2a40c0bd9edab1c10889c1c Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 08:16:27 +0200 Subject: [PATCH 16/27] Use common state for "Auto" and fix sentence-casing in `plugwise` (#142970) --- homeassistant/components/plugwise/strings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/plugwise/strings.json b/homeassistant/components/plugwise/strings.json index 344cee66d68..d26e70d1c4f 100644 --- a/homeassistant/components/plugwise/strings.json +++ b/homeassistant/components/plugwise/strings.json @@ -23,7 +23,7 @@ }, "data_description": { "password": "The Smile ID printed on the label on the back of your Adam, Smile-T, or P1.", - "host": "The hostname or IP-address of your Smile. You can find it in your router or the Plugwise App.", + "host": "The hostname or IP-address of your Smile. You can find it in your router or the Plugwise app.", "port": "By default your Smile uses port 80, normally you should not have to change this.", "username": "Default is `smile`, or `stretch` for the legacy Stretch." } @@ -113,7 +113,7 @@ "name": "DHW mode", "state": { "off": "[%key:common::state::off%]", - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "boost": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::boost%]", "comfort": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::comfort%]" } From 254d4c65347de14b8ce8b2a03438e2ca5f63ab5a Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 08:17:03 +0200 Subject: [PATCH 17/27] Use common state for "Auto" and fix sentence-casing in `tado` (#142969) --- homeassistant/components/tado/strings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tado/strings.json b/homeassistant/components/tado/strings.json index 53de3969998..5d9c4237be8 100644 --- a/homeassistant/components/tado/strings.json +++ b/homeassistant/components/tado/strings.json @@ -53,7 +53,7 @@ "state_attributes": { "preset_mode": { "state": { - "auto": "Auto" + "auto": "[%key:common::state::auto%]" } } } @@ -139,7 +139,7 @@ "description": "Adds a meter reading to Tado Energy IQ.", "fields": { "config_entry": { - "name": "Config Entry", + "name": "Config entry", "description": "Config entry to add meter reading to." }, "reading": { From cdd8ba78e76e9057d54b00f4c64ea57f7d433076 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 08:18:08 +0200 Subject: [PATCH 18/27] Use common state for "Auto" in `climate` (#142948) --- homeassistant/components/climate/strings.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/climate/strings.json b/homeassistant/components/climate/strings.json index 298f953d2c7..250b2a67efe 100644 --- a/homeassistant/components/climate/strings.json +++ b/homeassistant/components/climate/strings.json @@ -28,10 +28,10 @@ "name": "Thermostat", "state": { "off": "[%key:common::state::off%]", + "auto": "[%key:common::state::auto%]", "heat": "Heat", "cool": "Cool", "heat_cool": "Heat/Cool", - "auto": "Auto", "dry": "Dry", "fan_only": "Fan only" }, @@ -50,7 +50,7 @@ "state": { "off": "[%key:common::state::off%]", "on": "[%key:common::state::on%]", - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "low": "[%key:common::state::low%]", "medium": "[%key:common::state::medium%]", "high": "[%key:common::state::high%]", @@ -69,13 +69,13 @@ "hvac_action": { "name": "Current action", "state": { + "off": "[%key:common::state::off%]", + "idle": "[%key:common::state::idle%]", "cooling": "Cooling", "defrosting": "Defrosting", "drying": "Drying", "fan": "Fan", "heating": "Heating", - "idle": "[%key:common::state::idle%]", - "off": "[%key:common::state::off%]", "preheating": "Preheating" } }, @@ -258,7 +258,7 @@ "hvac_mode": { "options": { "off": "[%key:common::state::off%]", - "auto": "Auto", + "auto": "[%key:common::state::auto%]", "cool": "Cool", "dry": "Dry", "fan_only": "Fan only", From a9d4b1afe4555e74c7c52bf101b8cdb0077b8d53 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 14 Apr 2025 20:19:48 -1000 Subject: [PATCH 19/27] Bump zeroconf to 0.146.5 (#142962) --- homeassistant/components/zeroconf/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- pyproject.toml | 2 +- requirements.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/zeroconf/manifest.json b/homeassistant/components/zeroconf/manifest.json index a7fbfdfeada..e2637d792e2 100644 --- a/homeassistant/components/zeroconf/manifest.json +++ b/homeassistant/components/zeroconf/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_push", "loggers": ["zeroconf"], "quality_scale": "internal", - "requirements": ["zeroconf==0.146.0"] + "requirements": ["zeroconf==0.146.5"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index cf46982af78..30b7718bad4 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -75,7 +75,7 @@ voluptuous-serialize==2.6.0 voluptuous==0.15.2 webrtc-models==0.3.0 yarl==1.19.0 -zeroconf==0.146.0 +zeroconf==0.146.5 # Constrain pycryptodome to avoid vulnerability # see https://github.com/home-assistant/core/pull/16238 diff --git a/pyproject.toml b/pyproject.toml index 6d28c0b9deb..c66f8ba6363 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,7 @@ dependencies = [ "voluptuous-openapi==0.0.6", "yarl==1.19.0", "webrtc-models==0.3.0", - "zeroconf==0.146.0", + "zeroconf==0.146.5", ] [project.urls] diff --git a/requirements.txt b/requirements.txt index b771b7f38b8..40200563ec1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -60,4 +60,4 @@ voluptuous-serialize==2.6.0 voluptuous-openapi==0.0.6 yarl==1.19.0 webrtc-models==0.3.0 -zeroconf==0.146.0 +zeroconf==0.146.5 diff --git a/requirements_all.txt b/requirements_all.txt index 0f097916061..f8fa274cb28 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -3152,7 +3152,7 @@ zabbix-utils==2.0.2 zamg==0.3.6 # homeassistant.components.zeroconf -zeroconf==0.146.0 +zeroconf==0.146.5 # homeassistant.components.zeversolar zeversolar==0.3.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index e07d1976896..f8f9a006314 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2548,7 +2548,7 @@ yt-dlp[default]==2025.03.26 zamg==0.3.6 # homeassistant.components.zeroconf -zeroconf==0.146.0 +zeroconf==0.146.5 # homeassistant.components.zeversolar zeversolar==0.3.2 From 942bf2ef783f6c8a7dad738b9b5be45186577228 Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 08:45:37 +0200 Subject: [PATCH 20/27] Use common state for "Auto" in `lg_thinq` (#142973) --- homeassistant/components/lg_thinq/strings.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/lg_thinq/strings.json b/homeassistant/components/lg_thinq/strings.json index 525a594f748..f609be91de5 100644 --- a/homeassistant/components/lg_thinq/strings.json +++ b/homeassistant/components/lg_thinq/strings.json @@ -123,7 +123,7 @@ "mid": "[%key:common::state::medium%]", "high": "[%key:common::state::high%]", "power": "[%key:component::lg_thinq::entity::sensor::current_job_mode::state::high%]", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]" + "auto": "[%key:common::state::auto%]" } }, "preset_mode": { @@ -343,7 +343,7 @@ "growth_mode": { "name": "Mode", "state": { - "standard": "Auto", + "standard": "[%key:common::state::auto%]", "ext_leaf": "Vegetables", "ext_herb": "Herbs", "ext_flower": "Flowers", @@ -353,7 +353,7 @@ "growth_mode_for_location": { "name": "{location} mode", "state": { - "standard": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "standard": "[%key:common::state::auto%]", "ext_leaf": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::ext_leaf%]", "ext_herb": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::ext_herb%]", "ext_flower": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::ext_flower%]", @@ -581,7 +581,7 @@ "name": "[%key:component::lg_thinq::entity::binary_sensor::one_touch_filter::name%]", "state": { "off": "[%key:common::state::off%]", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "power": "[%key:component::lg_thinq::entity::sensor::current_job_mode::state::high%]", "replace": "Replace filter", "smart_power": "Smart safe storage", @@ -599,7 +599,7 @@ "name": "Operating mode", "state": { "air_clean": "Purify", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "clothes_dry": "Laundry", "edge": "Edge cleaning", "heat_pump": "Heat pump", @@ -649,7 +649,7 @@ "current_dish_washing_course": { "name": "Current cycle", "state": { - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "heavy": "Intensive", "delicate": "Delicate", "turbo": "[%key:component::lg_thinq::entity::select::wind_strength::state::power%]", @@ -881,7 +881,7 @@ "high": "[%key:common::state::high%]", "power": "Turbo", "turbo": "[%key:component::lg_thinq::entity::select::wind_strength::state::power%]", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "wind_1": "Step 1", "wind_2": "Step 2", "wind_3": "Step 3", @@ -905,7 +905,7 @@ "name": "Operating mode", "state": { "air_clean": "Purifying", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "baby_care": "[%key:component::lg_thinq::entity::sensor::personalization_mode::state::baby%]", "circulator": "Booster", "clean": "Single", @@ -1016,7 +1016,7 @@ "name": "[%key:component::lg_thinq::entity::binary_sensor::one_touch_filter::name%]", "state": { "off": "[%key:common::state::off%]", - "auto": "[%key:component::lg_thinq::entity::sensor::growth_mode::state::standard%]", + "auto": "[%key:common::state::auto%]", "power": "[%key:component::lg_thinq::entity::sensor::current_job_mode::state::high%]", "replace": "[%key:component::lg_thinq::entity::sensor::fresh_air_filter::state::replace%]", "smart_power": "[%key:component::lg_thinq::entity::sensor::fresh_air_filter::state::smart_power%]", From fa81a83893828ca6185d175306dae1ffa8a9418d Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 15 Apr 2025 09:55:16 +0200 Subject: [PATCH 21/27] Fix switch state for Comelit (#142978) --- homeassistant/components/comelit/switch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/comelit/switch.py b/homeassistant/components/comelit/switch.py index 9c9f6b747d4..658f37f70af 100644 --- a/homeassistant/components/comelit/switch.py +++ b/homeassistant/components/comelit/switch.py @@ -75,4 +75,7 @@ class ComelitSwitchEntity(ComelitBridgeBaseEntity, SwitchEntity): @property def is_on(self) -> bool: """Return True if switch is on.""" - return self.coordinator.data[OTHER][self._device.index].status == STATE_ON + return ( + self.coordinator.data[self._device.type][self._device.index].status + == STATE_ON + ) From b49a60fa3e9d439ab046b93eb5ffaa644bc95e8f Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Tue, 15 Apr 2025 09:56:40 +0200 Subject: [PATCH 22/27] Use common state for "Auto" in `roborock` (#142972) Also moved the "off" state to the top to group the common states a bit. --- homeassistant/components/roborock/strings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/roborock/strings.json b/homeassistant/components/roborock/strings.json index d27f4064170..0f36fbec3d5 100644 --- a/homeassistant/components/roborock/strings.json +++ b/homeassistant/components/roborock/strings.json @@ -426,11 +426,11 @@ "state_attributes": { "fan_speed": { "state": { - "auto": "Auto", + "off": "[%key:common::state::off%]", + "auto": "[%key:common::state::auto%]", "balanced": "Balanced", "custom": "[%key:component::roborock::entity::select::mop_mode::state::custom%]", "gentle": "Gentle", - "off": "[%key:common::state::off%]", "max": "[%key:component::roborock::entity::select::mop_intensity::state::max%]", "max_plus": "Max plus", "medium": "[%key:common::state::medium%]", From 18feb4bb819970af6da325184dd01553bda49328 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:40:12 +0200 Subject: [PATCH 23/27] Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#142974) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6fc1fdbca1c..d8fdda601dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1317,7 +1317,7 @@ jobs: pattern: coverage-* - name: Upload coverage to Codecov if: needs.info.outputs.test_full_suite == 'true' - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: fail_ci_if_error: true flags: full-suite @@ -1459,7 +1459,7 @@ jobs: pattern: coverage-* - name: Upload coverage to Codecov if: needs.info.outputs.test_full_suite == 'false' - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} From f2fa58310170b07a5cda28e76bb16d4b38d36a47 Mon Sep 17 00:00:00 2001 From: cdheiser <10488026+cdheiser@users.noreply.github.com> Date: Tue, 15 Apr 2025 01:41:56 -0700 Subject: [PATCH 24/27] Bump lutron's dependency on pylutron to 0.2.17 (#142953) * Bump lutron's dependency on pylutron to 0.2.17 This fixes https://github.com/home-assistant/core/issues/127672 * Bump to pylutron 0.2.18 (0.2.17 has a bug with smartquotes that 0.2.18 fixes) --------- Co-authored-by: cdheiser --- homeassistant/components/lutron/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/lutron/manifest.json b/homeassistant/components/lutron/manifest.json index 82bdfad4774..8d3da47795a 100644 --- a/homeassistant/components/lutron/manifest.json +++ b/homeassistant/components/lutron/manifest.json @@ -6,6 +6,6 @@ "documentation": "https://www.home-assistant.io/integrations/lutron", "iot_class": "local_polling", "loggers": ["pylutron"], - "requirements": ["pylutron==0.2.16"], + "requirements": ["pylutron==0.2.18"], "single_config_entry": true } diff --git a/requirements_all.txt b/requirements_all.txt index f8fa274cb28..330d7ebcc47 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2113,7 +2113,7 @@ pylitterbot==2024.0.0 pylutron-caseta==0.24.0 # homeassistant.components.lutron -pylutron==0.2.16 +pylutron==0.2.18 # homeassistant.components.mailgun pymailgunner==1.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f8f9a006314..8e0ecf5641b 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1728,7 +1728,7 @@ pylitterbot==2024.0.0 pylutron-caseta==0.24.0 # homeassistant.components.lutron -pylutron==0.2.16 +pylutron==0.2.18 # homeassistant.components.mailgun pymailgunner==1.4 From 759d8a3f90e974d6d6a24105289923d14fe5060b Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 15 Apr 2025 12:07:48 +0200 Subject: [PATCH 25/27] Code optimization for UptimeRobot binary (#142986) --- homeassistant/components/uptimerobot/binary_sensor.py | 2 +- homeassistant/components/uptimerobot/entity.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/homeassistant/components/uptimerobot/binary_sensor.py b/homeassistant/components/uptimerobot/binary_sensor.py index f14d6d93d71..e8803b6ad89 100644 --- a/homeassistant/components/uptimerobot/binary_sensor.py +++ b/homeassistant/components/uptimerobot/binary_sensor.py @@ -43,4 +43,4 @@ class UptimeRobotBinarySensor(UptimeRobotEntity, BinarySensorEntity): @property def is_on(self) -> bool: """Return True if the entity is on.""" - return self.monitor_available + return bool(self.monitor.status == 2) diff --git a/homeassistant/components/uptimerobot/entity.py b/homeassistant/components/uptimerobot/entity.py index 71f7a2f1c00..a27d4a6f80e 100644 --- a/homeassistant/components/uptimerobot/entity.py +++ b/homeassistant/components/uptimerobot/entity.py @@ -59,8 +59,3 @@ class UptimeRobotEntity(CoordinatorEntity[UptimeRobotDataUpdateCoordinator]): ), self._monitor, ) - - @property - def monitor_available(self) -> bool: - """Returtn if the monitor is available.""" - return bool(self.monitor.status == 2) From 2074c7fcee36c61e319d147f3ede971d993c9eab Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Tue, 15 Apr 2025 15:03:47 +0200 Subject: [PATCH 26/27] Bump reolink-aio to 0.13.2 (#142985) --- homeassistant/components/reolink/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/reolink/manifest.json b/homeassistant/components/reolink/manifest.json index 9105dfda66f..59a2741571f 100644 --- a/homeassistant/components/reolink/manifest.json +++ b/homeassistant/components/reolink/manifest.json @@ -19,5 +19,5 @@ "iot_class": "local_push", "loggers": ["reolink_aio"], "quality_scale": "platinum", - "requirements": ["reolink-aio==0.13.1"] + "requirements": ["reolink-aio==0.13.2"] } diff --git a/requirements_all.txt b/requirements_all.txt index 330d7ebcc47..0a814575271 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2633,7 +2633,7 @@ renault-api==0.2.9 renson-endura-delta==1.7.2 # homeassistant.components.reolink -reolink-aio==0.13.1 +reolink-aio==0.13.2 # homeassistant.components.idteck_prox rfk101py==0.0.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 8e0ecf5641b..82575692d08 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2137,7 +2137,7 @@ renault-api==0.2.9 renson-endura-delta==1.7.2 # homeassistant.components.reolink -reolink-aio==0.13.1 +reolink-aio==0.13.2 # homeassistant.components.rflink rflink==0.0.66 From 595508bf7dfbc506faecf1a043ed14f2008cb6fb Mon Sep 17 00:00:00 2001 From: Brian Choromanski Date: Tue, 15 Apr 2025 09:50:11 -0400 Subject: [PATCH 27/27] Check that time_pattern interval matcher is not zero (#142630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: AbĂ­lio Costa Co-authored-by: Franck Nijhof --- homeassistant/components/homeassistant/triggers/time_pattern.py | 2 ++ tests/components/homeassistant/triggers/test_time_pattern.py | 1 + 2 files changed, 3 insertions(+) diff --git a/homeassistant/components/homeassistant/triggers/time_pattern.py b/homeassistant/components/homeassistant/triggers/time_pattern.py index df49a79bcb6..14096d87277 100644 --- a/homeassistant/components/homeassistant/triggers/time_pattern.py +++ b/homeassistant/components/homeassistant/triggers/time_pattern.py @@ -37,6 +37,8 @@ class TimePattern: if isinstance(value, str) and value.startswith("/"): number = int(value[1:]) + if number == 0: + raise vol.Invalid(f"must be a value between 1 and {self.maximum}") else: value = number = int(value) diff --git a/tests/components/homeassistant/triggers/test_time_pattern.py b/tests/components/homeassistant/triggers/test_time_pattern.py index ffce8cd476b..2e7fa9dae08 100644 --- a/tests/components/homeassistant/triggers/test_time_pattern.py +++ b/tests/components/homeassistant/triggers/test_time_pattern.py @@ -365,6 +365,7 @@ async def test_invalid_schemas() -> None: {"platform": "time_pattern", "minutes": "/"}, {"platform": "time_pattern", "minutes": "*/5"}, {"platform": "time_pattern", "minutes": "/90"}, + {"platform": "time_pattern", "hours": "/0", "minutes": 10}, {"platform": "time_pattern", "hours": 12, "minutes": 0, "seconds": 100}, )