Compare commits
6 commits
dev
...
zwavejs-pr
Author | SHA1 | Date | |
---|---|---|---|
|
e1a56cc96c | ||
|
97078dcc59 | ||
|
6709f121d5 | ||
|
42d55e1e99 | ||
|
2e60937827 | ||
|
a18893f895 |
1 changed files with 54 additions and 10 deletions
|
@ -67,7 +67,10 @@ class PropertyZWaveJSEntityDescription(BinarySensorEntityDescription):
|
||||||
|
|
||||||
|
|
||||||
# Mappings for Notification sensors
|
# 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, ...] = (
|
NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] = (
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 1: Smoke Alarm - State Id's 1 and 2 - Smoke detected
|
# NotificationType 1: Smoke Alarm - State Id's 1 and 2 - Smoke detected
|
||||||
|
@ -75,10 +78,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
|
||||||
states=("1", "2"),
|
states=("1", "2"),
|
||||||
device_class=BinarySensorDeviceClass.SMOKE,
|
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(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 1: Smoke Alarm - All other State Id's
|
# NotificationType 1: Smoke Alarm - All other State Id's
|
||||||
key=NOTIFICATION_SMOKE_ALARM,
|
key=NOTIFICATION_SMOKE_ALARM,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 2: Carbon Monoxide - State Id's 1 and 2
|
# NotificationType 2: Carbon Monoxide - State Id's 1 and 2
|
||||||
|
@ -86,10 +96,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
|
||||||
states=("1", "2"),
|
states=("1", "2"),
|
||||||
device_class=BinarySensorDeviceClass.CO,
|
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(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 2: Carbon Monoxide - All other State Id's
|
# NotificationType 2: Carbon Monoxide - All other State Id's
|
||||||
key=NOTIFICATION_CARBON_MONOOXIDE,
|
key=NOTIFICATION_CARBON_MONOOXIDE,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 3: Carbon Dioxide - State Id's 1 and 2
|
# NotificationType 3: Carbon Dioxide - State Id's 1 and 2
|
||||||
|
@ -97,10 +114,17 @@ NOTIFICATION_SENSOR_MAPPINGS: tuple[NotificationZWaveJSEntityDescription, ...] =
|
||||||
states=("1", "2"),
|
states=("1", "2"),
|
||||||
device_class=BinarySensorDeviceClass.GAS,
|
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(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 3: Carbon Dioxide - All other State Id's
|
# NotificationType 3: Carbon Dioxide - All other State Id's
|
||||||
key=NOTIFICATION_CARBON_DIOXIDE,
|
key=NOTIFICATION_CARBON_DIOXIDE,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 4: Heat - State Id's 1, 2, 5, 6 (heat/underheat)
|
# 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,
|
device_class=BinarySensorDeviceClass.HEAT,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 4: Heat - All other State Id's
|
# NotificationType 4: Heat - State ID's 8, A, B
|
||||||
key=NOTIFICATION_HEAT,
|
key=NOTIFICATION_HEAT,
|
||||||
|
states=("8", "10", "11"),
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
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,
|
key=NOTIFICATION_WATER,
|
||||||
states=("1", "2", "3", "4"),
|
states=("1", "2", "3", "4", "6", "7", "8", "9", "10"),
|
||||||
device_class=BinarySensorDeviceClass.MOISTURE,
|
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(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 5: Water - All other State Id's
|
# NotificationType 5: Water - All other State Id's
|
||||||
key=NOTIFICATION_WATER,
|
key=NOTIFICATION_WATER,
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 6: Access Control - State Id's 1, 2, 3, 4 (Lock)
|
# 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,
|
device_class=BinarySensorDeviceClass.SOUND,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 18: Gas
|
# NotificationType 18: Gas - State Id's 1, 2, 3, 4
|
||||||
key=NOTIFICATION_GAS,
|
key=NOTIFICATION_GAS,
|
||||||
states=("1", "2", "3", "4"),
|
states=("1", "2", "3", "4"),
|
||||||
device_class=BinarySensorDeviceClass.GAS,
|
device_class=BinarySensorDeviceClass.GAS,
|
||||||
),
|
),
|
||||||
NotificationZWaveJSEntityDescription(
|
NotificationZWaveJSEntityDescription(
|
||||||
# NotificationType 18: Gas
|
# NotificationType 18: Gas - State Id 6
|
||||||
key=NOTIFICATION_GAS,
|
key=NOTIFICATION_GAS,
|
||||||
states=("6",),
|
states=("6",),
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
),
|
||||||
|
NotificationZWaveJSEntityDescription(
|
||||||
|
# NotificationType 18: Gas - All other State Id's
|
||||||
|
key=NOTIFICATION_GAS,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue