mirror of
https://github.com/home-assistant/core.git
synced 2025-09-09 06:41:33 +02:00
Matter Refrigerator DoorOpen alarm (#150759)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
@@ -396,7 +396,7 @@ DISCOVERY_SCHEMAS = [
|
|||||||
platform=Platform.BINARY_SENSOR,
|
platform=Platform.BINARY_SENSOR,
|
||||||
entity_description=MatterBinarySensorEntityDescription(
|
entity_description=MatterBinarySensorEntityDescription(
|
||||||
key="DishwasherAlarmDoorError",
|
key="DishwasherAlarmDoorError",
|
||||||
translation_key="dishwasher_alarm_door",
|
translation_key="alarm_door",
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
device_to_ha=lambda x: (
|
device_to_ha=lambda x: (
|
||||||
@@ -407,4 +407,19 @@ DISCOVERY_SCHEMAS = [
|
|||||||
required_attributes=(clusters.DishwasherAlarm.Attributes.State,),
|
required_attributes=(clusters.DishwasherAlarm.Attributes.State,),
|
||||||
allow_multi=True,
|
allow_multi=True,
|
||||||
),
|
),
|
||||||
|
MatterDiscoverySchema(
|
||||||
|
platform=Platform.BINARY_SENSOR,
|
||||||
|
entity_description=MatterBinarySensorEntityDescription(
|
||||||
|
key="RefrigeratorAlarmDoorOpen",
|
||||||
|
translation_key="alarm_door",
|
||||||
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
device_to_ha=lambda x: (
|
||||||
|
x == clusters.RefrigeratorAlarm.Bitmaps.AlarmBitmap.kDoorOpen
|
||||||
|
),
|
||||||
|
),
|
||||||
|
entity_class=MatterBinarySensor,
|
||||||
|
required_attributes=(clusters.RefrigeratorAlarm.Attributes.State,),
|
||||||
|
allow_multi=True,
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
@@ -92,7 +92,7 @@
|
|||||||
"dishwasher_alarm_inflow": {
|
"dishwasher_alarm_inflow": {
|
||||||
"name": "Inflow alarm"
|
"name": "Inflow alarm"
|
||||||
},
|
},
|
||||||
"dishwasher_alarm_door": {
|
"alarm_door": {
|
||||||
"name": "Door alarm"
|
"name": "Door alarm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -519,7 +519,7 @@
|
|||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'suggested_object_id': None,
|
'suggested_object_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'dishwasher_alarm_door',
|
'translation_key': 'alarm_door',
|
||||||
'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-DishwasherAlarmDoorError-93-2',
|
'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-DishwasherAlarmDoorError-93-2',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
@@ -587,6 +587,55 @@
|
|||||||
'state': 'off',
|
'state': 'off',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
|
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charger_supply_state-entry]
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': None,
|
||||||
|
'config_entry_id': <ANY>,
|
||||||
|
'config_subentry_id': <ANY>,
|
||||||
|
'device_class': None,
|
||||||
|
'device_id': <ANY>,
|
||||||
|
'disabled_by': None,
|
||||||
|
'domain': 'binary_sensor',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'binary_sensor.evse_charger_supply_state',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Charger supply state',
|
||||||
|
'platform': 'matter',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'evse_supply_state',
|
||||||
|
'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseSupplyStateSensor-153-1',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charger_supply_state-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'device_class': 'running',
|
||||||
|
'friendly_name': 'evse Charger supply state',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'binary_sensor.evse_charger_supply_state',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'on',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charging_status-entry]
|
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charging_status-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
@@ -685,7 +734,7 @@
|
|||||||
'state': 'on',
|
'state': 'on',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charger_supply_state-entry]
|
# name: test_binary_sensors[silabs_refrigerator][binary_sensor.refrigerator_door_alarm-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
}),
|
}),
|
||||||
@@ -697,8 +746,8 @@
|
|||||||
'device_id': <ANY>,
|
'device_id': <ANY>,
|
||||||
'disabled_by': None,
|
'disabled_by': None,
|
||||||
'domain': 'binary_sensor',
|
'domain': 'binary_sensor',
|
||||||
'entity_category': None,
|
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||||
'entity_id': 'binary_sensor.evse_charger_supply_state',
|
'entity_id': 'binary_sensor.refrigerator_door_alarm',
|
||||||
'has_entity_name': True,
|
'has_entity_name': True,
|
||||||
'hidden_by': None,
|
'hidden_by': None,
|
||||||
'icon': None,
|
'icon': None,
|
||||||
@@ -708,30 +757,30 @@
|
|||||||
'name': None,
|
'name': None,
|
||||||
'options': dict({
|
'options': dict({
|
||||||
}),
|
}),
|
||||||
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
|
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
|
||||||
'original_icon': None,
|
'original_icon': None,
|
||||||
'original_name': 'Charger supply state',
|
'original_name': 'Door alarm',
|
||||||
'platform': 'matter',
|
'platform': 'matter',
|
||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'suggested_object_id': None,
|
'suggested_object_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'evse_supply_state',
|
'translation_key': 'alarm_door',
|
||||||
'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseSupplyStateSensor-153-1',
|
'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-1-RefrigeratorAlarmDoorOpen-87-2',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_binary_sensors[silabs_evse_charging][binary_sensor.evse_charger_supply_state-state]
|
# name: test_binary_sensors[silabs_refrigerator][binary_sensor.refrigerator_door_alarm-state]
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'running',
|
'device_class': 'problem',
|
||||||
'friendly_name': 'evse Charger supply state',
|
'friendly_name': 'Refrigerator Door alarm',
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'binary_sensor.evse_charger_supply_state',
|
'entity_id': 'binary_sensor.refrigerator_door_alarm',
|
||||||
'last_changed': <ANY>,
|
'last_changed': <ANY>,
|
||||||
'last_reported': <ANY>,
|
'last_reported': <ANY>,
|
||||||
'last_updated': <ANY>,
|
'last_updated': <ANY>,
|
||||||
'state': 'on',
|
'state': 'off',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_binary_sensors[silabs_water_heater][binary_sensor.water_heater_boost_state-entry]
|
# name: test_binary_sensors[silabs_water_heater][binary_sensor.water_heater_boost_state-entry]
|
||||||
|
Reference in New Issue
Block a user