Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Paulus Schoutsen
e1a56cc96c Document mapping rule 2024-11-11 05:19:25 +00:00
Paulus Schoutsen
97078dcc59 Also split out smoke alarm 2024-11-09 19:10:09 +00:00
Paulus Schoutsen
6709f121d5 Heat alarm test is not a problem 2024-11-09 19:08:37 +00:00
Paulus Schoutsen
42d55e1e99 Specify problem class explicitly instead of catch-all 2024-11-09 19:05:39 +00:00
Paulus Schoutsen
2e60937827 Update link + states 2024-11-09 18:46:39 +00:00
Paulus Schoutsen
a18893f895 Move Z-Wave JS smoke, CO, CO2, Heat, Water problem entities to diagnostic 2024-11-06 03:33:09 +00:00

View file

@ -67,7 +67,10 @@ class PropertyZWaveJSEntityDescription(BinarySensorEntityDescription):
# Mappings for Notification sensors
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json
# https://github.com/zwave-js/specs/blob/master/Registries/Notification%20Command%20Class%2C%20list%20of%20assigned%20Notifications.xlsx
#
# Mapping rules:
# The catch all description should not have a device class and be marked as diagnostic.
NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] = (
NotificationZWaveJSEntityDescription(
# NotificationType 1: Smoke Alarm - State Id's 1 and 2 - Smoke detected
@ -75,10 +78,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
states=("1", "2"),
device_class=BinarySensorDeviceClass.SMOKE,
),
NotificationZWaveJSEntityDescription(
# NotificationType 1: Smoke Alarm - State Id's 4, 5, 7, 8
key=NOTIFICATION_SMOKE_ALARM,
states=("4", "5", "7", "8"),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 1: Smoke Alarm - All other State Id's
key=NOTIFICATION_SMOKE_ALARM,
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 2: Carbon Monoxide - State Id's 1 and 2
@ -86,10 +96,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
states=("1", "2"),
device_class=BinarySensorDeviceClass.CO,
),
NotificationZWaveJSEntityDescription(
# NotificationType 2: Carbon Monoxide - State Id 4, 5, 7
key=NOTIFICATION_CARBON_MONOOXIDE,
states=("4", "5", "7"),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 2: Carbon Monoxide - All other State Id's
key=NOTIFICATION_CARBON_MONOOXIDE,
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 3: Carbon Dioxide - State Id's 1 and 2
@ -97,10 +114,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
states=("1", "2"),
device_class=BinarySensorDeviceClass.GAS,
),
NotificationZWaveJSEntityDescription(
# NotificationType 3: Carbon Dioxide - State Id's 4, 5, 7
key=NOTIFICATION_CARBON_DIOXIDE,
states=("4", "5", "7"),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 3: Carbon Dioxide - All other State Id's
key=NOTIFICATION_CARBON_DIOXIDE,
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 4: Heat - State Id's 1, 2, 5, 6 (heat/underheat)
@ -109,20 +133,34 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
device_class=BinarySensorDeviceClass.HEAT,
),
NotificationZWaveJSEntityDescription(
# NotificationType 4: Heat - All other State Id's
# NotificationType 4: Heat - State ID's 8, A, B
key=NOTIFICATION_HEAT,
states=("8", "10", "11"),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 5: Water - State Id's 1, 2, 3, 4
# NotificationType 4: Heat - All other State Id's
key=NOTIFICATION_HEAT,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 5: Water - State Id's 1, 2, 3, 4, 6, 7, 8, 9, 0A
key=NOTIFICATION_WATER,
states=("1", "2", "3", "4"),
states=("1", "2", "3", "4", "6", "7", "8", "9", "10"),
device_class=BinarySensorDeviceClass.MOISTURE,
),
NotificationZWaveJSEntityDescription(
# NotificationType 5: Water - State Id's B
key=NOTIFICATION_WATER,
states=("11",),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 5: Water - All other State Id's
key=NOTIFICATION_WATER,
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 6: Access Control - State Id's 1, 2, 3, 4 (Lock)
@ -214,16 +252,22 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
device_class=BinarySensorDeviceClass.SOUND,
),
NotificationZWaveJSEntityDescription(
# NotificationType 18: Gas
# NotificationType 18: Gas - State Id's 1, 2, 3, 4
key=NOTIFICATION_GAS,
states=("1", "2", "3", "4"),
device_class=BinarySensorDeviceClass.GAS,
),
NotificationZWaveJSEntityDescription(
# NotificationType 18: Gas
# NotificationType 18: Gas - State Id 6
key=NOTIFICATION_GAS,
states=("6",),
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
),
NotificationZWaveJSEntityDescription(
# NotificationType 18: Gas - All other State Id's
key=NOTIFICATION_GAS,
entity_category=EntityCategory.DIAGNOSTIC,
),
)