From e797d651b5327767ac03e93de9c33e3350e5e710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Sun, 24 Aug 2025 18:08:30 +0200 Subject: [PATCH 1/4] Bump letpot to 0.6.2 (#151094) --- homeassistant/components/letpot/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/letpot/manifest.json b/homeassistant/components/letpot/manifest.json index 1397775b351437..26f7588033c32e 100644 --- a/homeassistant/components/letpot/manifest.json +++ b/homeassistant/components/letpot/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_push", "loggers": ["letpot"], "quality_scale": "bronze", - "requirements": ["letpot==0.6.1"] + "requirements": ["letpot==0.6.2"] } diff --git a/requirements_all.txt b/requirements_all.txt index f0498c3c73baf2..18876e55b90f35 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1340,7 +1340,7 @@ led-ble==1.1.7 lektricowifi==0.1 # homeassistant.components.letpot -letpot==0.6.1 +letpot==0.6.2 # homeassistant.components.foscam libpyfoscamcgi==0.0.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 27fcb4d049e9e8..ba1dc3f5e8b599 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1159,7 +1159,7 @@ led-ble==1.1.7 lektricowifi==0.1 # homeassistant.components.letpot -letpot==0.6.1 +letpot==0.6.2 # homeassistant.components.foscam libpyfoscamcgi==0.0.7 From b018465a4d47dbfc2e3c3efb722bd661c48892ff Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sun, 24 Aug 2025 20:07:55 +0200 Subject: [PATCH 2/4] Update togrill to 0.8.0 (#150945) --- homeassistant/components/togrill/event.py | 2 +- .../components/togrill/manifest.json | 2 +- homeassistant/components/togrill/strings.json | 11 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../togrill/snapshots/test_event.ambr | 468 ++++-------------- tests/components/togrill/test_event.py | 17 +- 7 files changed, 135 insertions(+), 369 deletions(-) diff --git a/homeassistant/components/togrill/event.py b/homeassistant/components/togrill/event.py index 241bc2d4e63190..d7d67b464d11f0 100644 --- a/homeassistant/components/togrill/event.py +++ b/homeassistant/components/togrill/event.py @@ -60,4 +60,4 @@ def _handle_event(self, packet: Packet) -> None: if packet.probe != self._probe_number: return - self._trigger_event(slugify(message.name)) + self._trigger_event(message.name.lower()) diff --git a/homeassistant/components/togrill/manifest.json b/homeassistant/components/togrill/manifest.json index 4b833aec4eeec3..fb56b8e3a82de9 100644 --- a/homeassistant/components/togrill/manifest.json +++ b/homeassistant/components/togrill/manifest.json @@ -15,5 +15,5 @@ "iot_class": "local_push", "loggers": ["togrill_bluetooth"], "quality_scale": "bronze", - "requirements": ["togrill-bluetooth==0.7.0"] + "requirements": ["togrill-bluetooth==0.8.0"] } diff --git a/homeassistant/components/togrill/strings.json b/homeassistant/components/togrill/strings.json index 309ac65f54cb40..cef758b7d2e217 100644 --- a/homeassistant/components/togrill/strings.json +++ b/homeassistant/components/togrill/strings.json @@ -55,7 +55,16 @@ "state": { "probe_acknowledge": "Alarm acknowledged", "probe_alarm": "Alarm triggered", - "probe_disconnected": "Probe disconnected" + "probe_disconnected": "Probe disconnected", + "device_low_power": "Device has low battery", + "device_high_temp": "Device has too high temperature", + "probe_below_minimum": "Temperature too low", + "probe_above_maximum": "Temperature too high", + "ignition_failure": "Ignition failure", + "ambient_low_temp": "Ambient temperature too low", + "ambient_over_heat": "Ambient temperature too high", + "ambient_cool_down": "Ambient temperature cooldown", + "probe_timer_alarm": "Timer alarm" } } } diff --git a/requirements_all.txt b/requirements_all.txt index 18876e55b90f35..a41c964a1fb557 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2951,7 +2951,7 @@ tmb==0.0.4 todoist-api-python==2.1.7 # homeassistant.components.togrill -togrill-bluetooth==0.7.0 +togrill-bluetooth==0.8.0 # homeassistant.components.tolo tololib==1.2.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index ba1dc3f5e8b599..921d6d9d1f51c4 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2428,7 +2428,7 @@ tilt-pi==0.2.1 todoist-api-python==2.1.7 # homeassistant.components.togrill -togrill-bluetooth==0.7.0 +togrill-bluetooth==0.8.0 # homeassistant.components.tolo tololib==1.2.2 diff --git a/tests/components/togrill/snapshots/test_event.ambr b/tests/components/togrill/snapshots/test_event.ambr index c0200f82461ab7..99908cd85c210e 100644 --- a/tests/components/togrill/snapshots/test_event.ambr +++ b/tests/components/togrill/snapshots/test_event.ambr @@ -1,364 +1,4 @@ # serializer version: 1 -# name: test_events[0][event.pro_05_probe_1-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_1', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 1', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_1', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[0][event.pro_05_probe_1-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': 'probe_acknowledge', - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 1', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_1', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-10-21T00:00:00.000+00:00', - }) -# --- -# name: test_events[0][event.pro_05_probe_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_2', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 2', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_2', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[0][event.pro_05_probe_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': None, - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 2', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_events[5][event.pro_05_probe_1-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_1', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 1', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_1', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[5][event.pro_05_probe_1-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': 'probe_alarm', - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 1', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_1', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-10-21T00:00:00.000+00:00', - }) -# --- -# name: test_events[5][event.pro_05_probe_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_2', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 2', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_2', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[5][event.pro_05_probe_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': None, - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 2', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_events[6][event.pro_05_probe_1-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_1', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 1', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_1', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[6][event.pro_05_probe_1-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': 'probe_disconnected', - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 1', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_1', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-10-21T00:00:00.000+00:00', - }) -# --- -# name: test_events[6][event.pro_05_probe_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'event', - 'entity_category': None, - 'entity_id': 'event.pro_05_probe_2', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Probe 2', - 'platform': 'togrill', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'event', - 'unique_id': '00000000-0000-0000-0000-000000000001_2', - 'unit_of_measurement': None, - }) -# --- -# name: test_events[6][event.pro_05_probe_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'event_type': None, - 'event_types': list([ - 'probe_acknowledge', - 'probe_alarm', - 'probe_disconnected', - ]), - 'friendly_name': 'Pro-05 Probe 2', - }), - 'context': , - 'entity_id': 'event.pro_05_probe_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- # name: test_setup[no_data][event.pro_05_probe_1-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -367,8 +7,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -406,8 +55,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 1', }), @@ -427,8 +85,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -466,8 +133,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 2', }), @@ -487,8 +163,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -526,8 +211,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 1', }), @@ -547,8 +241,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -586,8 +289,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 2', }), @@ -607,8 +319,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -646,8 +367,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 1', }), @@ -667,8 +397,17 @@ 'capabilities': dict({ 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), }), 'config_entry_id': , @@ -706,8 +445,17 @@ 'event_type': None, 'event_types': list([ 'probe_acknowledge', + 'device_low_power', + 'device_high_temp', + 'probe_below_minimum', + 'probe_above_maximum', 'probe_alarm', 'probe_disconnected', + 'ignition_failure', + 'ambient_low_temp', + 'ambient_over_heat', + 'ambient_cool_down', + 'probe_timer_alarm', ]), 'friendly_name': 'Pro-05 Probe 2', }), diff --git a/tests/components/togrill/test_event.py b/tests/components/togrill/test_event.py index 932e6e93433e99..6aa6019303a124 100644 --- a/tests/components/togrill/test_event.py +++ b/tests/components/togrill/test_event.py @@ -6,9 +6,11 @@ from syrupy.assertion import SnapshotAssertion from togrill_bluetooth.packets import PacketA1Notify, PacketA5Notify -from homeassistant.const import Platform +from homeassistant.components.event import ATTR_EVENT_TYPE +from homeassistant.const import STATE_UNKNOWN, Platform from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er +from homeassistant.util import slugify from . import TOGRILL_SERVICE_INFO, setup_entry @@ -48,7 +50,7 @@ async def test_setup( @pytest.mark.freeze_time("2023-10-21") @pytest.mark.parametrize( "message", - list(PacketA5Notify.Message), + [pytest.param(message, id=message.name) for message in PacketA5Notify.Message], ) async def test_events( hass: HomeAssistant, @@ -56,7 +58,7 @@ async def test_events( snapshot: SnapshotAssertion, mock_entry: MockConfigEntry, mock_client: Mock, - message, + message: PacketA5Notify.Message, ) -> None: """Test all possible events.""" @@ -66,4 +68,11 @@ async def test_events( mock_client.mocked_notify(PacketA5Notify(probe=1, message=message)) - await snapshot_platform(hass, entity_registry, snapshot, mock_entry.entry_id) + state = hass.states.get("event.pro_05_probe_2") + assert state + assert state.state == STATE_UNKNOWN + + state = hass.states.get("event.pro_05_probe_1") + assert state + assert state.state == "2023-10-21T00:00:00.000+00:00" + assert state.attributes.get(ATTR_EVENT_TYPE) == slugify(message.name) From 0dc2a5a02c5a56d2378c76528f89680bd0832be2 Mon Sep 17 00:00:00 2001 From: Christian Fetzer Date: Sun, 24 Aug 2025 21:30:25 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Add=20m=C2=B3/min=20as=20volume=20flow=20ra?= =?UTF-8?q?te=20unit=20(#151051)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homeassistant/components/number/const.py | 2 +- homeassistant/components/sensor/const.py | 2 +- homeassistant/const.py | 1 + homeassistant/util/unit_conversion.py | 2 ++ tests/util/test_unit_conversion.py | 6 ++++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/number/const.py b/homeassistant/components/number/const.py index 76af35adeba167..93fbfac2ebb615 100644 --- a/homeassistant/components/number/const.py +++ b/homeassistant/components/number/const.py @@ -418,7 +418,7 @@ class NumberDeviceClass(StrEnum): """Generic flow rate Unit of measurement: UnitOfVolumeFlowRate - - SI / metric: `m³/h`, `L/min`, `mL/s` + - SI / metric: `m³/h`, `m³/min`, `m³/s`, `L/h`, `L/min`, `L/s`, `mL/s` - USCS / imperial: `ft³/min`, `gal/min` """ diff --git a/homeassistant/components/sensor/const.py b/homeassistant/components/sensor/const.py index e09923ad940587..af35b8127ebeba 100644 --- a/homeassistant/components/sensor/const.py +++ b/homeassistant/components/sensor/const.py @@ -452,7 +452,7 @@ class SensorDeviceClass(StrEnum): """Generic flow rate Unit of measurement: UnitOfVolumeFlowRate - - SI / metric: `m³/h`, `L/min`, `mL/s` + - SI / metric: `m³/h`, `m³/min`, `m³/s`, `L/h`, `L/min`, `L/s`, `mL/s` - USCS / imperial: `ft³/min`, `gal/min` """ diff --git a/homeassistant/const.py b/homeassistant/const.py index 5ec3fb5690326e..16d361a7957e97 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -783,6 +783,7 @@ class UnitOfVolumeFlowRate(StrEnum): """Volume flow rate units.""" CUBIC_METERS_PER_HOUR = "m³/h" + CUBIC_METERS_PER_MINUTE = "m³/min" CUBIC_METERS_PER_SECOND = "m³/s" CUBIC_FEET_PER_MINUTE = "ft³/min" LITERS_PER_HOUR = "L/h" diff --git a/homeassistant/util/unit_conversion.py b/homeassistant/util/unit_conversion.py index ad459e55d1571e..4d6d2365617c2f 100644 --- a/homeassistant/util/unit_conversion.py +++ b/homeassistant/util/unit_conversion.py @@ -769,6 +769,7 @@ class VolumeFlowRateConverter(BaseUnitConverter): # Units in terms of m³/h _UNIT_CONVERSION: dict[str | None, float] = { UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR: 1, + UnitOfVolumeFlowRate.CUBIC_METERS_PER_MINUTE: 1 / _HRS_TO_MINUTES, UnitOfVolumeFlowRate.CUBIC_METERS_PER_SECOND: 1 / _HRS_TO_SECS, UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE: 1 / (_HRS_TO_MINUTES * _CUBIC_FOOT_TO_CUBIC_METER), @@ -784,6 +785,7 @@ class VolumeFlowRateConverter(BaseUnitConverter): VALID_UNITS = { UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE, UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, + UnitOfVolumeFlowRate.CUBIC_METERS_PER_MINUTE, UnitOfVolumeFlowRate.CUBIC_METERS_PER_SECOND, UnitOfVolumeFlowRate.LITERS_PER_HOUR, UnitOfVolumeFlowRate.LITERS_PER_MINUTE, diff --git a/tests/util/test_unit_conversion.py b/tests/util/test_unit_conversion.py index 08fb7cce067eee..d6f9d282174bbe 100644 --- a/tests/util/test_unit_conversion.py +++ b/tests/util/test_unit_conversion.py @@ -947,6 +947,12 @@ 1, UnitOfVolumeFlowRate.LITERS_PER_SECOND, ), + ( + 0.6, + UnitOfVolumeFlowRate.CUBIC_METERS_PER_MINUTE, + 10, + UnitOfVolumeFlowRate.LITERS_PER_SECOND, + ), ], } From 91ef5fb42929f45df8567f69ca6604751bd6d838 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Sun, 24 Aug 2025 22:37:26 +0200 Subject: [PATCH 4/4] modbus: Sensor caused hanging call_later method (#151033) --- homeassistant/components/modbus/sensor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homeassistant/components/modbus/sensor.py b/homeassistant/components/modbus/sensor.py index a11e25b4dd47bd..b78fda022ed301 100644 --- a/homeassistant/components/modbus/sensor.py +++ b/homeassistant/components/modbus/sensor.py @@ -106,7 +106,6 @@ async def async_added_to_hass(self) -> None: async def _async_update(self) -> None: """Update the state of the sensor.""" - self._cancel_call = None raw_result = await self._hub.async_pb_call( self._slave, self._address, self._count, self._input_type )