diff --git a/homeassistant/components/midea/binary_sensor.py b/homeassistant/components/midea/binary_sensor.py index be553eb38a7f..5b85c13e5efa 100644 --- a/homeassistant/components/midea/binary_sensor.py +++ b/homeassistant/components/midea/binary_sensor.py @@ -42,6 +42,12 @@ BINARY_SENSORS: list[BinarySensorEntityDescription] = [ device_class=BinarySensorDeviceClass.PROBLEM, entity_category=EntityCategory.DIAGNOSTIC, ), + BinarySensorEntityDescription( + key="water_pump_running", + translation_key="water_pump_running", + device_class=BinarySensorDeviceClass.RUNNING, + entity_category=EntityCategory.DIAGNOSTIC, + ), BinarySensorEntityDescription( key="filter_cleaning_reminder", translation_key="filter_cleaning_reminder", diff --git a/homeassistant/components/midea/icons.json b/homeassistant/components/midea/icons.json index 5b0e88519d73..1d09a42c062e 100644 --- a/homeassistant/components/midea/icons.json +++ b/homeassistant/components/midea/icons.json @@ -3,6 +3,9 @@ "binary_sensor": { "header_exist": { "default": "mdi:air-filter" + }, + "water_pump_running": { + "default": "mdi:water-pump" } }, "climate": { diff --git a/homeassistant/components/midea/strings.json b/homeassistant/components/midea/strings.json index 9a2f0ccb8c26..5a4fc1867b3d 100644 --- a/homeassistant/components/midea/strings.json +++ b/homeassistant/components/midea/strings.json @@ -147,6 +147,9 @@ }, "tank_full": { "name": "Tank full" + }, + "water_pump_running": { + "name": "Water pump running" } }, "button": { diff --git a/tests/components/midea/snapshots/test_binary_sensor.ambr b/tests/components/midea/snapshots/test_binary_sensor.ambr index 93307d250fab..5d4b49329e92 100644 --- a/tests/components/midea/snapshots/test_binary_sensor.ambr +++ b/tests/components/midea/snapshots/test_binary_sensor.ambr @@ -50,6 +50,57 @@ 'state': 'on', }) # --- +# name: test_all_entities[ac][binary_sensor.air_conditioner_water_pump_running-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.air_conditioner_water_pump_running', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Water pump running', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Water pump running', + 'platform': 'midea', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_pump_running', + 'unique_id': '12345678_water_pump_running', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[ac][binary_sensor.air_conditioner_water_pump_running-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'running', + : 'Air Conditioner Water pump running', + }), + 'context': , + 'entity_id': 'binary_sensor.air_conditioner_water_pump_running', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- # name: test_all_entities[e1][binary_sensor.dishwasher_opening-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/midea/test_binary_sensor.py b/tests/components/midea/test_binary_sensor.py index f3a9c27f6d40..62cd1b5e2686 100644 --- a/tests/components/midea/test_binary_sensor.py +++ b/tests/components/midea/test_binary_sensor.py @@ -39,6 +39,7 @@ def _ac_device() -> DummyDevice: ACAttributes.swing_horizontal: True, ACAttributes.indoor_humidity: 50, ACAttributes.full_dust: True, + ACAttributes.water_pump_running: True, }, )