From be4481ee3cac7d02f6b169720fa7d36d2b471610 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 02:03:58 -0400 Subject: [PATCH 01/14] Add notification types enum --- .../const/command_class/notification.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 964e256c1..d1d42a99e 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -1,4 +1,34 @@ """Constants for the Notification CC.""" from __future__ import annotations +from enum import IntEnum + CC_SPECIFIC_NOTIFICATION_TYPE = "notificationType" + + +class NotificationType(IntEnum): + """Enum with all (known/used) Z-Wave notification types.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SMOKE_ALARM = 1 + CARBON_MONOXIDE_ALARM = 2 + CARBON_DIOXIDE_ALARM = 3 + HEAT_ALARM = 4 + WATER_ALARM = 5 + ACCESS_CONTROL = 6 + HOME_SECURITY = 7 + POWER_MANAGEMENT = 8 + SYSTEM = 9 + EMERGENCY = 10 + CLOCK = 11 + APPLIANCE = 12 + HOME_HEALTH = 13 + SIREN = 14 + WATER_VALVE = 15 + WEATHER_ALARM = 16 + IRRIGATION = 17 + GAS = 18 + PEST_CONTROL = 19 + LIGHT_SENSOR = 20 + WATER_QUALITY_MONITORING = 21 + HOME_MONITORING = 22 From 56724c63e0410778cc06f1d343d9930b46c12a84 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:05:46 -0400 Subject: [PATCH 02/14] Generate notification constants --- scripts/generate_notification_constants.py | 239 +++ .../const/command_class/notification.py | 1396 ++++++++++++++++- 2 files changed, 1618 insertions(+), 17 deletions(-) create mode 100755 scripts/generate_notification_constants.py diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py new file mode 100755 index 000000000..a4b9aef69 --- /dev/null +++ b/scripts/generate_notification_constants.py @@ -0,0 +1,239 @@ +#!/usr/bin/env python3 +"""Script to generate Notification CC constants.""" +from __future__ import annotations + +import json +import pathlib +import re +import subprocess +from collections import defaultdict +from collections.abc import Callable, Mapping + +import requests +from slugify import slugify + +GITHUB_PROJECT = "zwave-js/node-zwave-js" +BRANCH_NAME = "master" +NOTIFICATIONS_FILE_PATH = "packages/config/config/notifications.json" + +CONST_FILE_PATH = pathlib.Path(__file__).parent.joinpath( + "../zwave_js_server/const/command_class/notification.py" +) + + +def remove_comments(text: str) -> str: + """Remove comments from a JSON string.""" + return "\n".join( + line for line in text.split("\n") if not line.strip().startswith("//") + ) + + +def remove_parenthesis(text: str) -> str: + """Remove text in parenthesis from a string.""" + return re.sub(r"\([^)]*\)", "", text) + + +def enum_name_format(name: str, should_remove_parenthesis: bool) -> str: + """Convert sensor/scale name to enum format.""" + if should_remove_parenthesis: + name = remove_parenthesis(name) + return slugify(name, separator="_").upper() + + +def normalize_name(name: str) -> str: + """Convert a sensor/scale name into a normalized name.""" + return enum_name_format(name, True).replace("_", " ").title() + + +def format_for_class_name(name: str) -> str: + """Convert sensor/scale name to class name format.""" + return normalize_name(name).replace(" ", "") + + +notifications_file = json.loads( + remove_comments( + requests.get( + ( + f"https://raw.githubusercontent.com/{GITHUB_PROJECT}/{BRANCH_NAME}/" + f"{NOTIFICATIONS_FILE_PATH}" + ), + timeout=10, + ).text + ) +) + +notifications = {} +for notification_type, notification_payload in notifications_file.items(): + notification_type = int(notification_type, 16) + notification_name = notification_payload["name"].title() + notifications[notification_name] = { + "type": notification_type, + "variables": {}, + "events": {}, + } + for variable in notification_payload.get("variables", []): + variable_name = variable["name"].title() + states = notifications[notification_name]["variables"].setdefault( + variable_name, {} + ) + for state_id, state_props in variable["states"].items(): + state_id = int(state_id, 16) + state_name = state_props["label"].title() + states[state_name] = state_id + for event_id, event_data in notification_payload.get("events", {}).items(): + event_id = int(event_id, 16) + notifications[notification_name]["events"][ + event_data["label"].title() + ] = event_id + + +notifications = dict(sorted(notifications.items(), key=lambda kv: kv[0])) + + +def generate_int_enum_class_definition( + class_name: str, + enum_map: Mapping[str, int | str | dict], + enum_ref_url: str | None = None, + get_id_func: Callable | None = None, + docstring_info: str = "", + base_class: str = "IntEnum", +) -> list[str]: + """Generate an IntEnum class definition as an array of lines of string.""" + class_def: list[str] = [] + class_def.append(f"class {class_name}({base_class}):") + docstring = f'"""Enum for known {docstring_info} for Notification CC."""'.replace( + " ", " " + ) + class_def.append(f" {docstring}") + if enum_ref_url: + class_def.append(f" # {enum_ref_url}") + for enum_name, enum_id in sorted(enum_map.items(), key=lambda x: x[0]): + if get_id_func: + enum_id = get_id_func(enum_id) + class_def.append(f" {enum_name_format(enum_name, False)} = {enum_id}") + return class_def + + +def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: + """Generate an IntEnum base class definition.""" + class_def: list[str] = [] + class_def.append(f"class {class_name}(IntEnum):") + class_def.append(f"\t{docstring}") + return class_def + + +NOTIFICATIONS_URL = ( + f"https://github.com/{GITHUB_PROJECT}/blob/{BRANCH_NAME}/{NOTIFICATIONS_FILE_PATH}" +) + +lines = [ + '"""Constants for the Notification CC."""', + "", + "# ----------------------------------------------------------------------------------- #", + "# **BEGINNING OF AUTOGENERATED CONTENT** (TO ADD ADDITIONAL MANUAL CONTENT, LOOK FOR #", + '# THE "END OF AUTOGENERATED CONTENT" COMMENT BLOCK AND ADD YOUR CODE BELOW IT) #', + "# ----------------------------------------------------------------------------------- #", + "", + "from __future__ import annotations", + "", + "from enum import IntEnum", + 'CC_SPECIFIC_NOTIFICATION_TYPE = "notificationType"', +] + +lines.extend( + generate_int_enum_class_definition( + "NotificationType", + notifications, + NOTIFICATIONS_URL, + get_id_func=lambda x: x["type"], + docstring_info="notification types", + ) +) + +lines.extend( + generate_int_enum_base_class( + "NotificationEvent", + docstring='"""Common base class for Notification CC states enums."""', + ) +) + +_notification_type_to_enum_map = defaultdict(list) +for notification_type, state_variable_map in notifications.items(): + for state_variable_name, state_variable_dict in state_variable_map[ + "variables" + ].items(): + name = f"{notification_type} {state_variable_name} Notification Event" + lines.extend( + generate_int_enum_class_definition( + format_for_class_name(name), + {**state_variable_dict, **state_variable_map["events"]}, + NOTIFICATIONS_URL, + docstring_info=name.lower(), + base_class="NotificationEvent", + ) + ) + _notification_type_to_enum_map[notification_type].append( + format_for_class_name(name) + ) +notification_type_to_enum_map = dict( + sorted(_notification_type_to_enum_map.items(), key=lambda kv: kv[0]) +) +for unit_name, enum_list in notification_type_to_enum_map.items(): + notification_type_to_enum_map[unit_name] = sorted(enum_list) + + +notification_type_to_event_map_line = ( + "NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, " + "type[NotificationEvent]] = {" +) +for notification_type, notification_events in notification_type_to_enum_map.items(): + notification_type_to_event_map_line += ( + f" NotificationType.{enum_name_format(notification_type, False)}: {{" + ) + for notification_event in notification_events: + notification_type_to_event_map_line += f"{notification_event}," + notification_type_to_event_map_line += "}," +notification_type_to_event_map_line += "}" +lines.append(notification_type_to_event_map_line) +lines.append("") + +lines.extend( + [ + "", + "# ----------------------------------------------------------------------------------- #", + "# **END OF AUTOGENERATED CONTENT** (DO NOT EDIT/REMOVE THIS COMMENT BLOCK AND DO NOT #", + "# EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, UPDATE THE LINES AROUND 135 #", + "# IN scripts/generate_multilevel_sensor_constants.py THEN RE-RUN THE SCRIPT. ALL #", + "# LINES WRITTEN BELOW THIS BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) #", + "# ----------------------------------------------------------------------------------- #", + "", + ] +) + +existing_const_file = CONST_FILE_PATH.read_text(encoding="utf-8").splitlines() + +manually_written_code_start_idx = ( + next( + i + for i, line in enumerate(existing_const_file) + if "**END OF AUTOGENERATED CONTENT**" in line + ) + + 6 +) +if len(existing_const_file) > manually_written_code_start_idx: + lines.extend( + [ + line.strip("\n") + for line in existing_const_file[manually_written_code_start_idx:] + ] + ) + +CONST_FILE_PATH.write_text("\n".join(lines), encoding="utf-8") + +if subprocess.run(["which", "black"], capture_output=True, check=True).stdout: + subprocess.run( + ["black", CONST_FILE_PATH], + check=True, + ) +else: + print("Could not run black on new file, please run it to properly format it.") diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index d1d42a99e..9454608be 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -1,4 +1,10 @@ """Constants for the Notification CC.""" + +# ----------------------------------------------------------------------------------- # +# **BEGINNING OF AUTOGENERATED CONTENT** (TO ADD ADDITIONAL MANUAL CONTENT, LOOK FOR # +# THE "END OF AUTOGENERATED CONTENT" COMMENT BLOCK AND ADD YOUR CODE BELOW IT) # +# ----------------------------------------------------------------------------------- # + from __future__ import annotations from enum import IntEnum @@ -7,28 +13,1384 @@ class NotificationType(IntEnum): - """Enum with all (known/used) Z-Wave notification types.""" + """Enum for known notification types for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - SMOKE_ALARM = 1 - CARBON_MONOXIDE_ALARM = 2 - CARBON_DIOXIDE_ALARM = 3 - HEAT_ALARM = 4 - WATER_ALARM = 5 ACCESS_CONTROL = 6 - HOME_SECURITY = 7 - POWER_MANAGEMENT = 8 - SYSTEM = 9 - EMERGENCY = 10 - CLOCK = 11 APPLIANCE = 12 + CLOCK = 11 + CO_ALARM = 2 + CO2_ALARM = 3 + GAS_ALARM = 18 + HEAT_ALARM = 4 HOME_HEALTH = 13 - SIREN = 14 - WATER_VALVE = 15 - WEATHER_ALARM = 16 + HOME_MONITORING = 22 + HOME_SECURITY = 7 IRRIGATION = 17 - GAS = 18 - PEST_CONTROL = 19 LIGHT_SENSOR = 20 + PEST_CONTROL = 19 + POWER_MANAGEMENT = 8 + SIREN = 14 + SMOKE_ALARM = 1 + SYSTEM = 10 + WATER_ALARM = 5 WATER_QUALITY_MONITORING = 21 - HOME_MONITORING = 22 + WATER_VALVE = 15 + WEATHER_ALARM = 16 + + +class NotificationEvent(IntEnum): + """Common base class for Notification CC states enums.""" + + +class AccessControlLockStateNotificationEvent(NotificationEvent): + """Enum for known access control lock state notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_JAMMED = 11 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlKeypadStateNotificationEvent(NotificationEvent): + """Enum for known access control keypad state notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_BUSY = 17 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_TEMPORARY_DISABLED = 16 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlDoorStateNotificationEvent(NotificationEvent): + """Enum for known access control door state notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + WINDOW_DOOR_IS_CLOSED = 23 + WINDOW_DOOR_IS_OPEN = 22 + + +class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): + """Enum for known access control door handle state notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + WINDOW_DOOR_HANDLE_IS_CLOSED = 25 + WINDOW_DOOR_HANDLE_IS_OPEN = 24 + + +class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent( + NotificationEvent +): + """Enum for known access control barrier performing initialization process status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_PERFORMING_INITIALIZATION_PROCESS = 64 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier ul disabling status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + BARRIER_UNATTENDED_OPERATION_HAS_BEEN_DISABLED_PER_UL_REQUIREMENTS = 69 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier vacation mode status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + BARRIER_VACATION_MODE = 71 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier safety beam obstacle status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_SAFETY_BEAM_OBSTACLE = 72 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_SENSOR_NOT_DETECTED_SUPERVISORY_ERROR = 73 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier battery status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_SENSOR_LOW_BATTERY_WARNING = 74 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier short-circuit status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_DETECTED_SHORT_IN_WALL_STATION_WIRES = 75 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): + """Enum for known access control barrier control status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALL_USER_CODES_DELETED = 12 + AUTO_LOCK_LOCKED_OPERATION = 9 + AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_ASSOCIATED_WITH_NON_Z_WAVE_REMOTE_CONTROL = 76 + BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 + BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 + BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 + BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 + BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + KEYPAD_LOCK_OPERATION = 5 + KEYPAD_UNLOCK_OPERATION = 6 + LOCK_OPERATION_WITH_USER_CODE = 33 + LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 + MANUAL_LOCK_OPERATION = 1 + MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 + MANUAL_UNLOCK_OPERATION = 2 + MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 + MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 + NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 + NEW_USER_CODE_ADDED = 14 + NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 + + +class ApplianceProgramStatusNotificationEvent(NotificationEvent): + """Enum for known appliance program status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + PROGRAM_COMPLETED = 3 + PROGRAM_IN_PROGRESS = 2 + PROGRAM_STARTED = 1 + + +class ApplianceMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known appliance maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACE_MAIN_FILTER = 4 + + +class ApplianceApplianceStatusNotificationEvent(NotificationEvent): + """Enum for known appliance appliance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BOILING = 8 + DRAINING = 14 + DRYING = 18 + RINSING = 12 + SPINNING = 16 + SUPPLYING_WATER = 6 + WASHING = 10 + + +class ApplianceTargetTemperatureFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance target temperature failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FAILURE_TO_SET_TARGET_TEMPERATURE = 5 + + +class ApplianceWaterSupplyFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance water supply failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_SUPPLY_FAILURE = 7 + + +class ApplianceBoilingFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance boiling failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BOILING_FAILURE = 9 + + +class ApplianceWashingFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance washing failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WASHING_FAILURE = 11 + + +class ApplianceRinsingFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance rinsing failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + RINSING_FAILURE = 13 + + +class ApplianceDrainingFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance draining failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + DRAINING_FAILURE = 15 + + +class ApplianceSpinningFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance spinning failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SPINNING_FAILURE = 17 + + +class ApplianceDryingFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance drying failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + DRYING_FAILURE = 19 + + +class ApplianceFanFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance fan failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FAN_FAILURE = 20 + + +class ApplianceCompressorFailureStatusNotificationEvent(NotificationEvent): + """Enum for known appliance compressor failure status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + COMPRESSOR_FAILURE = 21 + + +class CoAlarmSensorStatusNotificationEvent(NotificationEvent): + """Enum for known co alarm sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CARBON_MONOXIDE_DETECTED = 2 + CARBON_MONOXIDE_DETECTED_LOCATION_PROVIDED = 1 + + +class CoAlarmTestStatusNotificationEvent(NotificationEvent): + """Enum for known co alarm test status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CARBON_MONOXIDE_TEST = 3 + + +class CoAlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known co alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACEMENT_REQUIRED = 4 + REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + + +class CoAlarmAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known co alarm alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALARM_SILENCED = 6 + + +class CoAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): + """Enum for known co alarm periodic inspection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + + +class Co2AlarmSensorStatusNotificationEvent(NotificationEvent): + """Enum for known co2 alarm sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CARBON_DIOXIDE_DETECTED = 2 + CARBON_DIOXIDE_DETECTED_LOCATION_PROVIDED = 1 + + +class Co2AlarmTestStatusNotificationEvent(NotificationEvent): + """Enum for known co2 alarm test status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CARBON_DIOXIDE_TEST = 3 + + +class Co2AlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known co2 alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACEMENT_REQUIRED = 4 + REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + + +class Co2AlarmAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known co2 alarm alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALARM_SILENCED = 6 + + +class Co2AlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): + """Enum for known co2 alarm periodic inspection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + + +class GasAlarmCombustibleGasStatusNotificationEvent(NotificationEvent): + """Enum for known gas alarm combustible gas status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + COMBUSTIBLE_GAS_DETECTED = 2 + COMBUSTIBLE_GAS_DETECTED_LOCATION_PROVIDED = 1 + + +class GasAlarmToxicGasStatusNotificationEvent(NotificationEvent): + """Enum for known gas alarm toxic gas status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + TOXIC_GAS_DETECTED = 4 + TOXIC_GAS_DETECTED_LOCATION_PROVIDED = 3 + + +class GasAlarmAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known gas alarm alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + GAS_ALARM_TEST = 5 + + +class GasAlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known gas alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACEMENT_REQUIRED = 6 + + +class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): + """Enum for known heat alarm heat sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + OVERHEAT_DETECTED = 2 + OVERHEAT_DETECTED_LOCATION_PROVIDED = 1 + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + UNDERHEAT_DETECTED = 6 + UNDERHEAT_DETECTED_LOCATION_PROVIDED = 5 + + +class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known heat alarm alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALARM_SILENCED = 9 + HEAT_ALARM_TEST = 7 + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + + +class HeatAlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known heat alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + REPLACEMENT_REQUIRED_END_OF_LIFE = 8 + + +class HeatAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): + """Enum for known heat alarm periodic inspection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 11 + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + + +class HeatAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): + """Enum for known heat alarm dust in device status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 10 + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + + +class HomeHealthPositionStatusNotificationEvent(NotificationEvent): + """Enum for known home health position status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FALL_DETECTED = 12 + LEAVING_BED = 1 + LYING_ON_BED = 3 + POSTURE_CHANGED = 4 + SITTING_ON_BED = 2 + SITTING_ON_BED_EDGE = 5 + + +class HomeHealthVocLevelStatusNotificationEvent(NotificationEvent): + """Enum for known home health voc level status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FALL_DETECTED = 12 + POSTURE_CHANGED = 4 + VOLATILE_ORGANIC_COMPOUND_LEVEL = 6 + + +class HomeHealthSleepApneaStatusNotificationEvent(NotificationEvent): + """Enum for known home health sleep apnea status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FALL_DETECTED = 12 + POSTURE_CHANGED = 4 + SLEEP_APNEA_DETECTED = 7 + + +class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): + """Enum for known home health sleep stage status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FALL_DETECTED = 12 + POSTURE_CHANGED = 4 + SLEEP_STAGE_0_DETECTED_DREAMING_REM = 8 + SLEEP_STAGE_1_DETECTED_LIGHT_SLEEP_NON_REM_1 = 9 + SLEEP_STAGE_2_DETECTED_MEDIUM_SLEEP_NON_REM_2 = 10 + SLEEP_STAGE_3_DETECTED_DEEP_SLEEP_NON_REM_3 = 11 + + +class HomeMonitoringHomeOccupancyStatusNotificationEvent(NotificationEvent): + """Enum for known home monitoring home occupancy status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + HOME_OCCUPIED = 2 + HOME_OCCUPIED_LOCATION_PROVIDED = 1 + + +class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): + """Enum for known home security sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + GLASS_BREAKAGE = 6 + GLASS_BREAKAGE_LOCATION_PROVIDED = 5 + IMPACT_DETECTED = 10 + INTRUSION = 2 + INTRUSION_LOCATION_PROVIDED = 1 + RF_JAMMING_DETECTED = 12 + TAMPERING_INVALID_CODE = 4 + TAMPERING_PRODUCT_MOVED = 9 + + +class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): + """Enum for known home security cover status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + GLASS_BREAKAGE = 6 + GLASS_BREAKAGE_LOCATION_PROVIDED = 5 + IMPACT_DETECTED = 10 + RF_JAMMING_DETECTED = 12 + TAMPERING_INVALID_CODE = 4 + TAMPERING_PRODUCT_COVER_REMOVED = 3 + TAMPERING_PRODUCT_MOVED = 9 + + +class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): + """Enum for known home security motion sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + GLASS_BREAKAGE = 6 + GLASS_BREAKAGE_LOCATION_PROVIDED = 5 + IMPACT_DETECTED = 10 + MOTION_DETECTION = 8 + MOTION_DETECTION_LOCATION_PROVIDED = 7 + RF_JAMMING_DETECTED = 12 + TAMPERING_INVALID_CODE = 4 + TAMPERING_PRODUCT_MOVED = 9 + + +class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent): + """Enum for known home security magnetic interference status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + GLASS_BREAKAGE = 6 + GLASS_BREAKAGE_LOCATION_PROVIDED = 5 + IMPACT_DETECTED = 10 + MAGNETIC_FIELD_INTERFERENCE_DETECTED = 11 + RF_JAMMING_DETECTED = 12 + TAMPERING_INVALID_CODE = 4 + TAMPERING_PRODUCT_MOVED = 9 + + +class IrrigationScheduleStatusNotificationEvent(NotificationEvent): + """Enum for known irrigation schedule (id) status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SCHEDULE_FINISHED = 2 + SCHEDULE_STARTED = 1 + + +class IrrigationValveRunStatusNotificationEvent(NotificationEvent): + """Enum for known irrigation valve (id) run status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + VALVE_TABLE_RUN_FINISHED = 4 + VALVE_TABLE_RUN_STARTED = 3 + + +class IrrigationDeviceConfigurationStatusNotificationEvent(NotificationEvent): + """Enum for known irrigation device configuration status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + DEVICE_IS_NOT_CONFIGURED = 5 + + +class LightSensorLightDetectionStatusNotificationEvent(NotificationEvent): + """Enum for known light sensor light detection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + LIGHT_COLOR_TRANSITION_DETECTED = 2 + LIGHT_DETECTED = 1 + + +class PestControlTrapStatusNotificationEvent(NotificationEvent): + """Enum for known pest control trap status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + PEST_DETECTED = 6 + PEST_DETECTED_LOCATION_PROVIDED = 5 + PEST_EXTERMINATED = 8 + PEST_EXTERMINATED_LOCATION_PROVIDED = 7 + TRAP_ARMED = 2 + TRAP_ARMED_LOCATION_PROVIDED = 1 + TRAP_RE_ARM_REQUIRED = 4 + TRAP_RE_ARM_REQUIRED_LOCATION_PROVIDED = 3 + + +class PowerManagementPowerStatusNotificationEvent(NotificationEvent): + """Enum for known power management power status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + POWER_HAS_BEEN_APPLIED = 1 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementMainsStatusNotificationEvent(NotificationEvent): + """Enum for known power management mains status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + AC_MAINS_DISCONNECTED = 2 + AC_MAINS_RE_CONNECTED = 3 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementOverCurrentStatusNotificationEvent(NotificationEvent): + """Enum for known power management over-current status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + OVER_CURRENT_DETECTED = 6 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementOverVoltageStatusNotificationEvent(NotificationEvent): + """Enum for known power management over-voltage status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + OVER_VOLTAGE_DETECTED = 7 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementOverLoadStatusNotificationEvent(NotificationEvent): + """Enum for known power management over-load status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + OVER_LOAD_DETECTED = 8 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementLoadErrorStatusNotificationEvent(NotificationEvent): + """Enum for known power management load error status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + LOAD_ERROR = 9 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementBatteryMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known power management battery maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BATTERY_FLUID_IS_LOW = 17 + REPLACE_BATTERY_NOW = 11 + REPLACE_BATTERY_SOON = 10 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementBatteryLoadStatusNotificationEvent(NotificationEvent): + """Enum for known power management battery load status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BATTERY_IS_CHARGING = 12 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementBatteryLevelStatusNotificationEvent(NotificationEvent): + """Enum for known power management battery level status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BATTERY_IS_FULLY_CHARGED = 13 + CHARGE_BATTERY_NOW = 15 + CHARGE_BATTERY_SOON = 14 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class PowerManagementBackupBatteryLevelStatusNotificationEvent(NotificationEvent): + """Enum for known power management backup battery level status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + BACK_UP_BATTERY_DISCONNECTED = 18 + BACK_UP_BATTERY_IS_LOW = 16 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 + + +class SirenSirenStatusNotificationEvent(NotificationEvent): + """Enum for known siren siren status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SIREN_ACTIVE = 1 + + +class SmokeAlarmSensorStatusNotificationEvent(NotificationEvent): + """Enum for known smoke alarm sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SMOKE_DETECTED = 2 + SMOKE_DETECTED_LOCATION_PROVIDED = 1 + + +class SmokeAlarmAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known smoke alarm alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ALARM_SILENCED = 6 + SMOKE_ALARM_TEST = 3 + + +class SmokeAlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known smoke alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACEMENT_REQUIRED = 4 + REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + + +class SmokeAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): + """Enum for known smoke alarm periodic inspection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + + +class SmokeAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): + """Enum for known smoke alarm dust in device status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 8 + + +class WaterAlarmSensorStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_LEAK_DETECTED = 2 + WATER_LEAK_DETECTED_LOCATION_PROVIDED = 1 + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + + +class WaterAlarmMaintenanceStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm maintenance status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + REPLACE_WATER_FILTER = 5 + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + + +class WaterAlarmWaterFlowAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm water flow alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_FLOW_ALARM = 6 + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + + +class WaterAlarmWaterPressureAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm water pressure alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + WATER_PRESSURE_ALARM = 7 + + +class WaterAlarmWaterTemperatureAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm water temperature alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + WATER_TEMPERATURE_ALARM = 8 + + +class WaterAlarmWaterLevelAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm water level alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_LEVEL_ALARM = 9 + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + + +class WaterAlarmPumpStatusNotificationEvent(NotificationEvent): + """Enum for known water alarm pump status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + SUMP_PUMP_ACTIVE = 10 + SUMP_PUMP_FAILURE = 11 + WATER_LEVEL_DROPPED = 4 + WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + + +class WaterQualityMonitoringChlorineAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring chlorine alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CHLORINE_ALARM = 1 + + +class WaterQualityMonitoringAcidityStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring acidity (ph) status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ACIDITY_PH_ALARM = 2 + + +class WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent( + NotificationEvent +): + """Enum for known water quality monitoring water oxidation alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_OXIDATION_ALARM = 3 + + +class WaterQualityMonitoringChlorineSensorStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring chlorine sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + CHLORINE_EMPTY = 4 + + +class WaterQualityMonitoringAciditySensorStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring acidity (ph) sensor status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + ACIDITY_PH_EMPTY = 5 + + +class WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent( + NotificationEvent +): + """Enum for known water quality monitoring waterflow measuring station sensor notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATERFLOW_MEASURING_STATION_SHORTAGE_DETECTED = 6 + + +class WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent( + NotificationEvent +): + """Enum for known water quality monitoring waterflow clear water sensor notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATERFLOW_CLEAR_WATER_SHORTAGE_DETECTED = 7 + + +class WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent( + NotificationEvent +): + """Enum for known water quality monitoring disinfection system status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + DISINFECTION_SYSTEM_ERROR_DETECTED = 8 + + +class WaterQualityMonitoringFilterCleaningStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring filter cleaning status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FILTER_CLEANING_ONGOING = 9 + + +class WaterQualityMonitoringHeatingStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring heating status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + HEATING_OPERATION_ONGOING = 10 + + +class WaterQualityMonitoringFilterPumpStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring filter pump status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FILTER_PUMP_OPERATION_ONGOING = 11 + + +class WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring freshwater flow status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FRESHWATER_OPERATION_ONGOING = 12 + + +class WaterQualityMonitoringDryProtectionStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring dry protection status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + DRY_PROTECTION_OPERATION_ACTIVE = 13 + + +class WaterQualityMonitoringWaterTankStatusNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring water tank status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + WATER_TANK_IS_EMPTY = 14 + WATER_TANK_IS_FULL = 16 + WATER_TANK_LEVEL_IS_UNKNOWN = 15 + + +class WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent( + NotificationEvent +): + """Enum for known water quality monitoring collective disorder status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + COLLECTIVE_DISORDER = 17 + + +class WaterValveValveOperationStatusNotificationEvent(NotificationEvent): + """Enum for known water valve valve operation status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + VALVE_OPERATION = 1 + + +class WaterValveMasterValveOperationStatusNotificationEvent(NotificationEvent): + """Enum for known water valve master valve operation status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MASTER_VALVE_OPERATION = 2 + + +class WaterValveValveShortCircuitStatusNotificationEvent(NotificationEvent): + """Enum for known water valve valve short circuit status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + VALVE_SHORT_CIRCUIT = 3 + + +class WaterValveMasterValveShortCircuitStatusNotificationEvent(NotificationEvent): + """Enum for known water valve master valve short circuit status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MASTER_VALVE_SHORT_CIRCUIT = 4 + + +class WaterValveValveCurrentAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water valve valve current alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + VALVE_CURRENT_ALARM = 5 + + +class WaterValveMasterValveCurrentAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known water valve master valve current alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MASTER_VALVE_CURRENT_ALARM = 6 + + +class WeatherAlarmRainAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known weather alarm rain alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + RAIN_ALARM = 1 + + +class WeatherAlarmMoistureAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known weather alarm moisture alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + MOISTURE_ALARM = 2 + + +class WeatherAlarmFreezeAlarmStatusNotificationEvent(NotificationEvent): + """Enum for known weather alarm freeze alarm status notification event for Notification CC.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + FREEZE_ALARM = 3 + + +NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, type[NotificationEvent]] = { + NotificationType.ACCESS_CONTROL: { + AccessControlBarrierBatteryStatusNotificationEvent, + AccessControlBarrierControlStatusNotificationEvent, + AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent, + AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent, + AccessControlBarrierSensorStatusNotificationEvent, + AccessControlBarrierShortCircuitStatusNotificationEvent, + AccessControlBarrierUlDisablingStatusNotificationEvent, + AccessControlBarrierVacationModeStatusNotificationEvent, + AccessControlDoorHandleStateNotificationEvent, + AccessControlDoorStateNotificationEvent, + AccessControlKeypadStateNotificationEvent, + AccessControlLockStateNotificationEvent, + }, + NotificationType.APPLIANCE: { + ApplianceApplianceStatusNotificationEvent, + ApplianceBoilingFailureStatusNotificationEvent, + ApplianceCompressorFailureStatusNotificationEvent, + ApplianceDrainingFailureStatusNotificationEvent, + ApplianceDryingFailureStatusNotificationEvent, + ApplianceFanFailureStatusNotificationEvent, + ApplianceMaintenanceStatusNotificationEvent, + ApplianceProgramStatusNotificationEvent, + ApplianceRinsingFailureStatusNotificationEvent, + ApplianceSpinningFailureStatusNotificationEvent, + ApplianceTargetTemperatureFailureStatusNotificationEvent, + ApplianceWashingFailureStatusNotificationEvent, + ApplianceWaterSupplyFailureStatusNotificationEvent, + }, + NotificationType.CO_ALARM: { + CoAlarmAlarmStatusNotificationEvent, + CoAlarmMaintenanceStatusNotificationEvent, + CoAlarmPeriodicInspectionStatusNotificationEvent, + CoAlarmSensorStatusNotificationEvent, + CoAlarmTestStatusNotificationEvent, + }, + NotificationType.CO2_ALARM: { + Co2AlarmAlarmStatusNotificationEvent, + Co2AlarmMaintenanceStatusNotificationEvent, + Co2AlarmPeriodicInspectionStatusNotificationEvent, + Co2AlarmSensorStatusNotificationEvent, + Co2AlarmTestStatusNotificationEvent, + }, + NotificationType.GAS_ALARM: { + GasAlarmAlarmStatusNotificationEvent, + GasAlarmCombustibleGasStatusNotificationEvent, + GasAlarmMaintenanceStatusNotificationEvent, + GasAlarmToxicGasStatusNotificationEvent, + }, + NotificationType.HEAT_ALARM: { + HeatAlarmAlarmStatusNotificationEvent, + HeatAlarmDustInDeviceStatusNotificationEvent, + HeatAlarmHeatSensorStatusNotificationEvent, + HeatAlarmMaintenanceStatusNotificationEvent, + HeatAlarmPeriodicInspectionStatusNotificationEvent, + }, + NotificationType.HOME_HEALTH: { + HomeHealthPositionStatusNotificationEvent, + HomeHealthSleepApneaStatusNotificationEvent, + HomeHealthSleepStageStatusNotificationEvent, + HomeHealthVocLevelStatusNotificationEvent, + }, + NotificationType.HOME_MONITORING: { + HomeMonitoringHomeOccupancyStatusNotificationEvent, + }, + NotificationType.HOME_SECURITY: { + HomeSecurityCoverStatusNotificationEvent, + HomeSecurityMagneticInterferenceStatusNotificationEvent, + HomeSecurityMotionSensorStatusNotificationEvent, + HomeSecuritySensorStatusNotificationEvent, + }, + NotificationType.IRRIGATION: { + IrrigationDeviceConfigurationStatusNotificationEvent, + IrrigationScheduleStatusNotificationEvent, + IrrigationValveRunStatusNotificationEvent, + }, + NotificationType.LIGHT_SENSOR: { + LightSensorLightDetectionStatusNotificationEvent, + }, + NotificationType.PEST_CONTROL: { + PestControlTrapStatusNotificationEvent, + }, + NotificationType.POWER_MANAGEMENT: { + PowerManagementBackupBatteryLevelStatusNotificationEvent, + PowerManagementBatteryLevelStatusNotificationEvent, + PowerManagementBatteryLoadStatusNotificationEvent, + PowerManagementBatteryMaintenanceStatusNotificationEvent, + PowerManagementLoadErrorStatusNotificationEvent, + PowerManagementMainsStatusNotificationEvent, + PowerManagementOverCurrentStatusNotificationEvent, + PowerManagementOverLoadStatusNotificationEvent, + PowerManagementOverVoltageStatusNotificationEvent, + PowerManagementPowerStatusNotificationEvent, + }, + NotificationType.SIREN: { + SirenSirenStatusNotificationEvent, + }, + NotificationType.SMOKE_ALARM: { + SmokeAlarmAlarmStatusNotificationEvent, + SmokeAlarmDustInDeviceStatusNotificationEvent, + SmokeAlarmMaintenanceStatusNotificationEvent, + SmokeAlarmPeriodicInspectionStatusNotificationEvent, + SmokeAlarmSensorStatusNotificationEvent, + }, + NotificationType.WATER_ALARM: { + WaterAlarmMaintenanceStatusNotificationEvent, + WaterAlarmPumpStatusNotificationEvent, + WaterAlarmSensorStatusNotificationEvent, + WaterAlarmWaterFlowAlarmStatusNotificationEvent, + WaterAlarmWaterLevelAlarmStatusNotificationEvent, + WaterAlarmWaterPressureAlarmStatusNotificationEvent, + WaterAlarmWaterTemperatureAlarmStatusNotificationEvent, + }, + NotificationType.WATER_QUALITY_MONITORING: { + WaterQualityMonitoringAciditySensorStatusNotificationEvent, + WaterQualityMonitoringAcidityStatusNotificationEvent, + WaterQualityMonitoringChlorineAlarmStatusNotificationEvent, + WaterQualityMonitoringChlorineSensorStatusNotificationEvent, + WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent, + WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent, + WaterQualityMonitoringDryProtectionStatusNotificationEvent, + WaterQualityMonitoringFilterCleaningStatusNotificationEvent, + WaterQualityMonitoringFilterPumpStatusNotificationEvent, + WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent, + WaterQualityMonitoringHeatingStatusNotificationEvent, + WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent, + WaterQualityMonitoringWaterTankStatusNotificationEvent, + WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent, + WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent, + }, + NotificationType.WATER_VALVE: { + WaterValveMasterValveCurrentAlarmStatusNotificationEvent, + WaterValveMasterValveOperationStatusNotificationEvent, + WaterValveMasterValveShortCircuitStatusNotificationEvent, + WaterValveValveCurrentAlarmStatusNotificationEvent, + WaterValveValveOperationStatusNotificationEvent, + WaterValveValveShortCircuitStatusNotificationEvent, + }, + NotificationType.WEATHER_ALARM: { + WeatherAlarmFreezeAlarmStatusNotificationEvent, + WeatherAlarmMoistureAlarmStatusNotificationEvent, + WeatherAlarmRainAlarmStatusNotificationEvent, + }, +} + + +# ----------------------------------------------------------------------------------- # +# **END OF AUTOGENERATED CONTENT** (DO NOT EDIT/REMOVE THIS COMMENT BLOCK AND DO NOT # +# EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, UPDATE THE LINES AROUND 135 # +# IN scripts/generate_multilevel_sensor_constants.py THEN RE-RUN THE SCRIPT. ALL # +# LINES WRITTEN BELOW THIS BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) # +# ----------------------------------------------------------------------------------- # From 5a16fdb9bf552adbe02b3919aadea271d2ee64d1 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:14:37 -0400 Subject: [PATCH 03/14] Add missing fallback --- scripts/generate_notification_constants.py | 13 + .../const/command_class/notification.py | 634 ++++++++++++++++++ 2 files changed, 647 insertions(+) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index a4b9aef69..4b4eb5293 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -97,6 +97,7 @@ def generate_int_enum_class_definition( get_id_func: Callable | None = None, docstring_info: str = "", base_class: str = "IntEnum", + include_missing: bool = False, ) -> list[str]: """Generate an IntEnum class definition as an array of lines of string.""" class_def: list[str] = [] @@ -107,10 +108,21 @@ def generate_int_enum_class_definition( class_def.append(f" {docstring}") if enum_ref_url: class_def.append(f" # {enum_ref_url}") + if include_missing: + class_def.append(" UNKNOWN = -1") for enum_name, enum_id in sorted(enum_map.items(), key=lambda x: x[0]): if get_id_func: enum_id = get_id_func(enum_id) class_def.append(f" {enum_name_format(enum_name, False)} = {enum_id}") + if include_missing: + class_def.extend( + [ + " @classmethod", + " def _missing_(cls: type, value: object): # noqa: ARG003", + ' """Set default enum member if an unknown value is provided."""', + f" return {class_name}.UNKNOWN", + ] + ) return class_def @@ -170,6 +182,7 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: NOTIFICATIONS_URL, docstring_info=name.lower(), base_class="NotificationEvent", + include_missing=True, ) ) _notification_type_to_enum_map[notification_type].append( diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 9454608be..4c6a1e73b 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -47,6 +47,7 @@ class AccessControlLockStateNotificationEvent(NotificationEvent): """Enum for known access control lock state notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -75,11 +76,17 @@ class AccessControlLockStateNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlLockStateNotificationEvent.UNKNOWN + class AccessControlKeypadStateNotificationEvent(NotificationEvent): """Enum for known access control keypad state notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -109,11 +116,17 @@ class AccessControlKeypadStateNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlKeypadStateNotificationEvent.UNKNOWN + class AccessControlDoorStateNotificationEvent(NotificationEvent): """Enum for known access control door state notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -143,11 +156,17 @@ class AccessControlDoorStateNotificationEvent(NotificationEvent): WINDOW_DOOR_IS_CLOSED = 23 WINDOW_DOOR_IS_OPEN = 22 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlDoorStateNotificationEvent.UNKNOWN + class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): """Enum for known access control door handle state notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -177,6 +196,11 @@ class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): WINDOW_DOOR_HANDLE_IS_CLOSED = 25 WINDOW_DOOR_HANDLE_IS_OPEN = 24 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlDoorHandleStateNotificationEvent.UNKNOWN + class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent( NotificationEvent @@ -184,6 +208,7 @@ class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent """Enum for known access control barrier performing initialization process status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -212,11 +237,19 @@ class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ( + AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent.UNKNOWN + ) + class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier ul disabling status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -245,11 +278,17 @@ class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierUlDisablingStatusNotificationEvent.UNKNOWN + class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier vacation mode status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -278,11 +317,17 @@ class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent) UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierVacationModeStatusNotificationEvent.UNKNOWN + class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier safety beam obstacle status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -311,11 +356,17 @@ class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(Notification UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent.UNKNOWN + class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -344,11 +395,17 @@ class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierSensorStatusNotificationEvent.UNKNOWN + class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier battery status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -377,11 +434,17 @@ class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierBatteryStatusNotificationEvent.UNKNOWN + class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier short-circuit status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -410,11 +473,17 @@ class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent) UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierShortCircuitStatusNotificationEvent.UNKNOWN + class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): """Enum for known access control barrier control status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 @@ -443,27 +512,45 @@ class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 UNLOCK_OPERATION_WITH_USER_CODE = 34 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return AccessControlBarrierControlStatusNotificationEvent.UNKNOWN + class ApplianceProgramStatusNotificationEvent(NotificationEvent): """Enum for known appliance program status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 PROGRAM_COMPLETED = 3 PROGRAM_IN_PROGRESS = 2 PROGRAM_STARTED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceProgramStatusNotificationEvent.UNKNOWN + class ApplianceMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known appliance maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACE_MAIN_FILTER = 4 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceMaintenanceStatusNotificationEvent.UNKNOWN + class ApplianceApplianceStatusNotificationEvent(NotificationEvent): """Enum for known appliance appliance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BOILING = 8 DRAINING = 14 DRYING = 18 @@ -472,185 +559,335 @@ class ApplianceApplianceStatusNotificationEvent(NotificationEvent): SUPPLYING_WATER = 6 WASHING = 10 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceApplianceStatusNotificationEvent.UNKNOWN + class ApplianceTargetTemperatureFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance target temperature failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FAILURE_TO_SET_TARGET_TEMPERATURE = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceTargetTemperatureFailureStatusNotificationEvent.UNKNOWN + class ApplianceWaterSupplyFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance water supply failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_SUPPLY_FAILURE = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceWaterSupplyFailureStatusNotificationEvent.UNKNOWN + class ApplianceBoilingFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance boiling failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BOILING_FAILURE = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceBoilingFailureStatusNotificationEvent.UNKNOWN + class ApplianceWashingFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance washing failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WASHING_FAILURE = 11 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceWashingFailureStatusNotificationEvent.UNKNOWN + class ApplianceRinsingFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance rinsing failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 RINSING_FAILURE = 13 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceRinsingFailureStatusNotificationEvent.UNKNOWN + class ApplianceDrainingFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance draining failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 DRAINING_FAILURE = 15 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceDrainingFailureStatusNotificationEvent.UNKNOWN + class ApplianceSpinningFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance spinning failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 SPINNING_FAILURE = 17 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceSpinningFailureStatusNotificationEvent.UNKNOWN + class ApplianceDryingFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance drying failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 DRYING_FAILURE = 19 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceDryingFailureStatusNotificationEvent.UNKNOWN + class ApplianceFanFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance fan failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FAN_FAILURE = 20 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceFanFailureStatusNotificationEvent.UNKNOWN + class ApplianceCompressorFailureStatusNotificationEvent(NotificationEvent): """Enum for known appliance compressor failure status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 COMPRESSOR_FAILURE = 21 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ApplianceCompressorFailureStatusNotificationEvent.UNKNOWN + class CoAlarmSensorStatusNotificationEvent(NotificationEvent): """Enum for known co alarm sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CARBON_MONOXIDE_DETECTED = 2 CARBON_MONOXIDE_DETECTED_LOCATION_PROVIDED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return CoAlarmSensorStatusNotificationEvent.UNKNOWN + class CoAlarmTestStatusNotificationEvent(NotificationEvent): """Enum for known co alarm test status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CARBON_MONOXIDE_TEST = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return CoAlarmTestStatusNotificationEvent.UNKNOWN + class CoAlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known co alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACEMENT_REQUIRED = 4 REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return CoAlarmMaintenanceStatusNotificationEvent.UNKNOWN + class CoAlarmAlarmStatusNotificationEvent(NotificationEvent): """Enum for known co alarm alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALARM_SILENCED = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return CoAlarmAlarmStatusNotificationEvent.UNKNOWN + class CoAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): """Enum for known co alarm periodic inspection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return CoAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN + class Co2AlarmSensorStatusNotificationEvent(NotificationEvent): """Enum for known co2 alarm sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CARBON_DIOXIDE_DETECTED = 2 CARBON_DIOXIDE_DETECTED_LOCATION_PROVIDED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return Co2AlarmSensorStatusNotificationEvent.UNKNOWN + class Co2AlarmTestStatusNotificationEvent(NotificationEvent): """Enum for known co2 alarm test status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CARBON_DIOXIDE_TEST = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return Co2AlarmTestStatusNotificationEvent.UNKNOWN + class Co2AlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known co2 alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACEMENT_REQUIRED = 4 REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return Co2AlarmMaintenanceStatusNotificationEvent.UNKNOWN + class Co2AlarmAlarmStatusNotificationEvent(NotificationEvent): """Enum for known co2 alarm alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALARM_SILENCED = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return Co2AlarmAlarmStatusNotificationEvent.UNKNOWN + class Co2AlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): """Enum for known co2 alarm periodic inspection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return Co2AlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN + class GasAlarmCombustibleGasStatusNotificationEvent(NotificationEvent): """Enum for known gas alarm combustible gas status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 COMBUSTIBLE_GAS_DETECTED = 2 COMBUSTIBLE_GAS_DETECTED_LOCATION_PROVIDED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return GasAlarmCombustibleGasStatusNotificationEvent.UNKNOWN + class GasAlarmToxicGasStatusNotificationEvent(NotificationEvent): """Enum for known gas alarm toxic gas status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 TOXIC_GAS_DETECTED = 4 TOXIC_GAS_DETECTED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return GasAlarmToxicGasStatusNotificationEvent.UNKNOWN + class GasAlarmAlarmStatusNotificationEvent(NotificationEvent): """Enum for known gas alarm alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 GAS_ALARM_TEST = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return GasAlarmAlarmStatusNotificationEvent.UNKNOWN + class GasAlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known gas alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACEMENT_REQUIRED = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return GasAlarmMaintenanceStatusNotificationEvent.UNKNOWN + class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): """Enum for known heat alarm heat sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 OVERHEAT_DETECTED = 2 OVERHEAT_DETECTED_LOCATION_PROVIDED = 1 RAPID_TEMPERATURE_FALL = 13 @@ -660,11 +897,17 @@ class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): UNDERHEAT_DETECTED = 6 UNDERHEAT_DETECTED_LOCATION_PROVIDED = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HeatAlarmHeatSensorStatusNotificationEvent.UNKNOWN + class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): """Enum for known heat alarm alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALARM_SILENCED = 9 HEAT_ALARM_TEST = 7 RAPID_TEMPERATURE_FALL = 13 @@ -672,44 +915,68 @@ class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): RAPID_TEMPERATURE_RISE = 4 RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HeatAlarmAlarmStatusNotificationEvent.UNKNOWN + class HeatAlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known heat alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 RAPID_TEMPERATURE_FALL = 13 RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 RAPID_TEMPERATURE_RISE = 4 RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 REPLACEMENT_REQUIRED_END_OF_LIFE = 8 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HeatAlarmMaintenanceStatusNotificationEvent.UNKNOWN + class HeatAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): """Enum for known heat alarm periodic inspection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 11 RAPID_TEMPERATURE_FALL = 13 RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 RAPID_TEMPERATURE_RISE = 4 RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HeatAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN + class HeatAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): """Enum for known heat alarm dust in device status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 10 RAPID_TEMPERATURE_FALL = 13 RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 RAPID_TEMPERATURE_RISE = 4 RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HeatAlarmDustInDeviceStatusNotificationEvent.UNKNOWN + class HomeHealthPositionStatusNotificationEvent(NotificationEvent): """Enum for known home health position status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FALL_DETECTED = 12 LEAVING_BED = 1 LYING_ON_BED = 3 @@ -717,29 +984,47 @@ class HomeHealthPositionStatusNotificationEvent(NotificationEvent): SITTING_ON_BED = 2 SITTING_ON_BED_EDGE = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeHealthPositionStatusNotificationEvent.UNKNOWN + class HomeHealthVocLevelStatusNotificationEvent(NotificationEvent): """Enum for known home health voc level status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FALL_DETECTED = 12 POSTURE_CHANGED = 4 VOLATILE_ORGANIC_COMPOUND_LEVEL = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeHealthVocLevelStatusNotificationEvent.UNKNOWN + class HomeHealthSleepApneaStatusNotificationEvent(NotificationEvent): """Enum for known home health sleep apnea status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FALL_DETECTED = 12 POSTURE_CHANGED = 4 SLEEP_APNEA_DETECTED = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeHealthSleepApneaStatusNotificationEvent.UNKNOWN + class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): """Enum for known home health sleep stage status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FALL_DETECTED = 12 POSTURE_CHANGED = 4 SLEEP_STAGE_0_DETECTED_DREAMING_REM = 8 @@ -747,19 +1032,31 @@ class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): SLEEP_STAGE_2_DETECTED_MEDIUM_SLEEP_NON_REM_2 = 10 SLEEP_STAGE_3_DETECTED_DEEP_SLEEP_NON_REM_3 = 11 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeHealthSleepStageStatusNotificationEvent.UNKNOWN + class HomeMonitoringHomeOccupancyStatusNotificationEvent(NotificationEvent): """Enum for known home monitoring home occupancy status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 HOME_OCCUPIED = 2 HOME_OCCUPIED_LOCATION_PROVIDED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeMonitoringHomeOccupancyStatusNotificationEvent.UNKNOWN + class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): """Enum for known home security sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 GLASS_BREAKAGE = 6 GLASS_BREAKAGE_LOCATION_PROVIDED = 5 IMPACT_DETECTED = 10 @@ -769,11 +1066,17 @@ class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): TAMPERING_INVALID_CODE = 4 TAMPERING_PRODUCT_MOVED = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeSecuritySensorStatusNotificationEvent.UNKNOWN + class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): """Enum for known home security cover status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 GLASS_BREAKAGE = 6 GLASS_BREAKAGE_LOCATION_PROVIDED = 5 IMPACT_DETECTED = 10 @@ -782,11 +1085,17 @@ class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): TAMPERING_PRODUCT_COVER_REMOVED = 3 TAMPERING_PRODUCT_MOVED = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeSecurityCoverStatusNotificationEvent.UNKNOWN + class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): """Enum for known home security motion sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 GLASS_BREAKAGE = 6 GLASS_BREAKAGE_LOCATION_PROVIDED = 5 IMPACT_DETECTED = 10 @@ -796,11 +1105,17 @@ class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): TAMPERING_INVALID_CODE = 4 TAMPERING_PRODUCT_MOVED = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeSecurityMotionSensorStatusNotificationEvent.UNKNOWN + class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent): """Enum for known home security magnetic interference status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 GLASS_BREAKAGE = 6 GLASS_BREAKAGE_LOCATION_PROVIDED = 5 IMPACT_DETECTED = 10 @@ -809,42 +1124,72 @@ class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent) TAMPERING_INVALID_CODE = 4 TAMPERING_PRODUCT_MOVED = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return HomeSecurityMagneticInterferenceStatusNotificationEvent.UNKNOWN + class IrrigationScheduleStatusNotificationEvent(NotificationEvent): """Enum for known irrigation schedule (id) status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 SCHEDULE_FINISHED = 2 SCHEDULE_STARTED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return IrrigationScheduleStatusNotificationEvent.UNKNOWN + class IrrigationValveRunStatusNotificationEvent(NotificationEvent): """Enum for known irrigation valve (id) run status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 VALVE_TABLE_RUN_FINISHED = 4 VALVE_TABLE_RUN_STARTED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return IrrigationValveRunStatusNotificationEvent.UNKNOWN + class IrrigationDeviceConfigurationStatusNotificationEvent(NotificationEvent): """Enum for known irrigation device configuration status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 DEVICE_IS_NOT_CONFIGURED = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return IrrigationDeviceConfigurationStatusNotificationEvent.UNKNOWN + class LightSensorLightDetectionStatusNotificationEvent(NotificationEvent): """Enum for known light sensor light detection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 LIGHT_COLOR_TRANSITION_DETECTED = 2 LIGHT_DETECTED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return LightSensorLightDetectionStatusNotificationEvent.UNKNOWN + class PestControlTrapStatusNotificationEvent(NotificationEvent): """Enum for known pest control trap status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 PEST_DETECTED = 6 PEST_DETECTED_LOCATION_PROVIDED = 5 PEST_EXTERMINATED = 8 @@ -854,226 +1199,381 @@ class PestControlTrapStatusNotificationEvent(NotificationEvent): TRAP_RE_ARM_REQUIRED = 4 TRAP_RE_ARM_REQUIRED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PestControlTrapStatusNotificationEvent.UNKNOWN + class PowerManagementPowerStatusNotificationEvent(NotificationEvent): """Enum for known power management power status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 POWER_HAS_BEEN_APPLIED = 1 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementPowerStatusNotificationEvent.UNKNOWN + class PowerManagementMainsStatusNotificationEvent(NotificationEvent): """Enum for known power management mains status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 AC_MAINS_DISCONNECTED = 2 AC_MAINS_RE_CONNECTED = 3 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementMainsStatusNotificationEvent.UNKNOWN + class PowerManagementOverCurrentStatusNotificationEvent(NotificationEvent): """Enum for known power management over-current status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 OVER_CURRENT_DETECTED = 6 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementOverCurrentStatusNotificationEvent.UNKNOWN + class PowerManagementOverVoltageStatusNotificationEvent(NotificationEvent): """Enum for known power management over-voltage status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 OVER_VOLTAGE_DETECTED = 7 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementOverVoltageStatusNotificationEvent.UNKNOWN + class PowerManagementOverLoadStatusNotificationEvent(NotificationEvent): """Enum for known power management over-load status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 OVER_LOAD_DETECTED = 8 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementOverLoadStatusNotificationEvent.UNKNOWN + class PowerManagementLoadErrorStatusNotificationEvent(NotificationEvent): """Enum for known power management load error status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 LOAD_ERROR = 9 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementLoadErrorStatusNotificationEvent.UNKNOWN + class PowerManagementBatteryMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known power management battery maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BATTERY_FLUID_IS_LOW = 17 REPLACE_BATTERY_NOW = 11 REPLACE_BATTERY_SOON = 10 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementBatteryMaintenanceStatusNotificationEvent.UNKNOWN + class PowerManagementBatteryLoadStatusNotificationEvent(NotificationEvent): """Enum for known power management battery load status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BATTERY_IS_CHARGING = 12 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementBatteryLoadStatusNotificationEvent.UNKNOWN + class PowerManagementBatteryLevelStatusNotificationEvent(NotificationEvent): """Enum for known power management battery level status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BATTERY_IS_FULLY_CHARGED = 13 CHARGE_BATTERY_NOW = 15 CHARGE_BATTERY_SOON = 14 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementBatteryLevelStatusNotificationEvent.UNKNOWN + class PowerManagementBackupBatteryLevelStatusNotificationEvent(NotificationEvent): """Enum for known power management backup battery level status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 BACK_UP_BATTERY_DISCONNECTED = 18 BACK_UP_BATTERY_IS_LOW = 16 SURGE_DETECTED = 4 VOLTAGE_DROP_DRIFT = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return PowerManagementBackupBatteryLevelStatusNotificationEvent.UNKNOWN + class SirenSirenStatusNotificationEvent(NotificationEvent): """Enum for known siren siren status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 SIREN_ACTIVE = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SirenSirenStatusNotificationEvent.UNKNOWN + class SmokeAlarmSensorStatusNotificationEvent(NotificationEvent): """Enum for known smoke alarm sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 SMOKE_DETECTED = 2 SMOKE_DETECTED_LOCATION_PROVIDED = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SmokeAlarmSensorStatusNotificationEvent.UNKNOWN + class SmokeAlarmAlarmStatusNotificationEvent(NotificationEvent): """Enum for known smoke alarm alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ALARM_SILENCED = 6 SMOKE_ALARM_TEST = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SmokeAlarmAlarmStatusNotificationEvent.UNKNOWN + class SmokeAlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known smoke alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACEMENT_REQUIRED = 4 REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SmokeAlarmMaintenanceStatusNotificationEvent.UNKNOWN + class SmokeAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): """Enum for known smoke alarm periodic inspection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SmokeAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN + class SmokeAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): """Enum for known smoke alarm dust in device status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 8 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return SmokeAlarmDustInDeviceStatusNotificationEvent.UNKNOWN + class WaterAlarmSensorStatusNotificationEvent(NotificationEvent): """Enum for known water alarm sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_LEAK_DETECTED = 2 WATER_LEAK_DETECTED_LOCATION_PROVIDED = 1 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmSensorStatusNotificationEvent.UNKNOWN + class WaterAlarmMaintenanceStatusNotificationEvent(NotificationEvent): """Enum for known water alarm maintenance status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 REPLACE_WATER_FILTER = 5 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmMaintenanceStatusNotificationEvent.UNKNOWN + class WaterAlarmWaterFlowAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water alarm water flow alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_FLOW_ALARM = 6 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmWaterFlowAlarmStatusNotificationEvent.UNKNOWN + class WaterAlarmWaterPressureAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water alarm water pressure alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 WATER_PRESSURE_ALARM = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmWaterPressureAlarmStatusNotificationEvent.UNKNOWN + class WaterAlarmWaterTemperatureAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water alarm water temperature alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 WATER_TEMPERATURE_ALARM = 8 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmWaterTemperatureAlarmStatusNotificationEvent.UNKNOWN + class WaterAlarmWaterLevelAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water alarm water level alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_LEVEL_ALARM = 9 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmWaterLevelAlarmStatusNotificationEvent.UNKNOWN + class WaterAlarmPumpStatusNotificationEvent(NotificationEvent): """Enum for known water alarm pump status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 SUMP_PUMP_ACTIVE = 10 SUMP_PUMP_FAILURE = 11 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterAlarmPumpStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringChlorineAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring chlorine alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CHLORINE_ALARM = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringChlorineAlarmStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringAcidityStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring acidity (ph) status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ACIDITY_PH_ALARM = 2 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringAcidityStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent( NotificationEvent @@ -1081,22 +1581,40 @@ class WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent( """Enum for known water quality monitoring water oxidation alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_OXIDATION_ALARM = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringChlorineSensorStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring chlorine sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 CHLORINE_EMPTY = 4 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringChlorineSensorStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringAciditySensorStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring acidity (ph) sensor status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 ACIDITY_PH_EMPTY = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringAciditySensorStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent( NotificationEvent @@ -1104,8 +1622,16 @@ class WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent( """Enum for known water quality monitoring waterflow measuring station sensor notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATERFLOW_MEASURING_STATION_SHORTAGE_DETECTED = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return ( + WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent.UNKNOWN + ) + class WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent( NotificationEvent @@ -1113,8 +1639,14 @@ class WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent( """Enum for known water quality monitoring waterflow clear water sensor notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATERFLOW_CLEAR_WATER_SHORTAGE_DETECTED = 7 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent.UNKNOWN + class WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent( NotificationEvent @@ -1122,52 +1654,94 @@ class WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent( """Enum for known water quality monitoring disinfection system status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 DISINFECTION_SYSTEM_ERROR_DETECTED = 8 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringFilterCleaningStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring filter cleaning status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FILTER_CLEANING_ONGOING = 9 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringFilterCleaningStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringHeatingStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring heating status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 HEATING_OPERATION_ONGOING = 10 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringHeatingStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringFilterPumpStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring filter pump status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FILTER_PUMP_OPERATION_ONGOING = 11 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringFilterPumpStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring freshwater flow status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FRESHWATER_OPERATION_ONGOING = 12 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringDryProtectionStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring dry protection status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 DRY_PROTECTION_OPERATION_ACTIVE = 13 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringDryProtectionStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringWaterTankStatusNotificationEvent(NotificationEvent): """Enum for known water quality monitoring water tank status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 WATER_TANK_IS_EMPTY = 14 WATER_TANK_IS_FULL = 16 WATER_TANK_LEVEL_IS_UNKNOWN = 15 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringWaterTankStatusNotificationEvent.UNKNOWN + class WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent( NotificationEvent @@ -1175,71 +1749,131 @@ class WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent( """Enum for known water quality monitoring collective disorder status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 COLLECTIVE_DISORDER = 17 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent.UNKNOWN + class WaterValveValveOperationStatusNotificationEvent(NotificationEvent): """Enum for known water valve valve operation status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 VALVE_OPERATION = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveValveOperationStatusNotificationEvent.UNKNOWN + class WaterValveMasterValveOperationStatusNotificationEvent(NotificationEvent): """Enum for known water valve master valve operation status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MASTER_VALVE_OPERATION = 2 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveMasterValveOperationStatusNotificationEvent.UNKNOWN + class WaterValveValveShortCircuitStatusNotificationEvent(NotificationEvent): """Enum for known water valve valve short circuit status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 VALVE_SHORT_CIRCUIT = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveValveShortCircuitStatusNotificationEvent.UNKNOWN + class WaterValveMasterValveShortCircuitStatusNotificationEvent(NotificationEvent): """Enum for known water valve master valve short circuit status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MASTER_VALVE_SHORT_CIRCUIT = 4 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveMasterValveShortCircuitStatusNotificationEvent.UNKNOWN + class WaterValveValveCurrentAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water valve valve current alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 VALVE_CURRENT_ALARM = 5 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveValveCurrentAlarmStatusNotificationEvent.UNKNOWN + class WaterValveMasterValveCurrentAlarmStatusNotificationEvent(NotificationEvent): """Enum for known water valve master valve current alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MASTER_VALVE_CURRENT_ALARM = 6 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WaterValveMasterValveCurrentAlarmStatusNotificationEvent.UNKNOWN + class WeatherAlarmRainAlarmStatusNotificationEvent(NotificationEvent): """Enum for known weather alarm rain alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 RAIN_ALARM = 1 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WeatherAlarmRainAlarmStatusNotificationEvent.UNKNOWN + class WeatherAlarmMoistureAlarmStatusNotificationEvent(NotificationEvent): """Enum for known weather alarm moisture alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 MOISTURE_ALARM = 2 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WeatherAlarmMoistureAlarmStatusNotificationEvent.UNKNOWN + class WeatherAlarmFreezeAlarmStatusNotificationEvent(NotificationEvent): """Enum for known weather alarm freeze alarm status notification event for Notification CC.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 FREEZE_ALARM = 3 + @classmethod + def _missing_(cls: type, value: object): # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WeatherAlarmFreezeAlarmStatusNotificationEvent.UNKNOWN + NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, type[NotificationEvent]] = { NotificationType.ACCESS_CONTROL: { From 150c4059755fe3035d03d274942924ddfa577a98 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:19:28 -0400 Subject: [PATCH 04/14] fixes --- scripts/generate_notification_constants.py | 8 +- .../const/command_class/notification.py | 646 ++++++++++++------ 2 files changed, 438 insertions(+), 216 deletions(-) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 4b4eb5293..c359935d0 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -102,7 +102,7 @@ def generate_int_enum_class_definition( """Generate an IntEnum class definition as an array of lines of string.""" class_def: list[str] = [] class_def.append(f"class {class_name}({base_class}):") - docstring = f'"""Enum for known {docstring_info} for Notification CC."""'.replace( + docstring = f'"""Enum for known {docstring_info}."""'.replace( " ", " " ) class_def.append(f" {docstring}") @@ -118,7 +118,7 @@ def generate_int_enum_class_definition( class_def.extend( [ " @classmethod", - " def _missing_(cls: type, value: object): # noqa: ARG003", + f" def _missing_(cls: type, value: object) -> {class_name}: # noqa: ARG003", ' """Set default enum member if an unknown value is provided."""', f" return {class_name}.UNKNOWN", ] @@ -130,7 +130,7 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: """Generate an IntEnum base class definition.""" class_def: list[str] = [] class_def.append(f"class {class_name}(IntEnum):") - class_def.append(f"\t{docstring}") + class_def.append(f" {docstring}") return class_def @@ -197,7 +197,7 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: notification_type_to_event_map_line = ( "NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, " - "type[NotificationEvent]] = {" + "set[type[NotificationEvent]]] = {" ) for notification_type, notification_events in notification_type_to_enum_map.items(): notification_type_to_event_map_line += ( diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 4c6a1e73b..4a2f04601 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -13,7 +13,7 @@ class NotificationType(IntEnum): - """Enum for known notification types for Notification CC.""" + """Enum for known notification types.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json ACCESS_CONTROL = 6 @@ -44,7 +44,7 @@ class NotificationEvent(IntEnum): class AccessControlLockStateNotificationEvent(NotificationEvent): - """Enum for known access control lock state notification event for Notification CC.""" + """Enum for known access control lock state notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -77,13 +77,15 @@ class AccessControlLockStateNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlLockStateNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlLockStateNotificationEvent.UNKNOWN class AccessControlKeypadStateNotificationEvent(NotificationEvent): - """Enum for known access control keypad state notification event for Notification CC.""" + """Enum for known access control keypad state notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -117,13 +119,15 @@ class AccessControlKeypadStateNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlKeypadStateNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlKeypadStateNotificationEvent.UNKNOWN class AccessControlDoorStateNotificationEvent(NotificationEvent): - """Enum for known access control door state notification event for Notification CC.""" + """Enum for known access control door state notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -157,13 +161,15 @@ class AccessControlDoorStateNotificationEvent(NotificationEvent): WINDOW_DOOR_IS_OPEN = 22 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlDoorStateNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlDoorStateNotificationEvent.UNKNOWN class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): - """Enum for known access control door handle state notification event for Notification CC.""" + """Enum for known access control door handle state notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -197,7 +203,9 @@ class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): WINDOW_DOOR_HANDLE_IS_OPEN = 24 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlDoorHandleStateNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlDoorHandleStateNotificationEvent.UNKNOWN @@ -205,7 +213,7 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent( NotificationEvent ): - """Enum for known access control barrier performing initialization process status notification event for Notification CC.""" + """Enum for known access control barrier performing initialization process status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -238,7 +246,11 @@ class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ( AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent.UNKNOWN @@ -246,7 +258,7 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier ul disabling status notification event for Notification CC.""" + """Enum for known access control barrier ul disabling status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -279,13 +291,15 @@ class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierUlDisablingStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierUlDisablingStatusNotificationEvent.UNKNOWN class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier vacation mode status notification event for Notification CC.""" + """Enum for known access control barrier vacation mode status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -318,13 +332,15 @@ class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent) UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierVacationModeStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierVacationModeStatusNotificationEvent.UNKNOWN class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier safety beam obstacle status notification event for Notification CC.""" + """Enum for known access control barrier safety beam obstacle status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -357,13 +373,15 @@ class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(Notification UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent.UNKNOWN class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier sensor status notification event for Notification CC.""" + """Enum for known access control barrier sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -396,13 +414,15 @@ class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierSensorStatusNotificationEvent.UNKNOWN class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier battery status notification event for Notification CC.""" + """Enum for known access control barrier battery status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -435,13 +455,15 @@ class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierBatteryStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierBatteryStatusNotificationEvent.UNKNOWN class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier short-circuit status notification event for Notification CC.""" + """Enum for known access control barrier short-circuit status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -474,13 +496,15 @@ class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent) UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierShortCircuitStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierShortCircuitStatusNotificationEvent.UNKNOWN class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier control status notification event for Notification CC.""" + """Enum for known access control barrier control status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -513,13 +537,15 @@ class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> AccessControlBarrierControlStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return AccessControlBarrierControlStatusNotificationEvent.UNKNOWN class ApplianceProgramStatusNotificationEvent(NotificationEvent): - """Enum for known appliance program status notification event for Notification CC.""" + """Enum for known appliance program status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -528,26 +554,30 @@ class ApplianceProgramStatusNotificationEvent(NotificationEvent): PROGRAM_STARTED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceProgramStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceProgramStatusNotificationEvent.UNKNOWN class ApplianceMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known appliance maintenance status notification event for Notification CC.""" + """Enum for known appliance maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 REPLACE_MAIN_FILTER = 4 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceMaintenanceStatusNotificationEvent.UNKNOWN class ApplianceApplianceStatusNotificationEvent(NotificationEvent): - """Enum for known appliance appliance status notification event for Notification CC.""" + """Enum for known appliance appliance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -560,143 +590,165 @@ class ApplianceApplianceStatusNotificationEvent(NotificationEvent): WASHING = 10 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceApplianceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceApplianceStatusNotificationEvent.UNKNOWN class ApplianceTargetTemperatureFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance target temperature failure status notification event for Notification CC.""" + """Enum for known appliance target temperature failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FAILURE_TO_SET_TARGET_TEMPERATURE = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceTargetTemperatureFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceTargetTemperatureFailureStatusNotificationEvent.UNKNOWN class ApplianceWaterSupplyFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance water supply failure status notification event for Notification CC.""" + """Enum for known appliance water supply failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 WATER_SUPPLY_FAILURE = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceWaterSupplyFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceWaterSupplyFailureStatusNotificationEvent.UNKNOWN class ApplianceBoilingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance boiling failure status notification event for Notification CC.""" + """Enum for known appliance boiling failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 BOILING_FAILURE = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceBoilingFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceBoilingFailureStatusNotificationEvent.UNKNOWN class ApplianceWashingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance washing failure status notification event for Notification CC.""" + """Enum for known appliance washing failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 WASHING_FAILURE = 11 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceWashingFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceWashingFailureStatusNotificationEvent.UNKNOWN class ApplianceRinsingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance rinsing failure status notification event for Notification CC.""" + """Enum for known appliance rinsing failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 RINSING_FAILURE = 13 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceRinsingFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceRinsingFailureStatusNotificationEvent.UNKNOWN class ApplianceDrainingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance draining failure status notification event for Notification CC.""" + """Enum for known appliance draining failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 DRAINING_FAILURE = 15 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceDrainingFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceDrainingFailureStatusNotificationEvent.UNKNOWN class ApplianceSpinningFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance spinning failure status notification event for Notification CC.""" + """Enum for known appliance spinning failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 SPINNING_FAILURE = 17 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceSpinningFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceSpinningFailureStatusNotificationEvent.UNKNOWN class ApplianceDryingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance drying failure status notification event for Notification CC.""" + """Enum for known appliance drying failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 DRYING_FAILURE = 19 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceDryingFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceDryingFailureStatusNotificationEvent.UNKNOWN class ApplianceFanFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance fan failure status notification event for Notification CC.""" + """Enum for known appliance fan failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FAN_FAILURE = 20 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceFanFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceFanFailureStatusNotificationEvent.UNKNOWN class ApplianceCompressorFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance compressor failure status notification event for Notification CC.""" + """Enum for known appliance compressor failure status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 COMPRESSOR_FAILURE = 21 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ApplianceCompressorFailureStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ApplianceCompressorFailureStatusNotificationEvent.UNKNOWN class CoAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm sensor status notification event for Notification CC.""" + """Enum for known co alarm sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -704,26 +756,30 @@ class CoAlarmSensorStatusNotificationEvent(NotificationEvent): CARBON_MONOXIDE_DETECTED_LOCATION_PROVIDED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> CoAlarmSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return CoAlarmSensorStatusNotificationEvent.UNKNOWN class CoAlarmTestStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm test status notification event for Notification CC.""" + """Enum for known co alarm test status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 CARBON_MONOXIDE_TEST = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> CoAlarmTestStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return CoAlarmTestStatusNotificationEvent.UNKNOWN class CoAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm maintenance status notification event for Notification CC.""" + """Enum for known co alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -731,39 +787,45 @@ class CoAlarmMaintenanceStatusNotificationEvent(NotificationEvent): REPLACEMENT_REQUIRED_END_OF_LIFE = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> CoAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return CoAlarmMaintenanceStatusNotificationEvent.UNKNOWN class CoAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm alarm status notification event for Notification CC.""" + """Enum for known co alarm alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 ALARM_SILENCED = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> CoAlarmAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return CoAlarmAlarmStatusNotificationEvent.UNKNOWN class CoAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm periodic inspection status notification event for Notification CC.""" + """Enum for known co alarm periodic inspection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> CoAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return CoAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN class Co2AlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm sensor status notification event for Notification CC.""" + """Enum for known co2 alarm sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -771,26 +833,30 @@ class Co2AlarmSensorStatusNotificationEvent(NotificationEvent): CARBON_DIOXIDE_DETECTED_LOCATION_PROVIDED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> Co2AlarmSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return Co2AlarmSensorStatusNotificationEvent.UNKNOWN class Co2AlarmTestStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm test status notification event for Notification CC.""" + """Enum for known co2 alarm test status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 CARBON_DIOXIDE_TEST = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> Co2AlarmTestStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return Co2AlarmTestStatusNotificationEvent.UNKNOWN class Co2AlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm maintenance status notification event for Notification CC.""" + """Enum for known co2 alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -798,39 +864,45 @@ class Co2AlarmMaintenanceStatusNotificationEvent(NotificationEvent): REPLACEMENT_REQUIRED_END_OF_LIFE = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> Co2AlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return Co2AlarmMaintenanceStatusNotificationEvent.UNKNOWN class Co2AlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm alarm status notification event for Notification CC.""" + """Enum for known co2 alarm alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 ALARM_SILENCED = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> Co2AlarmAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return Co2AlarmAlarmStatusNotificationEvent.UNKNOWN class Co2AlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm periodic inspection status notification event for Notification CC.""" + """Enum for known co2 alarm periodic inspection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> Co2AlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return Co2AlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN class GasAlarmCombustibleGasStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm combustible gas status notification event for Notification CC.""" + """Enum for known gas alarm combustible gas status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -838,13 +910,15 @@ class GasAlarmCombustibleGasStatusNotificationEvent(NotificationEvent): COMBUSTIBLE_GAS_DETECTED_LOCATION_PROVIDED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> GasAlarmCombustibleGasStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return GasAlarmCombustibleGasStatusNotificationEvent.UNKNOWN class GasAlarmToxicGasStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm toxic gas status notification event for Notification CC.""" + """Enum for known gas alarm toxic gas status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -852,39 +926,45 @@ class GasAlarmToxicGasStatusNotificationEvent(NotificationEvent): TOXIC_GAS_DETECTED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> GasAlarmToxicGasStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return GasAlarmToxicGasStatusNotificationEvent.UNKNOWN class GasAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm alarm status notification event for Notification CC.""" + """Enum for known gas alarm alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 GAS_ALARM_TEST = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> GasAlarmAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return GasAlarmAlarmStatusNotificationEvent.UNKNOWN class GasAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm maintenance status notification event for Notification CC.""" + """Enum for known gas alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 REPLACEMENT_REQUIRED = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> GasAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return GasAlarmMaintenanceStatusNotificationEvent.UNKNOWN class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm heat sensor status notification event for Notification CC.""" + """Enum for known heat alarm heat sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -898,13 +978,15 @@ class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): UNDERHEAT_DETECTED_LOCATION_PROVIDED = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HeatAlarmHeatSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HeatAlarmHeatSensorStatusNotificationEvent.UNKNOWN class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm alarm status notification event for Notification CC.""" + """Enum for known heat alarm alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -916,13 +998,15 @@ class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HeatAlarmAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HeatAlarmAlarmStatusNotificationEvent.UNKNOWN class HeatAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm maintenance status notification event for Notification CC.""" + """Enum for known heat alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -933,13 +1017,15 @@ class HeatAlarmMaintenanceStatusNotificationEvent(NotificationEvent): REPLACEMENT_REQUIRED_END_OF_LIFE = 8 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HeatAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HeatAlarmMaintenanceStatusNotificationEvent.UNKNOWN class HeatAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm periodic inspection status notification event for Notification CC.""" + """Enum for known heat alarm periodic inspection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -950,13 +1036,15 @@ class HeatAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HeatAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HeatAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN class HeatAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm dust in device status notification event for Notification CC.""" + """Enum for known heat alarm dust in device status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -967,13 +1055,15 @@ class HeatAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HeatAlarmDustInDeviceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HeatAlarmDustInDeviceStatusNotificationEvent.UNKNOWN class HomeHealthPositionStatusNotificationEvent(NotificationEvent): - """Enum for known home health position status notification event for Notification CC.""" + """Enum for known home health position status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -985,13 +1075,15 @@ class HomeHealthPositionStatusNotificationEvent(NotificationEvent): SITTING_ON_BED_EDGE = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeHealthPositionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeHealthPositionStatusNotificationEvent.UNKNOWN class HomeHealthVocLevelStatusNotificationEvent(NotificationEvent): - """Enum for known home health voc level status notification event for Notification CC.""" + """Enum for known home health voc level status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1000,13 +1092,15 @@ class HomeHealthVocLevelStatusNotificationEvent(NotificationEvent): VOLATILE_ORGANIC_COMPOUND_LEVEL = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeHealthVocLevelStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeHealthVocLevelStatusNotificationEvent.UNKNOWN class HomeHealthSleepApneaStatusNotificationEvent(NotificationEvent): - """Enum for known home health sleep apnea status notification event for Notification CC.""" + """Enum for known home health sleep apnea status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1015,13 +1109,15 @@ class HomeHealthSleepApneaStatusNotificationEvent(NotificationEvent): SLEEP_APNEA_DETECTED = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeHealthSleepApneaStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeHealthSleepApneaStatusNotificationEvent.UNKNOWN class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): - """Enum for known home health sleep stage status notification event for Notification CC.""" + """Enum for known home health sleep stage status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1033,13 +1129,15 @@ class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): SLEEP_STAGE_3_DETECTED_DEEP_SLEEP_NON_REM_3 = 11 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeHealthSleepStageStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeHealthSleepStageStatusNotificationEvent.UNKNOWN class HomeMonitoringHomeOccupancyStatusNotificationEvent(NotificationEvent): - """Enum for known home monitoring home occupancy status notification event for Notification CC.""" + """Enum for known home monitoring home occupancy status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1047,13 +1145,15 @@ class HomeMonitoringHomeOccupancyStatusNotificationEvent(NotificationEvent): HOME_OCCUPIED_LOCATION_PROVIDED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeMonitoringHomeOccupancyStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeMonitoringHomeOccupancyStatusNotificationEvent.UNKNOWN class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): - """Enum for known home security sensor status notification event for Notification CC.""" + """Enum for known home security sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1067,13 +1167,15 @@ class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): TAMPERING_PRODUCT_MOVED = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeSecuritySensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeSecuritySensorStatusNotificationEvent.UNKNOWN class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): - """Enum for known home security cover status notification event for Notification CC.""" + """Enum for known home security cover status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1086,13 +1188,15 @@ class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): TAMPERING_PRODUCT_MOVED = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeSecurityCoverStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeSecurityCoverStatusNotificationEvent.UNKNOWN class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): - """Enum for known home security motion sensor status notification event for Notification CC.""" + """Enum for known home security motion sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1106,13 +1210,15 @@ class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): TAMPERING_PRODUCT_MOVED = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeSecurityMotionSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeSecurityMotionSensorStatusNotificationEvent.UNKNOWN class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent): - """Enum for known home security magnetic interference status notification event for Notification CC.""" + """Enum for known home security magnetic interference status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1125,13 +1231,15 @@ class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent) TAMPERING_PRODUCT_MOVED = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> HomeSecurityMagneticInterferenceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return HomeSecurityMagneticInterferenceStatusNotificationEvent.UNKNOWN class IrrigationScheduleStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation schedule (id) status notification event for Notification CC.""" + """Enum for known irrigation schedule (id) status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1139,13 +1247,15 @@ class IrrigationScheduleStatusNotificationEvent(NotificationEvent): SCHEDULE_STARTED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> IrrigationScheduleStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return IrrigationScheduleStatusNotificationEvent.UNKNOWN class IrrigationValveRunStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation valve (id) run status notification event for Notification CC.""" + """Enum for known irrigation valve (id) run status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1153,26 +1263,30 @@ class IrrigationValveRunStatusNotificationEvent(NotificationEvent): VALVE_TABLE_RUN_STARTED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> IrrigationValveRunStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return IrrigationValveRunStatusNotificationEvent.UNKNOWN class IrrigationDeviceConfigurationStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation device configuration status notification event for Notification CC.""" + """Enum for known irrigation device configuration status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 DEVICE_IS_NOT_CONFIGURED = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> IrrigationDeviceConfigurationStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return IrrigationDeviceConfigurationStatusNotificationEvent.UNKNOWN class LightSensorLightDetectionStatusNotificationEvent(NotificationEvent): - """Enum for known light sensor light detection status notification event for Notification CC.""" + """Enum for known light sensor light detection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1180,13 +1294,15 @@ class LightSensorLightDetectionStatusNotificationEvent(NotificationEvent): LIGHT_DETECTED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> LightSensorLightDetectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return LightSensorLightDetectionStatusNotificationEvent.UNKNOWN class PestControlTrapStatusNotificationEvent(NotificationEvent): - """Enum for known pest control trap status notification event for Notification CC.""" + """Enum for known pest control trap status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1200,13 +1316,15 @@ class PestControlTrapStatusNotificationEvent(NotificationEvent): TRAP_RE_ARM_REQUIRED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PestControlTrapStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PestControlTrapStatusNotificationEvent.UNKNOWN class PowerManagementPowerStatusNotificationEvent(NotificationEvent): - """Enum for known power management power status notification event for Notification CC.""" + """Enum for known power management power status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1215,13 +1333,15 @@ class PowerManagementPowerStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementPowerStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementPowerStatusNotificationEvent.UNKNOWN class PowerManagementMainsStatusNotificationEvent(NotificationEvent): - """Enum for known power management mains status notification event for Notification CC.""" + """Enum for known power management mains status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1231,13 +1351,15 @@ class PowerManagementMainsStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementMainsStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementMainsStatusNotificationEvent.UNKNOWN class PowerManagementOverCurrentStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-current status notification event for Notification CC.""" + """Enum for known power management over-current status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1246,13 +1368,15 @@ class PowerManagementOverCurrentStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementOverCurrentStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementOverCurrentStatusNotificationEvent.UNKNOWN class PowerManagementOverVoltageStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-voltage status notification event for Notification CC.""" + """Enum for known power management over-voltage status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1261,13 +1385,15 @@ class PowerManagementOverVoltageStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementOverVoltageStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementOverVoltageStatusNotificationEvent.UNKNOWN class PowerManagementOverLoadStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-load status notification event for Notification CC.""" + """Enum for known power management over-load status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1276,13 +1402,15 @@ class PowerManagementOverLoadStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementOverLoadStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementOverLoadStatusNotificationEvent.UNKNOWN class PowerManagementLoadErrorStatusNotificationEvent(NotificationEvent): - """Enum for known power management load error status notification event for Notification CC.""" + """Enum for known power management load error status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1291,13 +1419,15 @@ class PowerManagementLoadErrorStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementLoadErrorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementLoadErrorStatusNotificationEvent.UNKNOWN class PowerManagementBatteryMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery maintenance status notification event for Notification CC.""" + """Enum for known power management battery maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1308,13 +1438,15 @@ class PowerManagementBatteryMaintenanceStatusNotificationEvent(NotificationEvent VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementBatteryMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementBatteryMaintenanceStatusNotificationEvent.UNKNOWN class PowerManagementBatteryLoadStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery load status notification event for Notification CC.""" + """Enum for known power management battery load status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1323,13 +1455,15 @@ class PowerManagementBatteryLoadStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementBatteryLoadStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementBatteryLoadStatusNotificationEvent.UNKNOWN class PowerManagementBatteryLevelStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery level status notification event for Notification CC.""" + """Enum for known power management battery level status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1340,13 +1474,15 @@ class PowerManagementBatteryLevelStatusNotificationEvent(NotificationEvent): VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementBatteryLevelStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementBatteryLevelStatusNotificationEvent.UNKNOWN class PowerManagementBackupBatteryLevelStatusNotificationEvent(NotificationEvent): - """Enum for known power management backup battery level status notification event for Notification CC.""" + """Enum for known power management backup battery level status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1356,26 +1492,30 @@ class PowerManagementBackupBatteryLevelStatusNotificationEvent(NotificationEvent VOLTAGE_DROP_DRIFT = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> PowerManagementBackupBatteryLevelStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return PowerManagementBackupBatteryLevelStatusNotificationEvent.UNKNOWN class SirenSirenStatusNotificationEvent(NotificationEvent): - """Enum for known siren siren status notification event for Notification CC.""" + """Enum for known siren siren status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 SIREN_ACTIVE = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SirenSirenStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SirenSirenStatusNotificationEvent.UNKNOWN class SmokeAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm sensor status notification event for Notification CC.""" + """Enum for known smoke alarm sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1383,13 +1523,15 @@ class SmokeAlarmSensorStatusNotificationEvent(NotificationEvent): SMOKE_DETECTED_LOCATION_PROVIDED = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SmokeAlarmSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SmokeAlarmSensorStatusNotificationEvent.UNKNOWN class SmokeAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm alarm status notification event for Notification CC.""" + """Enum for known smoke alarm alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1397,13 +1539,15 @@ class SmokeAlarmAlarmStatusNotificationEvent(NotificationEvent): SMOKE_ALARM_TEST = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SmokeAlarmAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SmokeAlarmAlarmStatusNotificationEvent.UNKNOWN class SmokeAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm maintenance status notification event for Notification CC.""" + """Enum for known smoke alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1411,39 +1555,45 @@ class SmokeAlarmMaintenanceStatusNotificationEvent(NotificationEvent): REPLACEMENT_REQUIRED_END_OF_LIFE = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SmokeAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SmokeAlarmMaintenanceStatusNotificationEvent.UNKNOWN class SmokeAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm periodic inspection status notification event for Notification CC.""" + """Enum for known smoke alarm periodic inspection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SmokeAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SmokeAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN class SmokeAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm dust in device status notification event for Notification CC.""" + """Enum for known smoke alarm dust in device status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 8 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> SmokeAlarmDustInDeviceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return SmokeAlarmDustInDeviceStatusNotificationEvent.UNKNOWN class WaterAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm sensor status notification event for Notification CC.""" + """Enum for known water alarm sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1453,13 +1603,15 @@ class WaterAlarmSensorStatusNotificationEvent(NotificationEvent): WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmSensorStatusNotificationEvent.UNKNOWN class WaterAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm maintenance status notification event for Notification CC.""" + """Enum for known water alarm maintenance status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1468,13 +1620,15 @@ class WaterAlarmMaintenanceStatusNotificationEvent(NotificationEvent): WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmMaintenanceStatusNotificationEvent.UNKNOWN class WaterAlarmWaterFlowAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water flow alarm status notification event for Notification CC.""" + """Enum for known water alarm water flow alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1483,13 +1637,15 @@ class WaterAlarmWaterFlowAlarmStatusNotificationEvent(NotificationEvent): WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmWaterFlowAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmWaterFlowAlarmStatusNotificationEvent.UNKNOWN class WaterAlarmWaterPressureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water pressure alarm status notification event for Notification CC.""" + """Enum for known water alarm water pressure alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1498,13 +1654,15 @@ class WaterAlarmWaterPressureAlarmStatusNotificationEvent(NotificationEvent): WATER_PRESSURE_ALARM = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmWaterPressureAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmWaterPressureAlarmStatusNotificationEvent.UNKNOWN class WaterAlarmWaterTemperatureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water temperature alarm status notification event for Notification CC.""" + """Enum for known water alarm water temperature alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1513,13 +1671,15 @@ class WaterAlarmWaterTemperatureAlarmStatusNotificationEvent(NotificationEvent): WATER_TEMPERATURE_ALARM = 8 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmWaterTemperatureAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmWaterTemperatureAlarmStatusNotificationEvent.UNKNOWN class WaterAlarmWaterLevelAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water level alarm status notification event for Notification CC.""" + """Enum for known water alarm water level alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1528,13 +1688,15 @@ class WaterAlarmWaterLevelAlarmStatusNotificationEvent(NotificationEvent): WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmWaterLevelAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmWaterLevelAlarmStatusNotificationEvent.UNKNOWN class WaterAlarmPumpStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm pump status notification event for Notification CC.""" + """Enum for known water alarm pump status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1544,33 +1706,39 @@ class WaterAlarmPumpStatusNotificationEvent(NotificationEvent): WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterAlarmPumpStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterAlarmPumpStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringChlorineAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring chlorine alarm status notification event for Notification CC.""" + """Enum for known water quality monitoring chlorine alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 CHLORINE_ALARM = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringChlorineAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringChlorineAlarmStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringAcidityStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring acidity (ph) status notification event for Notification CC.""" + """Enum for known water quality monitoring acidity (ph) status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 ACIDITY_PH_ALARM = 2 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringAcidityStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringAcidityStatusNotificationEvent.UNKNOWN @@ -1578,40 +1746,48 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent( NotificationEvent ): - """Enum for known water quality monitoring water oxidation alarm status notification event for Notification CC.""" + """Enum for known water quality monitoring water oxidation alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 WATER_OXIDATION_ALARM = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringChlorineSensorStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring chlorine sensor status notification event for Notification CC.""" + """Enum for known water quality monitoring chlorine sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 CHLORINE_EMPTY = 4 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringChlorineSensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringChlorineSensorStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringAciditySensorStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring acidity (ph) sensor status notification event for Notification CC.""" + """Enum for known water quality monitoring acidity (ph) sensor status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 ACIDITY_PH_EMPTY = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringAciditySensorStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringAciditySensorStatusNotificationEvent.UNKNOWN @@ -1619,14 +1795,18 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent( NotificationEvent ): - """Enum for known water quality monitoring waterflow measuring station sensor notification event for Notification CC.""" + """Enum for known water quality monitoring waterflow measuring station sensor notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 WATERFLOW_MEASURING_STATION_SHORTAGE_DETECTED = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return ( WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent.UNKNOWN @@ -1636,14 +1816,18 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent( NotificationEvent ): - """Enum for known water quality monitoring waterflow clear water sensor notification event for Notification CC.""" + """Enum for known water quality monitoring waterflow clear water sensor notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 WATERFLOW_CLEAR_WATER_SHORTAGE_DETECTED = 7 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent.UNKNOWN @@ -1651,85 +1835,99 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent( NotificationEvent ): - """Enum for known water quality monitoring disinfection system status notification event for Notification CC.""" + """Enum for known water quality monitoring disinfection system status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 DISINFECTION_SYSTEM_ERROR_DETECTED = 8 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringFilterCleaningStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring filter cleaning status notification event for Notification CC.""" + """Enum for known water quality monitoring filter cleaning status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FILTER_CLEANING_ONGOING = 9 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringFilterCleaningStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringFilterCleaningStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringHeatingStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring heating status notification event for Notification CC.""" + """Enum for known water quality monitoring heating status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 HEATING_OPERATION_ONGOING = 10 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringHeatingStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringHeatingStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringFilterPumpStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring filter pump status notification event for Notification CC.""" + """Enum for known water quality monitoring filter pump status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FILTER_PUMP_OPERATION_ONGOING = 11 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringFilterPumpStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringFilterPumpStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring freshwater flow status notification event for Notification CC.""" + """Enum for known water quality monitoring freshwater flow status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FRESHWATER_OPERATION_ONGOING = 12 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringDryProtectionStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring dry protection status notification event for Notification CC.""" + """Enum for known water quality monitoring dry protection status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 DRY_PROTECTION_OPERATION_ACTIVE = 13 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringDryProtectionStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringDryProtectionStatusNotificationEvent.UNKNOWN class WaterQualityMonitoringWaterTankStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring water tank status notification event for Notification CC.""" + """Enum for known water quality monitoring water tank status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 @@ -1738,7 +1936,9 @@ class WaterQualityMonitoringWaterTankStatusNotificationEvent(NotificationEvent): WATER_TANK_LEVEL_IS_UNKNOWN = 15 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterQualityMonitoringWaterTankStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringWaterTankStatusNotificationEvent.UNKNOWN @@ -1746,136 +1946,158 @@ def _missing_(cls: type, value: object): # noqa: ARG003 class WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent( NotificationEvent ): - """Enum for known water quality monitoring collective disorder status notification event for Notification CC.""" + """Enum for known water quality monitoring collective disorder status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 COLLECTIVE_DISORDER = 17 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> ( + WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent.UNKNOWN class WaterValveValveOperationStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve operation status notification event for Notification CC.""" + """Enum for known water valve valve operation status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 VALVE_OPERATION = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveValveOperationStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveValveOperationStatusNotificationEvent.UNKNOWN class WaterValveMasterValveOperationStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve operation status notification event for Notification CC.""" + """Enum for known water valve master valve operation status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MASTER_VALVE_OPERATION = 2 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveMasterValveOperationStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveMasterValveOperationStatusNotificationEvent.UNKNOWN class WaterValveValveShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve short circuit status notification event for Notification CC.""" + """Enum for known water valve valve short circuit status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 VALVE_SHORT_CIRCUIT = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveValveShortCircuitStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveValveShortCircuitStatusNotificationEvent.UNKNOWN class WaterValveMasterValveShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve short circuit status notification event for Notification CC.""" + """Enum for known water valve master valve short circuit status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MASTER_VALVE_SHORT_CIRCUIT = 4 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveMasterValveShortCircuitStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveMasterValveShortCircuitStatusNotificationEvent.UNKNOWN class WaterValveValveCurrentAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve current alarm status notification event for Notification CC.""" + """Enum for known water valve valve current alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 VALVE_CURRENT_ALARM = 5 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveValveCurrentAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveValveCurrentAlarmStatusNotificationEvent.UNKNOWN class WaterValveMasterValveCurrentAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve current alarm status notification event for Notification CC.""" + """Enum for known water valve master valve current alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MASTER_VALVE_CURRENT_ALARM = 6 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WaterValveMasterValveCurrentAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WaterValveMasterValveCurrentAlarmStatusNotificationEvent.UNKNOWN class WeatherAlarmRainAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm rain alarm status notification event for Notification CC.""" + """Enum for known weather alarm rain alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 RAIN_ALARM = 1 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WeatherAlarmRainAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WeatherAlarmRainAlarmStatusNotificationEvent.UNKNOWN class WeatherAlarmMoistureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm moisture alarm status notification event for Notification CC.""" + """Enum for known weather alarm moisture alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 MOISTURE_ALARM = 2 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WeatherAlarmMoistureAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WeatherAlarmMoistureAlarmStatusNotificationEvent.UNKNOWN class WeatherAlarmFreezeAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm freeze alarm status notification event for Notification CC.""" + """Enum for known weather alarm freeze alarm status notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FREEZE_ALARM = 3 @classmethod - def _missing_(cls: type, value: object): # noqa: ARG003 + def _missing_( + cls: type, value: object + ) -> WeatherAlarmFreezeAlarmStatusNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" return WeatherAlarmFreezeAlarmStatusNotificationEvent.UNKNOWN -NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, type[NotificationEvent]] = { +NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, set[type[NotificationEvent]]] = { NotificationType.ACCESS_CONTROL: { AccessControlBarrierBatteryStatusNotificationEvent, AccessControlBarrierControlStatusNotificationEvent, From 415a4099a4a88e0e8a591996c23ab473bac7a4ef Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:24:13 -0400 Subject: [PATCH 05/14] Disable pylint warnings --- scripts/generate_notification_constants.py | 1 + zwave_js_server/const/command_class/notification.py | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index c359935d0..21301b6f6 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -139,6 +139,7 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: ) lines = [ + "# pylint: disable=line-too-long,too-many-lines", '"""Constants for the Notification CC."""', "", "# ----------------------------------------------------------------------------------- #", diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 4a2f04601..797152501 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,too-many-lines """Constants for the Notification CC.""" # ----------------------------------------------------------------------------------- # From 7579357d17b2764276fc661c2e75e4d49abf19e1 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:31:18 -0400 Subject: [PATCH 06/14] Add additional enums and map --- scripts/generate_notification_constants.py | 141 +- .../const/command_class/notification.py | 2410 +++++------------ 2 files changed, 737 insertions(+), 1814 deletions(-) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 21301b6f6..2f37f7816 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -6,7 +6,6 @@ import pathlib import re import subprocess -from collections import defaultdict from collections.abc import Callable, Mapping import requests @@ -63,23 +62,32 @@ def format_for_class_name(name: str) -> str: ) notifications = {} +params = {} for notification_type, notification_payload in notifications_file.items(): notification_type = int(notification_type, 16) notification_name = notification_payload["name"].title() notifications[notification_name] = { "type": notification_type, - "variables": {}, "events": {}, } - for variable in notification_payload.get("variables", []): - variable_name = variable["name"].title() - states = notifications[notification_name]["variables"].setdefault( - variable_name, {} - ) - for state_id, state_props in variable["states"].items(): + for event in notification_payload.get("variables", []): + event_name = event["name"].title() + states = notifications[notification_name]["events"] + for state_id, state_props in event["states"].items(): state_id = int(state_id, 16) state_name = state_props["label"].title() + if ( + state_name.lower() not in event_name.lower() + and event_name.lower() not in state_name.lower() + ): + state_name = f"{event_name} {state_name}" states[state_name] = state_id + if "params" in state_props and state_props["params"]["type"] == "enum": + for enum_id, enum_name in state_props["params"]["values"].items(): + enum_id = int(enum_id, 16) + params.setdefault(notification_name, {}).setdefault(state_name, {})[ + enum_name.title() + ] = enum_id for event_id, event_data in notification_payload.get("events", {}).items(): event_id = int(event_id, 16) notifications[notification_name]["events"][ @@ -88,6 +96,9 @@ def format_for_class_name(name: str) -> str: notifications = dict(sorted(notifications.items(), key=lambda kv: kv[0])) +params = dict(sorted(params.items(), key=lambda kv: kv[0])) +for notification_name, enum_data in params.items(): + params[notification_name] = dict(sorted(enum_data.items(), key=lambda kv: kv[0])) def generate_int_enum_class_definition( @@ -102,18 +113,16 @@ def generate_int_enum_class_definition( """Generate an IntEnum class definition as an array of lines of string.""" class_def: list[str] = [] class_def.append(f"class {class_name}({base_class}):") - docstring = f'"""Enum for known {docstring_info}."""'.replace( - " ", " " - ) + docstring = f'"""Enum for known {docstring_info}."""'.replace(" ", " ") class_def.append(f" {docstring}") if enum_ref_url: class_def.append(f" # {enum_ref_url}") if include_missing: class_def.append(" UNKNOWN = -1") - for enum_name, enum_id in sorted(enum_map.items(), key=lambda x: x[0]): + for _enum_name, _enum_id in sorted(enum_map.items(), key=lambda x: x[0]): if get_id_func: - enum_id = get_id_func(enum_id) - class_def.append(f" {enum_name_format(enum_name, False)} = {enum_id}") + _enum_id = get_id_func(_enum_id) + class_def.append(f" {enum_name_format(_enum_name, False)} = {_enum_id}") if include_missing: class_def.extend( [ @@ -121,6 +130,11 @@ def generate_int_enum_class_definition( f" def _missing_(cls: type, value: object) -> {class_name}: # noqa: ARG003", ' """Set default enum member if an unknown value is provided."""', f" return {class_name}.UNKNOWN", + "", + " @property", + f" def unknown(self) -> {class_name}:", + ' """Return the unknown enum value so it can be checked."""', + f" return {class_name}.UNKNOWN", ] ) return class_def @@ -170,47 +184,84 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: ) ) -_notification_type_to_enum_map = defaultdict(list) -for notification_type, state_variable_map in notifications.items(): - for state_variable_name, state_variable_dict in state_variable_map[ - "variables" - ].items(): - name = f"{notification_type} {state_variable_name} Notification Event" - lines.extend( - generate_int_enum_class_definition( - format_for_class_name(name), - {**state_variable_dict, **state_variable_map["events"]}, - NOTIFICATIONS_URL, - docstring_info=name.lower(), - base_class="NotificationEvent", - include_missing=True, - ) - ) - _notification_type_to_enum_map[notification_type].append( - format_for_class_name(name) - ) -notification_type_to_enum_map = dict( - sorted(_notification_type_to_enum_map.items(), key=lambda kv: kv[0]) +lines.extend( + generate_int_enum_base_class( + "NotificationEventValue", + docstring='"""Common base class for Notification CC state value enums."""', + ) ) -for unit_name, enum_list in notification_type_to_enum_map.items(): - notification_type_to_enum_map[unit_name] = sorted(enum_list) +# Add events that have enums + +_notification_type_to_notification_event_map = {} +_notification_event_to_event_value_map = {} +for notification_type, event_map in notifications.items(): + notification_event_name = f"{notification_type} Notification Event" + lines.extend( + generate_int_enum_class_definition( + format_for_class_name(notification_event_name), + event_map["events"], + NOTIFICATIONS_URL, + docstring_info=notification_event_name.lower(), + base_class="NotificationEvent", + include_missing=True, + ) + ) + _notification_type_to_notification_event_map[ + notification_type + ] = format_for_class_name(notification_event_name) + if notification_type in params: + for event_name, event_values in params[notification_type].items(): + notification_event_value_name = f"{event_name} Notification Event Value" + lines.extend( + generate_int_enum_class_definition( + format_for_class_name(notification_event_value_name), + event_values, + NOTIFICATIONS_URL, + docstring_info=notification_event_value_name.lower(), + base_class="NotificationEventValue", + include_missing=True, + ) + ) + _notification_event_to_event_value_map[ + f"{format_for_class_name(notification_event_name)}.{enum_name_format(event_name, False)}" + ] = format_for_class_name(notification_event_value_name) +notification_type_to_notification_event_map = dict( + sorted(_notification_type_to_notification_event_map.items(), key=lambda kv: kv[0]) +) notification_type_to_event_map_line = ( "NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, " - "set[type[NotificationEvent]]] = {" + "type[NotificationEvent]] = {" ) -for notification_type, notification_events in notification_type_to_enum_map.items(): - notification_type_to_event_map_line += ( - f" NotificationType.{enum_name_format(notification_type, False)}: {{" - ) - for notification_event in notification_events: - notification_type_to_event_map_line += f"{notification_event}," - notification_type_to_event_map_line += "}," +for ( + notification_type, + notification_event, +) in notification_type_to_notification_event_map.items(): + notification_type_to_event_map_line += f" NotificationType.{enum_name_format(notification_type, False)}: {notification_event}," notification_type_to_event_map_line += "}" lines.append(notification_type_to_event_map_line) lines.append("") + +notification_event_to_event_value_map = dict( + sorted(_notification_event_to_event_value_map.items(), key=lambda kv: kv[0]) +) +notification_event_to_event_value_map_line = ( + "NOTIFICATION_EVENT_TO_EVENT_VALUE_MAP: dict[NotificationEvent, " + "type[NotificationEventValue]] = {" +) +for ( + notification_event, + notification_event_value, +) in notification_event_to_event_value_map.items(): + notification_event_to_event_value_map_line += ( + f" {notification_event}: {notification_event_value}," + ) +notification_event_to_event_value_map_line += "}" +lines.append(notification_event_to_event_value_map_line) +lines.append("") + lines.extend( [ "", diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 797152501..7482283de 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -44,319 +44,43 @@ class NotificationEvent(IntEnum): """Common base class for Notification CC states enums.""" -class AccessControlLockStateNotificationEvent(NotificationEvent): - """Enum for known access control lock state notification event.""" +class NotificationEventValue(IntEnum): + """Common base class for Notification CC state value enums.""" - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_JAMMED = 11 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlLockStateNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlLockStateNotificationEvent.UNKNOWN - - -class AccessControlKeypadStateNotificationEvent(NotificationEvent): - """Enum for known access control keypad state notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_BUSY = 17 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_TEMPORARY_DISABLED = 16 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlKeypadStateNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlKeypadStateNotificationEvent.UNKNOWN - - -class AccessControlDoorStateNotificationEvent(NotificationEvent): - """Enum for known access control door state notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - WINDOW_DOOR_IS_CLOSED = 23 - WINDOW_DOOR_IS_OPEN = 22 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlDoorStateNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlDoorStateNotificationEvent.UNKNOWN - - -class AccessControlDoorHandleStateNotificationEvent(NotificationEvent): - """Enum for known access control door handle state notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - WINDOW_DOOR_HANDLE_IS_CLOSED = 25 - WINDOW_DOOR_HANDLE_IS_OPEN = 24 - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlDoorHandleStateNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlDoorHandleStateNotificationEvent.UNKNOWN - - -class AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent( - NotificationEvent -): - """Enum for known access control barrier performing initialization process status notification event.""" +class AccessControlNotificationEvent(NotificationEvent): + """Enum for known access control notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 ALL_USER_CODES_DELETED = 12 AUTO_LOCK_LOCKED_OPERATION = 9 AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 + BARRIER_BATTERY_STATUS_BARRIER_SENSOR_LOW_BATTERY_WARNING = 74 + BARRIER_CONTROL_STATUS_BARRIER_ASSOCIATED_WITH_NON_Z_WAVE_REMOTE_CONTROL = 76 BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 BARRIER_PERFORMING_INITIALIZATION_PROCESS = 64 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ( - AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent - ): # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ( - AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent.UNKNOWN - ) - - -class AccessControlBarrierUlDisablingStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier ul disabling status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - BARRIER_UNATTENDED_OPERATION_HAS_BEEN_DISABLED_PER_UL_REQUIREMENTS = 69 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierUlDisablingStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierUlDisablingStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierVacationModeStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier vacation mode status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - BARRIER_VACATION_MODE = 71 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierVacationModeStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierVacationModeStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier safety beam obstacle status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 BARRIER_SAFETY_BEAM_OBSTACLE = 72 + BARRIER_SENSOR_STATUS_BARRIER_SENSOR_NOT_DETECTED_SUPERVISORY_ERROR = 73 + BARRIER_SHORT_CIRCUIT_STATUS_BARRIER_DETECTED_SHORT_IN_WALL_STATION_WIRES = 75 + BARRIER_UL_DISABLING_STATUS_BARRIER_UNATTENDED_OPERATION_HAS_BEEN_DISABLED_PER_UL_REQUIREMENTS = ( + 69 + ) BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 + BARRIER_VACATION_MODE = 71 + DOOR_HANDLE_STATE_WINDOW_DOOR_HANDLE_IS_CLOSED = 25 + DOOR_HANDLE_STATE_WINDOW_DOOR_HANDLE_IS_OPEN = 24 + DOOR_STATE_WINDOW_DOOR_IS_CLOSED = 23 + DOOR_STATE_WINDOW_DOOR_IS_OPEN = 22 KEYPAD_LOCK_OPERATION = 5 + KEYPAD_STATE_KEYPAD_BUSY = 17 + KEYPAD_STATE_KEYPAD_TEMPORARY_DISABLED = 16 KEYPAD_UNLOCK_OPERATION = 6 LOCK_OPERATION_WITH_USER_CODE = 33 + LOCK_STATE_LOCK_JAMMED = 11 LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 MANUAL_LOCK_OPERATION = 1 MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 @@ -366,1882 +90,1030 @@ class AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent(Notification NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 NEW_USER_CODE_ADDED = 14 NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierSensorStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_SENSOR_NOT_DETECTED_SUPERVISORY_ERROR = 73 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierSensorStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierBatteryStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier battery status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_SENSOR_LOW_BATTERY_WARNING = 74 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierBatteryStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierBatteryStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier short-circuit status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_DETECTED_SHORT_IN_WALL_STATION_WIRES = 75 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierShortCircuitStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierShortCircuitStatusNotificationEvent.UNKNOWN - - -class AccessControlBarrierControlStatusNotificationEvent(NotificationEvent): - """Enum for known access control barrier control status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALL_USER_CODES_DELETED = 12 - AUTO_LOCK_LOCKED_OPERATION = 9 - AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10 - BARRIER_ASSOCIATED_WITH_NON_Z_WAVE_REMOTE_CONTROL = 76 - BARRIER_FAILED_TO_PERFORM_REQUESTED_OPERATION_DEVICE_MALFUNCTION = 70 - BARRIER_MOTOR_HAS_EXCEEDED_MANUFACTURER_S_OPERATIONAL_TIME_LIMIT = 66 - BARRIER_OPERATION_OPEN_CLOSE_FORCE_HAS_BEEN_EXCEEDED = 65 - BARRIER_OPERATION_HAS_EXCEEDED_PHYSICAL_MECHANICAL_LIMITS = 67 - BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68 - KEYPAD_LOCK_OPERATION = 5 - KEYPAD_UNLOCK_OPERATION = 6 - LOCK_OPERATION_WITH_USER_CODE = 33 - LOCKED_BY_RF_WITH_INVALID_USER_CODE = 21 - MANUAL_LOCK_OPERATION = 1 - MANUAL_NOT_FULLY_LOCKED_OPERATION = 7 - MANUAL_UNLOCK_OPERATION = 2 - MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19 - MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32 - NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18 - NEW_USER_CODE_ADDED = 14 - NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15 - RF_LOCK_OPERATION = 3 - RF_NOT_FULLY_LOCKED_OPERATION = 8 - RF_UNLOCK_OPERATION = 4 - SINGLE_USER_CODE_DELETED = 13 - UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 - UNLOCK_OPERATION_WITH_USER_CODE = 34 - - @classmethod - def _missing_( - cls: type, value: object - ) -> AccessControlBarrierControlStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return AccessControlBarrierControlStatusNotificationEvent.UNKNOWN - - -class ApplianceProgramStatusNotificationEvent(NotificationEvent): - """Enum for known appliance program status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - PROGRAM_COMPLETED = 3 - PROGRAM_IN_PROGRESS = 2 - PROGRAM_STARTED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceProgramStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceProgramStatusNotificationEvent.UNKNOWN - - -class ApplianceMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known appliance maintenance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - REPLACE_MAIN_FILTER = 4 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceMaintenanceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceMaintenanceStatusNotificationEvent.UNKNOWN - - -class ApplianceApplianceStatusNotificationEvent(NotificationEvent): - """Enum for known appliance appliance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - BOILING = 8 - DRAINING = 14 - DRYING = 18 - RINSING = 12 - SPINNING = 16 - SUPPLYING_WATER = 6 - WASHING = 10 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceApplianceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceApplianceStatusNotificationEvent.UNKNOWN - - -class ApplianceTargetTemperatureFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance target temperature failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FAILURE_TO_SET_TARGET_TEMPERATURE = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceTargetTemperatureFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceTargetTemperatureFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceWaterSupplyFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance water supply failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - WATER_SUPPLY_FAILURE = 7 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceWaterSupplyFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceWaterSupplyFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceBoilingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance boiling failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - BOILING_FAILURE = 9 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceBoilingFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceBoilingFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceWashingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance washing failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - WASHING_FAILURE = 11 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceWashingFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceWashingFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceRinsingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance rinsing failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - RINSING_FAILURE = 13 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceRinsingFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceRinsingFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceDrainingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance draining failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - DRAINING_FAILURE = 15 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceDrainingFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceDrainingFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceSpinningFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance spinning failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - SPINNING_FAILURE = 17 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceSpinningFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceSpinningFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceDryingFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance drying failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - DRYING_FAILURE = 19 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceDryingFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceDryingFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceFanFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance fan failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FAN_FAILURE = 20 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceFanFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceFanFailureStatusNotificationEvent.UNKNOWN - - -class ApplianceCompressorFailureStatusNotificationEvent(NotificationEvent): - """Enum for known appliance compressor failure status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - COMPRESSOR_FAILURE = 21 - - @classmethod - def _missing_( - cls: type, value: object - ) -> ApplianceCompressorFailureStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ApplianceCompressorFailureStatusNotificationEvent.UNKNOWN - - -class CoAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - CARBON_MONOXIDE_DETECTED = 2 - CARBON_MONOXIDE_DETECTED_LOCATION_PROVIDED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> CoAlarmSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return CoAlarmSensorStatusNotificationEvent.UNKNOWN - - -class CoAlarmTestStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm test status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - CARBON_MONOXIDE_TEST = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> CoAlarmTestStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return CoAlarmTestStatusNotificationEvent.UNKNOWN - - -class CoAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm maintenance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - REPLACEMENT_REQUIRED = 4 - REPLACEMENT_REQUIRED_END_OF_LIFE = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> CoAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return CoAlarmMaintenanceStatusNotificationEvent.UNKNOWN - - -class CoAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm alarm status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALARM_SILENCED = 6 - - @classmethod - def _missing_( - cls: type, value: object - ) -> CoAlarmAlarmStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return CoAlarmAlarmStatusNotificationEvent.UNKNOWN - - -class CoAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known co alarm periodic inspection status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 - - @classmethod - def _missing_( - cls: type, value: object - ) -> CoAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return CoAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN - - -class Co2AlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - CARBON_DIOXIDE_DETECTED = 2 - CARBON_DIOXIDE_DETECTED_LOCATION_PROVIDED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> Co2AlarmSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return Co2AlarmSensorStatusNotificationEvent.UNKNOWN - - -class Co2AlarmTestStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm test status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - CARBON_DIOXIDE_TEST = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> Co2AlarmTestStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return Co2AlarmTestStatusNotificationEvent.UNKNOWN - - -class Co2AlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm maintenance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - REPLACEMENT_REQUIRED = 4 - REPLACEMENT_REQUIRED_END_OF_LIFE = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> Co2AlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return Co2AlarmMaintenanceStatusNotificationEvent.UNKNOWN - - -class Co2AlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm alarm status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALARM_SILENCED = 6 - - @classmethod - def _missing_( - cls: type, value: object - ) -> Co2AlarmAlarmStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return Co2AlarmAlarmStatusNotificationEvent.UNKNOWN - - -class Co2AlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known co2 alarm periodic inspection status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 - - @classmethod - def _missing_( - cls: type, value: object - ) -> Co2AlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return Co2AlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN - - -class GasAlarmCombustibleGasStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm combustible gas status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - COMBUSTIBLE_GAS_DETECTED = 2 - COMBUSTIBLE_GAS_DETECTED_LOCATION_PROVIDED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> GasAlarmCombustibleGasStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return GasAlarmCombustibleGasStatusNotificationEvent.UNKNOWN - - -class GasAlarmToxicGasStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm toxic gas status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - TOXIC_GAS_DETECTED = 4 - TOXIC_GAS_DETECTED_LOCATION_PROVIDED = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> GasAlarmToxicGasStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return GasAlarmToxicGasStatusNotificationEvent.UNKNOWN - - -class GasAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm alarm status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - GAS_ALARM_TEST = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> GasAlarmAlarmStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return GasAlarmAlarmStatusNotificationEvent.UNKNOWN - - -class GasAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known gas alarm maintenance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - REPLACEMENT_REQUIRED = 6 - - @classmethod - def _missing_( - cls: type, value: object - ) -> GasAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return GasAlarmMaintenanceStatusNotificationEvent.UNKNOWN - - -class HeatAlarmHeatSensorStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm heat sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - OVERHEAT_DETECTED = 2 - OVERHEAT_DETECTED_LOCATION_PROVIDED = 1 - RAPID_TEMPERATURE_FALL = 13 - RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 - RAPID_TEMPERATURE_RISE = 4 - RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 - UNDERHEAT_DETECTED = 6 - UNDERHEAT_DETECTED_LOCATION_PROVIDED = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HeatAlarmHeatSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HeatAlarmHeatSensorStatusNotificationEvent.UNKNOWN - - -class HeatAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm alarm status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ALARM_SILENCED = 9 - HEAT_ALARM_TEST = 7 - RAPID_TEMPERATURE_FALL = 13 - RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 - RAPID_TEMPERATURE_RISE = 4 - RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HeatAlarmAlarmStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HeatAlarmAlarmStatusNotificationEvent.UNKNOWN - - -class HeatAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm maintenance status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - RAPID_TEMPERATURE_FALL = 13 - RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 - RAPID_TEMPERATURE_RISE = 4 - RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 - REPLACEMENT_REQUIRED_END_OF_LIFE = 8 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HeatAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HeatAlarmMaintenanceStatusNotificationEvent.UNKNOWN - - -class HeatAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm periodic inspection status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 11 - RAPID_TEMPERATURE_FALL = 13 - RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 - RAPID_TEMPERATURE_RISE = 4 - RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HeatAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HeatAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN - - -class HeatAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): - """Enum for known heat alarm dust in device status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 10 - RAPID_TEMPERATURE_FALL = 13 - RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 - RAPID_TEMPERATURE_RISE = 4 - RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HeatAlarmDustInDeviceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HeatAlarmDustInDeviceStatusNotificationEvent.UNKNOWN - - -class HomeHealthPositionStatusNotificationEvent(NotificationEvent): - """Enum for known home health position status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FALL_DETECTED = 12 - LEAVING_BED = 1 - LYING_ON_BED = 3 - POSTURE_CHANGED = 4 - SITTING_ON_BED = 2 - SITTING_ON_BED_EDGE = 5 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeHealthPositionStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeHealthPositionStatusNotificationEvent.UNKNOWN - - -class HomeHealthVocLevelStatusNotificationEvent(NotificationEvent): - """Enum for known home health voc level status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FALL_DETECTED = 12 - POSTURE_CHANGED = 4 - VOLATILE_ORGANIC_COMPOUND_LEVEL = 6 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeHealthVocLevelStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeHealthVocLevelStatusNotificationEvent.UNKNOWN - - -class HomeHealthSleepApneaStatusNotificationEvent(NotificationEvent): - """Enum for known home health sleep apnea status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FALL_DETECTED = 12 - POSTURE_CHANGED = 4 - SLEEP_APNEA_DETECTED = 7 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeHealthSleepApneaStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeHealthSleepApneaStatusNotificationEvent.UNKNOWN - - -class HomeHealthSleepStageStatusNotificationEvent(NotificationEvent): - """Enum for known home health sleep stage status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FALL_DETECTED = 12 - POSTURE_CHANGED = 4 - SLEEP_STAGE_0_DETECTED_DREAMING_REM = 8 - SLEEP_STAGE_1_DETECTED_LIGHT_SLEEP_NON_REM_1 = 9 - SLEEP_STAGE_2_DETECTED_MEDIUM_SLEEP_NON_REM_2 = 10 - SLEEP_STAGE_3_DETECTED_DEEP_SLEEP_NON_REM_3 = 11 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeHealthSleepStageStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeHealthSleepStageStatusNotificationEvent.UNKNOWN - - -class HomeMonitoringHomeOccupancyStatusNotificationEvent(NotificationEvent): - """Enum for known home monitoring home occupancy status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - HOME_OCCUPIED = 2 - HOME_OCCUPIED_LOCATION_PROVIDED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeMonitoringHomeOccupancyStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeMonitoringHomeOccupancyStatusNotificationEvent.UNKNOWN - - -class HomeSecuritySensorStatusNotificationEvent(NotificationEvent): - """Enum for known home security sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - GLASS_BREAKAGE = 6 - GLASS_BREAKAGE_LOCATION_PROVIDED = 5 - IMPACT_DETECTED = 10 - INTRUSION = 2 - INTRUSION_LOCATION_PROVIDED = 1 - RF_JAMMING_DETECTED = 12 - TAMPERING_INVALID_CODE = 4 - TAMPERING_PRODUCT_MOVED = 9 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeSecuritySensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeSecuritySensorStatusNotificationEvent.UNKNOWN - - -class HomeSecurityCoverStatusNotificationEvent(NotificationEvent): - """Enum for known home security cover status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - GLASS_BREAKAGE = 6 - GLASS_BREAKAGE_LOCATION_PROVIDED = 5 - IMPACT_DETECTED = 10 - RF_JAMMING_DETECTED = 12 - TAMPERING_INVALID_CODE = 4 - TAMPERING_PRODUCT_COVER_REMOVED = 3 - TAMPERING_PRODUCT_MOVED = 9 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeSecurityCoverStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeSecurityCoverStatusNotificationEvent.UNKNOWN - - -class HomeSecurityMotionSensorStatusNotificationEvent(NotificationEvent): - """Enum for known home security motion sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - GLASS_BREAKAGE = 6 - GLASS_BREAKAGE_LOCATION_PROVIDED = 5 - IMPACT_DETECTED = 10 - MOTION_DETECTION = 8 - MOTION_DETECTION_LOCATION_PROVIDED = 7 - RF_JAMMING_DETECTED = 12 - TAMPERING_INVALID_CODE = 4 - TAMPERING_PRODUCT_MOVED = 9 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeSecurityMotionSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeSecurityMotionSensorStatusNotificationEvent.UNKNOWN - - -class HomeSecurityMagneticInterferenceStatusNotificationEvent(NotificationEvent): - """Enum for known home security magnetic interference status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - GLASS_BREAKAGE = 6 - GLASS_BREAKAGE_LOCATION_PROVIDED = 5 - IMPACT_DETECTED = 10 - MAGNETIC_FIELD_INTERFERENCE_DETECTED = 11 - RF_JAMMING_DETECTED = 12 - TAMPERING_INVALID_CODE = 4 - TAMPERING_PRODUCT_MOVED = 9 - - @classmethod - def _missing_( - cls: type, value: object - ) -> HomeSecurityMagneticInterferenceStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return HomeSecurityMagneticInterferenceStatusNotificationEvent.UNKNOWN - - -class IrrigationScheduleStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation schedule (id) status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - SCHEDULE_FINISHED = 2 - SCHEDULE_STARTED = 1 - - @classmethod - def _missing_( - cls: type, value: object - ) -> IrrigationScheduleStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return IrrigationScheduleStatusNotificationEvent.UNKNOWN - - -class IrrigationValveRunStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation valve (id) run status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - VALVE_TABLE_RUN_FINISHED = 4 - VALVE_TABLE_RUN_STARTED = 3 + RF_LOCK_OPERATION = 3 + RF_NOT_FULLY_LOCKED_OPERATION = 8 + RF_UNLOCK_OPERATION = 4 + SINGLE_USER_CODE_DELETED = 13 + UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20 + UNLOCK_OPERATION_WITH_USER_CODE = 34 @classmethod def _missing_( cls: type, value: object - ) -> IrrigationValveRunStatusNotificationEvent: # noqa: ARG003 + ) -> AccessControlNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return IrrigationValveRunStatusNotificationEvent.UNKNOWN + return AccessControlNotificationEvent.UNKNOWN + @property + def unknown(self) -> AccessControlNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return AccessControlNotificationEvent.UNKNOWN -class IrrigationDeviceConfigurationStatusNotificationEvent(NotificationEvent): - """Enum for known irrigation device configuration status notification event.""" + +class BarrierPerformingInitializationProcessNotificationEventValue( + NotificationEventValue +): + """Enum for known barrier performing initialization process notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - DEVICE_IS_NOT_CONFIGURED = 5 + PERFORMING_PROCESS = 255 + PROCESS_COMPLETED = 0 @classmethod def _missing_( cls: type, value: object - ) -> IrrigationDeviceConfigurationStatusNotificationEvent: # noqa: ARG003 + ) -> BarrierPerformingInitializationProcessNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return IrrigationDeviceConfigurationStatusNotificationEvent.UNKNOWN + return BarrierPerformingInitializationProcessNotificationEventValue.UNKNOWN + @property + def unknown(self) -> BarrierPerformingInitializationProcessNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return BarrierPerformingInitializationProcessNotificationEventValue.UNKNOWN -class LightSensorLightDetectionStatusNotificationEvent(NotificationEvent): - """Enum for known light sensor light detection status notification event.""" + +class BarrierSafetyBeamObstacleNotificationEventValue(NotificationEventValue): + """Enum for known barrier safety beam obstacle notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - LIGHT_COLOR_TRANSITION_DETECTED = 2 - LIGHT_DETECTED = 1 + NO_OBSTRUCTION = 0 + OBSTRUCTION = 255 @classmethod def _missing_( cls: type, value: object - ) -> LightSensorLightDetectionStatusNotificationEvent: # noqa: ARG003 + ) -> BarrierSafetyBeamObstacleNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return LightSensorLightDetectionStatusNotificationEvent.UNKNOWN + return BarrierSafetyBeamObstacleNotificationEventValue.UNKNOWN + @property + def unknown(self) -> BarrierSafetyBeamObstacleNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return BarrierSafetyBeamObstacleNotificationEventValue.UNKNOWN -class PestControlTrapStatusNotificationEvent(NotificationEvent): - """Enum for known pest control trap status notification event.""" + +class BarrierVacationModeNotificationEventValue(NotificationEventValue): + """Enum for known barrier vacation mode notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - PEST_DETECTED = 6 - PEST_DETECTED_LOCATION_PROVIDED = 5 - PEST_EXTERMINATED = 8 - PEST_EXTERMINATED_LOCATION_PROVIDED = 7 - TRAP_ARMED = 2 - TRAP_ARMED_LOCATION_PROVIDED = 1 - TRAP_RE_ARM_REQUIRED = 4 - TRAP_RE_ARM_REQUIRED_LOCATION_PROVIDED = 3 + MODE_DISABLED = 0 + MODE_ENABLED = 255 @classmethod def _missing_( cls: type, value: object - ) -> PestControlTrapStatusNotificationEvent: # noqa: ARG003 + ) -> BarrierVacationModeNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PestControlTrapStatusNotificationEvent.UNKNOWN + return BarrierVacationModeNotificationEventValue.UNKNOWN + + @property + def unknown(self) -> BarrierVacationModeNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return BarrierVacationModeNotificationEventValue.UNKNOWN -class PowerManagementPowerStatusNotificationEvent(NotificationEvent): - """Enum for known power management power status notification event.""" +class DoorStateWindowDoorIsOpenNotificationEventValue(NotificationEventValue): + """Enum for known door state window/door is open notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - POWER_HAS_BEEN_APPLIED = 1 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + WINDOW_DOOR_IS_OPEN_IN_REGULAR_POSITION = 0 + WINDOW_DOOR_IS_OPEN_IN_TILT_POSITION = 1 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementPowerStatusNotificationEvent: # noqa: ARG003 + ) -> DoorStateWindowDoorIsOpenNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementPowerStatusNotificationEvent.UNKNOWN + return DoorStateWindowDoorIsOpenNotificationEventValue.UNKNOWN + @property + def unknown(self) -> DoorStateWindowDoorIsOpenNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return DoorStateWindowDoorIsOpenNotificationEventValue.UNKNOWN -class PowerManagementMainsStatusNotificationEvent(NotificationEvent): - """Enum for known power management mains status notification event.""" + +class ApplianceNotificationEvent(NotificationEvent): + """Enum for known appliance notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - AC_MAINS_DISCONNECTED = 2 - AC_MAINS_RE_CONNECTED = 3 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + APPLIANCE_STATUS_BOILING = 8 + APPLIANCE_STATUS_DRAINING = 14 + APPLIANCE_STATUS_DRYING = 18 + APPLIANCE_STATUS_RINSING = 12 + APPLIANCE_STATUS_SPINNING = 16 + APPLIANCE_STATUS_SUPPLYING_WATER = 6 + APPLIANCE_STATUS_WASHING = 10 + BOILING_FAILURE = 9 + COMPRESSOR_FAILURE = 21 + DRAINING_FAILURE = 15 + DRYING_FAILURE = 19 + FAN_FAILURE = 20 + MAINTENANCE_STATUS_REPLACE_MAIN_FILTER = 4 + PROGRAM_STATUS_PROGRAM_COMPLETED = 3 + PROGRAM_STATUS_PROGRAM_IN_PROGRESS = 2 + PROGRAM_STATUS_PROGRAM_STARTED = 1 + RINSING_FAILURE = 13 + SPINNING_FAILURE = 17 + TARGET_TEMPERATURE_FAILURE_STATUS_FAILURE_TO_SET_TARGET_TEMPERATURE = 5 + WASHING_FAILURE = 11 + WATER_SUPPLY_FAILURE = 7 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementMainsStatusNotificationEvent: # noqa: ARG003 + ) -> ApplianceNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementMainsStatusNotificationEvent.UNKNOWN + return ApplianceNotificationEvent.UNKNOWN + @property + def unknown(self) -> ApplianceNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return ApplianceNotificationEvent.UNKNOWN -class PowerManagementOverCurrentStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-current status notification event.""" + +class ClockNotificationEvent(NotificationEvent): + """Enum for known clock notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - OVER_CURRENT_DETECTED = 6 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + TIME_REMAINING = 3 + TIMER_ENDED = 2 + WAKE_UP_ALERT = 1 @classmethod - def _missing_( - cls: type, value: object - ) -> PowerManagementOverCurrentStatusNotificationEvent: # noqa: ARG003 + def _missing_(cls: type, value: object) -> ClockNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementOverCurrentStatusNotificationEvent.UNKNOWN + return ClockNotificationEvent.UNKNOWN + + @property + def unknown(self) -> ClockNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return ClockNotificationEvent.UNKNOWN -class PowerManagementOverVoltageStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-voltage status notification event.""" +class CoAlarmNotificationEvent(NotificationEvent): + """Enum for known co alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - OVER_VOLTAGE_DETECTED = 7 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + ALARM_STATUS_ALARM_SILENCED = 6 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 4 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + PERIODIC_INSPECTION_STATUS_MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + SENSOR_STATUS_CARBON_MONOXIDE_DETECTED = 2 + SENSOR_STATUS_CARBON_MONOXIDE_DETECTED_LOCATION_PROVIDED = 1 + TEST_STATUS_CARBON_MONOXIDE_TEST = 3 @classmethod - def _missing_( - cls: type, value: object - ) -> PowerManagementOverVoltageStatusNotificationEvent: # noqa: ARG003 + def _missing_(cls: type, value: object) -> CoAlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementOverVoltageStatusNotificationEvent.UNKNOWN + return CoAlarmNotificationEvent.UNKNOWN + @property + def unknown(self) -> CoAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return CoAlarmNotificationEvent.UNKNOWN -class PowerManagementOverLoadStatusNotificationEvent(NotificationEvent): - """Enum for known power management over-load status notification event.""" + +class TestStatusCarbonMonoxideTestNotificationEventValue(NotificationEventValue): + """Enum for known test status carbon monoxide test notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - OVER_LOAD_DETECTED = 8 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + TEST_FAILED = 2 + TEST_OK = 1 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementOverLoadStatusNotificationEvent: # noqa: ARG003 + ) -> TestStatusCarbonMonoxideTestNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementOverLoadStatusNotificationEvent.UNKNOWN + return TestStatusCarbonMonoxideTestNotificationEventValue.UNKNOWN + + @property + def unknown(self) -> TestStatusCarbonMonoxideTestNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return TestStatusCarbonMonoxideTestNotificationEventValue.UNKNOWN -class PowerManagementLoadErrorStatusNotificationEvent(NotificationEvent): - """Enum for known power management load error status notification event.""" +class Co2AlarmNotificationEvent(NotificationEvent): + """Enum for known co2 alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - LOAD_ERROR = 9 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + ALARM_STATUS_ALARM_SILENCED = 6 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 4 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + PERIODIC_INSPECTION_STATUS_MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + SENSOR_STATUS_CARBON_DIOXIDE_DETECTED = 2 + SENSOR_STATUS_CARBON_DIOXIDE_DETECTED_LOCATION_PROVIDED = 1 + TEST_STATUS_CARBON_DIOXIDE_TEST = 3 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementLoadErrorStatusNotificationEvent: # noqa: ARG003 + ) -> Co2AlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementLoadErrorStatusNotificationEvent.UNKNOWN + return Co2AlarmNotificationEvent.UNKNOWN + + @property + def unknown(self) -> Co2AlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return Co2AlarmNotificationEvent.UNKNOWN -class PowerManagementBatteryMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery maintenance status notification event.""" +class TestStatusCarbonDioxideTestNotificationEventValue(NotificationEventValue): + """Enum for known test status carbon dioxide test notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - BATTERY_FLUID_IS_LOW = 17 - REPLACE_BATTERY_NOW = 11 - REPLACE_BATTERY_SOON = 10 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + TEST_FAILED = 2 + TEST_OK = 1 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementBatteryMaintenanceStatusNotificationEvent: # noqa: ARG003 + ) -> TestStatusCarbonDioxideTestNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementBatteryMaintenanceStatusNotificationEvent.UNKNOWN + return TestStatusCarbonDioxideTestNotificationEventValue.UNKNOWN + @property + def unknown(self) -> TestStatusCarbonDioxideTestNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return TestStatusCarbonDioxideTestNotificationEventValue.UNKNOWN -class PowerManagementBatteryLoadStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery load status notification event.""" + +class GasAlarmNotificationEvent(NotificationEvent): + """Enum for known gas alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - BATTERY_IS_CHARGING = 12 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + ALARM_STATUS_GAS_ALARM_TEST = 5 + COMBUSTIBLE_GAS_STATUS_COMBUSTIBLE_GAS_DETECTED = 2 + COMBUSTIBLE_GAS_STATUS_COMBUSTIBLE_GAS_DETECTED_LOCATION_PROVIDED = 1 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 6 + TOXIC_GAS_STATUS_TOXIC_GAS_DETECTED = 4 + TOXIC_GAS_STATUS_TOXIC_GAS_DETECTED_LOCATION_PROVIDED = 3 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementBatteryLoadStatusNotificationEvent: # noqa: ARG003 + ) -> GasAlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementBatteryLoadStatusNotificationEvent.UNKNOWN + return GasAlarmNotificationEvent.UNKNOWN + + @property + def unknown(self) -> GasAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return GasAlarmNotificationEvent.UNKNOWN -class PowerManagementBatteryLevelStatusNotificationEvent(NotificationEvent): - """Enum for known power management battery level status notification event.""" +class HeatAlarmNotificationEvent(NotificationEvent): + """Enum for known heat alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - BATTERY_IS_FULLY_CHARGED = 13 - CHARGE_BATTERY_NOW = 15 - CHARGE_BATTERY_SOON = 14 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + ALARM_STATUS_ALARM_SILENCED = 9 + ALARM_STATUS_HEAT_ALARM_TEST = 7 + DUST_IN_DEVICE_STATUS_MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 10 + HEAT_SENSOR_STATUS_OVERHEAT_DETECTED = 2 + HEAT_SENSOR_STATUS_OVERHEAT_DETECTED_LOCATION_PROVIDED = 1 + HEAT_SENSOR_STATUS_UNDERHEAT_DETECTED = 6 + HEAT_SENSOR_STATUS_UNDERHEAT_DETECTED_LOCATION_PROVIDED = 5 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED_END_OF_LIFE = 8 + PERIODIC_INSPECTION_STATUS_MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 11 + RAPID_TEMPERATURE_FALL = 13 + RAPID_TEMPERATURE_FALL_LOCATION_PROVIDED = 12 + RAPID_TEMPERATURE_RISE = 4 + RAPID_TEMPERATURE_RISE_LOCATION_PROVIDED = 3 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementBatteryLevelStatusNotificationEvent: # noqa: ARG003 + ) -> HeatAlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementBatteryLevelStatusNotificationEvent.UNKNOWN + return HeatAlarmNotificationEvent.UNKNOWN + @property + def unknown(self) -> HeatAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return HeatAlarmNotificationEvent.UNKNOWN -class PowerManagementBackupBatteryLevelStatusNotificationEvent(NotificationEvent): - """Enum for known power management backup battery level status notification event.""" + +class HomeHealthNotificationEvent(NotificationEvent): + """Enum for known home health notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - BACK_UP_BATTERY_DISCONNECTED = 18 - BACK_UP_BATTERY_IS_LOW = 16 - SURGE_DETECTED = 4 - VOLTAGE_DROP_DRIFT = 5 + FALL_DETECTED = 12 + POSITION_STATUS_LEAVING_BED = 1 + POSITION_STATUS_LYING_ON_BED = 3 + POSITION_STATUS_SITTING_ON_BED = 2 + POSITION_STATUS_SITTING_ON_BED_EDGE = 5 + POSTURE_CHANGED = 4 + SLEEP_APNEA_STATUS_SLEEP_APNEA_DETECTED = 7 + SLEEP_STAGE_STATUS_SLEEP_STAGE_0_DETECTED_DREAMING_REM = 8 + SLEEP_STAGE_STATUS_SLEEP_STAGE_1_DETECTED_LIGHT_SLEEP_NON_REM_1 = 9 + SLEEP_STAGE_STATUS_SLEEP_STAGE_2_DETECTED_MEDIUM_SLEEP_NON_REM_2 = 10 + SLEEP_STAGE_STATUS_SLEEP_STAGE_3_DETECTED_DEEP_SLEEP_NON_REM_3 = 11 + VOC_LEVEL_STATUS_VOLATILE_ORGANIC_COMPOUND_LEVEL = 6 @classmethod def _missing_( cls: type, value: object - ) -> PowerManagementBackupBatteryLevelStatusNotificationEvent: # noqa: ARG003 + ) -> HomeHealthNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return PowerManagementBackupBatteryLevelStatusNotificationEvent.UNKNOWN + return HomeHealthNotificationEvent.UNKNOWN + + @property + def unknown(self) -> HomeHealthNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return HomeHealthNotificationEvent.UNKNOWN -class SirenSirenStatusNotificationEvent(NotificationEvent): - """Enum for known siren siren status notification event.""" +class SleepApneaStatusSleepApneaDetectedNotificationEventValue(NotificationEventValue): + """Enum for known sleep apnea status sleep apnea detected notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - SIREN_ACTIVE = 1 + LOW_BREATH = 1 + NO_BREATH_AT_ALL = 2 @classmethod def _missing_( cls: type, value: object - ) -> SirenSirenStatusNotificationEvent: # noqa: ARG003 + ) -> SleepApneaStatusSleepApneaDetectedNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SirenSirenStatusNotificationEvent.UNKNOWN + return SleepApneaStatusSleepApneaDetectedNotificationEventValue.UNKNOWN + @property + def unknown(self) -> SleepApneaStatusSleepApneaDetectedNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return SleepApneaStatusSleepApneaDetectedNotificationEventValue.UNKNOWN -class SmokeAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm sensor status notification event.""" + +class VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue( + NotificationEventValue +): + """Enum for known voc level status volatile organic compound level notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - SMOKE_DETECTED = 2 - SMOKE_DETECTED_LOCATION_PROVIDED = 1 + CLEAN = 1 + HIGHLY_POLLUTED = 4 + MODERATELY_POLLUTED = 3 + SLIGHTLY_POLLUTED = 2 @classmethod def _missing_( cls: type, value: object - ) -> SmokeAlarmSensorStatusNotificationEvent: # noqa: ARG003 + ) -> ( + VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue + ): # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SmokeAlarmSensorStatusNotificationEvent.UNKNOWN + return VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue.UNKNOWN + @property + def unknown( + self, + ) -> VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue.UNKNOWN -class SmokeAlarmAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm alarm status notification event.""" + +class HomeMonitoringNotificationEvent(NotificationEvent): + """Enum for known home monitoring notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - ALARM_SILENCED = 6 - SMOKE_ALARM_TEST = 3 + HOME_OCCUPANCY_STATUS_HOME_OCCUPIED = 2 + HOME_OCCUPANCY_STATUS_HOME_OCCUPIED_LOCATION_PROVIDED = 1 @classmethod def _missing_( cls: type, value: object - ) -> SmokeAlarmAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> HomeMonitoringNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SmokeAlarmAlarmStatusNotificationEvent.UNKNOWN + return HomeMonitoringNotificationEvent.UNKNOWN + + @property + def unknown(self) -> HomeMonitoringNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return HomeMonitoringNotificationEvent.UNKNOWN -class SmokeAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm maintenance status notification event.""" +class HomeSecurityNotificationEvent(NotificationEvent): + """Enum for known home security notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - REPLACEMENT_REQUIRED = 4 - REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + COVER_STATUS_TAMPERING_PRODUCT_COVER_REMOVED = 3 + GLASS_BREAKAGE = 6 + GLASS_BREAKAGE_LOCATION_PROVIDED = 5 + IMPACT_DETECTED = 10 + MAGNETIC_INTERFERENCE_STATUS_MAGNETIC_FIELD_INTERFERENCE_DETECTED = 11 + MOTION_SENSOR_STATUS_MOTION_DETECTION = 8 + MOTION_SENSOR_STATUS_MOTION_DETECTION_LOCATION_PROVIDED = 7 + RF_JAMMING_DETECTED = 12 + SENSOR_STATUS_INTRUSION = 2 + SENSOR_STATUS_INTRUSION_LOCATION_PROVIDED = 1 + TAMPERING_INVALID_CODE = 4 + TAMPERING_PRODUCT_MOVED = 9 @classmethod def _missing_( cls: type, value: object - ) -> SmokeAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 + ) -> HomeSecurityNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SmokeAlarmMaintenanceStatusNotificationEvent.UNKNOWN + return HomeSecurityNotificationEvent.UNKNOWN + @property + def unknown(self) -> HomeSecurityNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return HomeSecurityNotificationEvent.UNKNOWN -class SmokeAlarmPeriodicInspectionStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm periodic inspection status notification event.""" + +class IrrigationNotificationEvent(NotificationEvent): + """Enum for known irrigation notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + DEVICE_CONFIGURATION_STATUS_DEVICE_IS_NOT_CONFIGURED = 5 + SCHEDULE_ID_STATUS_SCHEDULE_FINISHED = 2 + SCHEDULE_ID_STATUS_SCHEDULE_STARTED = 1 + VALVE_ID_RUN_STATUS_VALVE_TABLE_RUN_FINISHED = 4 + VALVE_ID_RUN_STATUS_VALVE_TABLE_RUN_STARTED = 3 @classmethod def _missing_( cls: type, value: object - ) -> SmokeAlarmPeriodicInspectionStatusNotificationEvent: # noqa: ARG003 + ) -> IrrigationNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SmokeAlarmPeriodicInspectionStatusNotificationEvent.UNKNOWN + return IrrigationNotificationEvent.UNKNOWN + + @property + def unknown(self) -> IrrigationNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return IrrigationNotificationEvent.UNKNOWN -class SmokeAlarmDustInDeviceStatusNotificationEvent(NotificationEvent): - """Enum for known smoke alarm dust in device status notification event.""" +class LightSensorNotificationEvent(NotificationEvent): + """Enum for known light sensor notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 8 + LIGHT_COLOR_TRANSITION_DETECTED = 2 + LIGHT_DETECTION_STATUS_LIGHT_DETECTED = 1 @classmethod def _missing_( cls: type, value: object - ) -> SmokeAlarmDustInDeviceStatusNotificationEvent: # noqa: ARG003 + ) -> LightSensorNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return SmokeAlarmDustInDeviceStatusNotificationEvent.UNKNOWN + return LightSensorNotificationEvent.UNKNOWN + + @property + def unknown(self) -> LightSensorNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return LightSensorNotificationEvent.UNKNOWN -class WaterAlarmSensorStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm sensor status notification event.""" +class PestControlNotificationEvent(NotificationEvent): + """Enum for known pest control notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATER_LEAK_DETECTED = 2 - WATER_LEAK_DETECTED_LOCATION_PROVIDED = 1 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + PEST_DETECTED = 6 + PEST_DETECTED_LOCATION_PROVIDED = 5 + PEST_EXTERMINATED = 8 + PEST_EXTERMINATED_LOCATION_PROVIDED = 7 + TRAP_STATUS_TRAP_ARMED = 2 + TRAP_STATUS_TRAP_ARMED_LOCATION_PROVIDED = 1 + TRAP_STATUS_TRAP_RE_ARM_REQUIRED = 4 + TRAP_STATUS_TRAP_RE_ARM_REQUIRED_LOCATION_PROVIDED = 3 @classmethod def _missing_( cls: type, value: object - ) -> WaterAlarmSensorStatusNotificationEvent: # noqa: ARG003 + ) -> PestControlNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmSensorStatusNotificationEvent.UNKNOWN + return PestControlNotificationEvent.UNKNOWN + @property + def unknown(self) -> PestControlNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return PestControlNotificationEvent.UNKNOWN -class WaterAlarmMaintenanceStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm maintenance status notification event.""" + +class PowerManagementNotificationEvent(NotificationEvent): + """Enum for known power management notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - REPLACE_WATER_FILTER = 5 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + BACKUP_BATTERY_LEVEL_STATUS_BACK_UP_BATTERY_DISCONNECTED = 18 + BACKUP_BATTERY_LEVEL_STATUS_BACK_UP_BATTERY_IS_LOW = 16 + BATTERY_LEVEL_STATUS_BATTERY_IS_FULLY_CHARGED = 13 + BATTERY_LEVEL_STATUS_CHARGE_BATTERY_NOW = 15 + BATTERY_LEVEL_STATUS_CHARGE_BATTERY_SOON = 14 + BATTERY_LOAD_STATUS_BATTERY_IS_CHARGING = 12 + BATTERY_MAINTENANCE_STATUS_BATTERY_FLUID_IS_LOW = 17 + BATTERY_MAINTENANCE_STATUS_REPLACE_BATTERY_NOW = 11 + BATTERY_MAINTENANCE_STATUS_REPLACE_BATTERY_SOON = 10 + LOAD_ERROR = 9 + MAINS_STATUS_AC_MAINS_DISCONNECTED = 2 + MAINS_STATUS_AC_MAINS_RE_CONNECTED = 3 + OVER_CURRENT_STATUS_OVER_CURRENT_DETECTED = 6 + OVER_LOAD_STATUS_OVER_LOAD_DETECTED = 8 + OVER_VOLTAGE_STATUS_OVER_VOLTAGE_DETECTED = 7 + POWER_STATUS_POWER_HAS_BEEN_APPLIED = 1 + SURGE_DETECTED = 4 + VOLTAGE_DROP_DRIFT = 5 @classmethod def _missing_( cls: type, value: object - ) -> WaterAlarmMaintenanceStatusNotificationEvent: # noqa: ARG003 + ) -> PowerManagementNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmMaintenanceStatusNotificationEvent.UNKNOWN + return PowerManagementNotificationEvent.UNKNOWN + @property + def unknown(self) -> PowerManagementNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return PowerManagementNotificationEvent.UNKNOWN -class WaterAlarmWaterFlowAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water flow alarm status notification event.""" + +class SirenNotificationEvent(NotificationEvent): + """Enum for known siren notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATER_FLOW_ALARM = 6 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + SIREN_STATUS_SIREN_ACTIVE = 1 @classmethod - def _missing_( - cls: type, value: object - ) -> WaterAlarmWaterFlowAlarmStatusNotificationEvent: # noqa: ARG003 + def _missing_(cls: type, value: object) -> SirenNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmWaterFlowAlarmStatusNotificationEvent.UNKNOWN + return SirenNotificationEvent.UNKNOWN + @property + def unknown(self) -> SirenNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return SirenNotificationEvent.UNKNOWN -class WaterAlarmWaterPressureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water pressure alarm status notification event.""" + +class SmokeAlarmNotificationEvent(NotificationEvent): + """Enum for known smoke alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 - WATER_PRESSURE_ALARM = 7 + ALARM_STATUS_ALARM_SILENCED = 6 + ALARM_STATUS_SMOKE_ALARM_TEST = 3 + DUST_IN_DEVICE_STATUS_MAINTENANCE_REQUIRED_DUST_IN_DEVICE = 8 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 4 + MAINTENANCE_STATUS_REPLACEMENT_REQUIRED_END_OF_LIFE = 5 + PERIODIC_INSPECTION_STATUS_MAINTENANCE_REQUIRED_PLANNED_PERIODIC_INSPECTION = 7 + SENSOR_STATUS_SMOKE_DETECTED = 2 + SENSOR_STATUS_SMOKE_DETECTED_LOCATION_PROVIDED = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterAlarmWaterPressureAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> SmokeAlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmWaterPressureAlarmStatusNotificationEvent.UNKNOWN + return SmokeAlarmNotificationEvent.UNKNOWN + @property + def unknown(self) -> SmokeAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return SmokeAlarmNotificationEvent.UNKNOWN -class WaterAlarmWaterTemperatureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water temperature alarm status notification event.""" + +class SystemNotificationEvent(NotificationEvent): + """Enum for known system notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 - WATER_TEMPERATURE_ALARM = 8 + CONTACT_FIRE_SERVICE = 2 + CONTACT_MEDICAL_SERVICE = 3 + CONTACT_POLICE = 1 @classmethod - def _missing_( - cls: type, value: object - ) -> WaterAlarmWaterTemperatureAlarmStatusNotificationEvent: # noqa: ARG003 + def _missing_(cls: type, value: object) -> SystemNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmWaterTemperatureAlarmStatusNotificationEvent.UNKNOWN + return SystemNotificationEvent.UNKNOWN + @property + def unknown(self) -> SystemNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return SystemNotificationEvent.UNKNOWN -class WaterAlarmWaterLevelAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm water level alarm status notification event.""" + +class WaterAlarmNotificationEvent(NotificationEvent): + """Enum for known water alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 + MAINTENANCE_STATUS_REPLACE_WATER_FILTER = 5 + PUMP_STATUS_SUMP_PUMP_ACTIVE = 10 + PUMP_STATUS_SUMP_PUMP_FAILURE = 11 + SENSOR_STATUS_WATER_LEAK_DETECTED = 2 + SENSOR_STATUS_WATER_LEAK_DETECTED_LOCATION_PROVIDED = 1 + WATER_FLOW_ALARM = 6 WATER_LEVEL_ALARM = 9 WATER_LEVEL_DROPPED = 4 WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + WATER_PRESSURE_ALARM = 7 + WATER_TEMPERATURE_ALARM = 8 @classmethod def _missing_( cls: type, value: object - ) -> WaterAlarmWaterLevelAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> WaterAlarmNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterAlarmWaterLevelAlarmStatusNotificationEvent.UNKNOWN - - -class WaterAlarmPumpStatusNotificationEvent(NotificationEvent): - """Enum for known water alarm pump status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - SUMP_PUMP_ACTIVE = 10 - SUMP_PUMP_FAILURE = 11 - WATER_LEVEL_DROPPED = 4 - WATER_LEVEL_DROPPED_LOCATION_PROVIDED = 3 + return WaterAlarmNotificationEvent.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterAlarmPumpStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterAlarmPumpStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return WaterAlarmNotificationEvent.UNKNOWN -class WaterQualityMonitoringChlorineAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring chlorine alarm status notification event.""" +class WaterFlowAlarmNotificationEventValue(NotificationEventValue): + """Enum for known water flow alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - CHLORINE_ALARM = 1 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + MAX = 4 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterQualityMonitoringChlorineAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> WaterFlowAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringChlorineAlarmStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringAcidityStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring acidity (ph) status notification event.""" + return WaterFlowAlarmNotificationEventValue.UNKNOWN - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - ACIDITY_PH_ALARM = 2 - - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterQualityMonitoringAcidityStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringAcidityStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterFlowAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return WaterFlowAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent( - NotificationEvent -): - """Enum for known water quality monitoring water oxidation alarm status notification event.""" +class WaterLevelAlarmNotificationEventValue(NotificationEventValue): + """Enum for known water level alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATER_OXIDATION_ALARM = 3 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> ( - WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent - ): # noqa: ARG003 + ) -> WaterLevelAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringChlorineSensorStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring chlorine sensor status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - CHLORINE_EMPTY = 4 + return WaterLevelAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterQualityMonitoringChlorineSensorStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringChlorineSensorStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterLevelAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return WaterLevelAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringAciditySensorStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring acidity (ph) sensor status notification event.""" +class WaterPressureAlarmNotificationEventValue(NotificationEventValue): + """Enum for known water pressure alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - ACIDITY_PH_EMPTY = 5 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + MAX = 4 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterQualityMonitoringAciditySensorStatusNotificationEvent: # noqa: ARG003 + ) -> WaterPressureAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringAciditySensorStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent( - NotificationEvent -): - """Enum for known water quality monitoring waterflow measuring station sensor notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - WATERFLOW_MEASURING_STATION_SHORTAGE_DETECTED = 6 + return WaterPressureAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> ( - WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent - ): # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return ( - WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent.UNKNOWN - ) + @property + def unknown(self) -> WaterPressureAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return WaterPressureAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent( - NotificationEvent -): - """Enum for known water quality monitoring waterflow clear water sensor notification event.""" +class WaterTemperatureAlarmNotificationEventValue(NotificationEventValue): + """Enum for known water temperature alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - WATERFLOW_CLEAR_WATER_SHORTAGE_DETECTED = 7 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> ( - WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent - ): # noqa: ARG003 + ) -> WaterTemperatureAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent( - NotificationEvent -): - """Enum for known water quality monitoring disinfection system status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - DISINFECTION_SYSTEM_ERROR_DETECTED = 8 + return WaterTemperatureAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> ( - WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent - ): # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterTemperatureAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return WaterTemperatureAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringFilterCleaningStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring filter cleaning status notification event.""" +class WaterQualityMonitoringNotificationEvent(NotificationEvent): + """Enum for known water quality monitoring notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - FILTER_CLEANING_ONGOING = 9 + ACIDITY_PH_SENSOR_STATUS_ACIDITY_PH_EMPTY = 5 + ACIDITY_PH_STATUS_ACIDITY_PH_ALARM = 2 + CHLORINE_ALARM = 1 + CHLORINE_SENSOR_STATUS_CHLORINE_EMPTY = 4 + COLLECTIVE_DISORDER = 17 + DISINFECTION_SYSTEM_STATUS_DISINFECTION_SYSTEM_ERROR_DETECTED = 8 + DRY_PROTECTION_STATUS_DRY_PROTECTION_OPERATION_ACTIVE = 13 + FILTER_CLEANING_STATUS_FILTER_CLEANING_ONGOING = 9 + FILTER_PUMP_STATUS_FILTER_PUMP_OPERATION_ONGOING = 11 + FRESHWATER_FLOW_STATUS_FRESHWATER_OPERATION_ONGOING = 12 + HEATING_STATUS_HEATING_OPERATION_ONGOING = 10 + WATER_OXIDATION_ALARM = 3 + WATER_TANK_STATUS_WATER_TANK_IS_EMPTY = 14 + WATER_TANK_STATUS_WATER_TANK_IS_FULL = 16 + WATER_TANK_STATUS_WATER_TANK_LEVEL_IS_UNKNOWN = 15 + WATERFLOW_CLEAR_WATER_SENSOR_WATERFLOW_CLEAR_WATER_SHORTAGE_DETECTED = 7 + WATERFLOW_MEASURING_STATION_SENSOR_WATERFLOW_MEASURING_STATION_SHORTAGE_DETECTED = 6 @classmethod def _missing_( cls: type, value: object - ) -> WaterQualityMonitoringFilterCleaningStatusNotificationEvent: # noqa: ARG003 + ) -> WaterQualityMonitoringNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringFilterCleaningStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringHeatingStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring heating status notification event.""" + return WaterQualityMonitoringNotificationEvent.UNKNOWN - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - HEATING_OPERATION_ONGOING = 10 - - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterQualityMonitoringHeatingStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringHeatingStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterQualityMonitoringNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return WaterQualityMonitoringNotificationEvent.UNKNOWN -class WaterQualityMonitoringFilterPumpStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring filter pump status notification event.""" +class AcidityStatusAcidityAlarmNotificationEventValue(NotificationEventValue): + """Enum for known acidity (ph) status acidity (ph) alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - FILTER_PUMP_OPERATION_ONGOING = 11 + ABOVE_HIGH_THRESHOLD = 2 + BELOW_LOW_THRESHOLD = 1 + DECREASING_PH = 3 + INCREASING_PH = 4 @classmethod def _missing_( cls: type, value: object - ) -> WaterQualityMonitoringFilterPumpStatusNotificationEvent: # noqa: ARG003 + ) -> AcidityStatusAcidityAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringFilterPumpStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring freshwater flow status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - FRESHWATER_OPERATION_ONGOING = 12 + return AcidityStatusAcidityAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> AcidityStatusAcidityAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return AcidityStatusAcidityAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringDryProtectionStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring dry protection status notification event.""" +class ChlorineAlarmNotificationEventValue(NotificationEventValue): + """Enum for known chlorine alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - DRY_PROTECTION_OPERATION_ACTIVE = 13 + ABOVE_HIGH_THRESHOLD = 2 + BELOW_LOW_THRESHOLD = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterQualityMonitoringDryProtectionStatusNotificationEvent: # noqa: ARG003 + ) -> ChlorineAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringDryProtectionStatusNotificationEvent.UNKNOWN - - -class WaterQualityMonitoringWaterTankStatusNotificationEvent(NotificationEvent): - """Enum for known water quality monitoring water tank status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - WATER_TANK_IS_EMPTY = 14 - WATER_TANK_IS_FULL = 16 - WATER_TANK_LEVEL_IS_UNKNOWN = 15 + return ChlorineAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterQualityMonitoringWaterTankStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringWaterTankStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> ChlorineAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return ChlorineAlarmNotificationEventValue.UNKNOWN -class WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent( - NotificationEvent -): - """Enum for known water quality monitoring collective disorder status notification event.""" +class WaterOxidationAlarmNotificationEventValue(NotificationEventValue): + """Enum for known water oxidation alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - COLLECTIVE_DISORDER = 17 + ABOVE_HIGH_THRESHOLD = 2 + BELOW_LOW_THRESHOLD = 1 @classmethod def _missing_( cls: type, value: object - ) -> ( - WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent - ): # noqa: ARG003 + ) -> WaterOxidationAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent.UNKNOWN - - -class WaterValveValveOperationStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve operation status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - VALVE_OPERATION = 1 + return WaterOxidationAlarmNotificationEventValue.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterValveValveOperationStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterValveValveOperationStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterOxidationAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return WaterOxidationAlarmNotificationEventValue.UNKNOWN -class WaterValveMasterValveOperationStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve operation status notification event.""" +class WaterValveNotificationEvent(NotificationEvent): + """Enum for known water valve notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 + MASTER_VALVE_CURRENT_ALARM = 6 MASTER_VALVE_OPERATION = 2 - - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterValveMasterValveOperationStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterValveMasterValveOperationStatusNotificationEvent.UNKNOWN - - -class WaterValveValveShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve short circuit status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 + MASTER_VALVE_SHORT_CIRCUIT = 4 + VALVE_CURRENT_ALARM = 5 + VALVE_OPERATION = 1 VALVE_SHORT_CIRCUIT = 3 @classmethod def _missing_( cls: type, value: object - ) -> WaterValveValveShortCircuitStatusNotificationEvent: # noqa: ARG003 + ) -> WaterValveNotificationEvent: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterValveValveShortCircuitStatusNotificationEvent.UNKNOWN - - -class WaterValveMasterValveShortCircuitStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve short circuit status notification event.""" - - # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json - UNKNOWN = -1 - MASTER_VALVE_SHORT_CIRCUIT = 4 + return WaterValveNotificationEvent.UNKNOWN - @classmethod - def _missing_( - cls: type, value: object - ) -> WaterValveMasterValveShortCircuitStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WaterValveMasterValveShortCircuitStatusNotificationEvent.UNKNOWN + @property + def unknown(self) -> WaterValveNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return WaterValveNotificationEvent.UNKNOWN -class WaterValveValveCurrentAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water valve valve current alarm status notification event.""" +class MasterValveCurrentAlarmNotificationEventValue(NotificationEventValue): + """Enum for known master valve current alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - VALVE_CURRENT_ALARM = 5 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + MAX = 4 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterValveValveCurrentAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> MasterValveCurrentAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterValveValveCurrentAlarmStatusNotificationEvent.UNKNOWN + return MasterValveCurrentAlarmNotificationEventValue.UNKNOWN + @property + def unknown(self) -> MasterValveCurrentAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return MasterValveCurrentAlarmNotificationEventValue.UNKNOWN -class WaterValveMasterValveCurrentAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known water valve master valve current alarm status notification event.""" + +class MasterValveOperationNotificationEventValue(NotificationEventValue): + """Enum for known master valve operation notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - MASTER_VALVE_CURRENT_ALARM = 6 + OFF_CLOSED = 0 + ON_OPEN = 1 @classmethod def _missing_( cls: type, value: object - ) -> WaterValveMasterValveCurrentAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> MasterValveOperationNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WaterValveMasterValveCurrentAlarmStatusNotificationEvent.UNKNOWN + return MasterValveOperationNotificationEventValue.UNKNOWN + @property + def unknown(self) -> MasterValveOperationNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return MasterValveOperationNotificationEventValue.UNKNOWN -class WeatherAlarmRainAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm rain alarm status notification event.""" + +class ValveCurrentAlarmNotificationEventValue(NotificationEventValue): + """Enum for known valve current alarm notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - RAIN_ALARM = 1 + ABOVE_HIGH_THRESHOLD = 3 + BELOW_LOW_THRESHOLD = 2 + MAX = 4 + NO_DATA = 1 @classmethod def _missing_( cls: type, value: object - ) -> WeatherAlarmRainAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> ValveCurrentAlarmNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WeatherAlarmRainAlarmStatusNotificationEvent.UNKNOWN + return ValveCurrentAlarmNotificationEventValue.UNKNOWN + @property + def unknown(self) -> ValveCurrentAlarmNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return ValveCurrentAlarmNotificationEventValue.UNKNOWN -class WeatherAlarmMoistureAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm moisture alarm status notification event.""" + +class ValveOperationNotificationEventValue(NotificationEventValue): + """Enum for known valve operation notification event value.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - MOISTURE_ALARM = 2 + OFF_CLOSED = 0 + ON_OPEN = 1 @classmethod def _missing_( cls: type, value: object - ) -> WeatherAlarmMoistureAlarmStatusNotificationEvent: # noqa: ARG003 + ) -> ValveOperationNotificationEventValue: # noqa: ARG003 """Set default enum member if an unknown value is provided.""" - return WeatherAlarmMoistureAlarmStatusNotificationEvent.UNKNOWN + return ValveOperationNotificationEventValue.UNKNOWN + @property + def unknown(self) -> ValveOperationNotificationEventValue: + """Return the unknown enum value so it can be checked.""" + return ValveOperationNotificationEventValue.UNKNOWN -class WeatherAlarmFreezeAlarmStatusNotificationEvent(NotificationEvent): - """Enum for known weather alarm freeze alarm status notification event.""" + +class WeatherAlarmNotificationEvent(NotificationEvent): + """Enum for known weather alarm notification event.""" # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 FREEZE_ALARM = 3 + MOISTURE_ALARM = 2 + RAIN_ALARM = 1 @classmethod def _missing_( cls: type, value: object - ) -> WeatherAlarmFreezeAlarmStatusNotificationEvent: # noqa: ARG003 - """Set default enum member if an unknown value is provided.""" - return WeatherAlarmFreezeAlarmStatusNotificationEvent.UNKNOWN - - -NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, set[type[NotificationEvent]]] = { - NotificationType.ACCESS_CONTROL: { - AccessControlBarrierBatteryStatusNotificationEvent, - AccessControlBarrierControlStatusNotificationEvent, - AccessControlBarrierPerformingInitializationProcessStatusNotificationEvent, - AccessControlBarrierSafetyBeamObstacleStatusNotificationEvent, - AccessControlBarrierSensorStatusNotificationEvent, - AccessControlBarrierShortCircuitStatusNotificationEvent, - AccessControlBarrierUlDisablingStatusNotificationEvent, - AccessControlBarrierVacationModeStatusNotificationEvent, - AccessControlDoorHandleStateNotificationEvent, - AccessControlDoorStateNotificationEvent, - AccessControlKeypadStateNotificationEvent, - AccessControlLockStateNotificationEvent, - }, - NotificationType.APPLIANCE: { - ApplianceApplianceStatusNotificationEvent, - ApplianceBoilingFailureStatusNotificationEvent, - ApplianceCompressorFailureStatusNotificationEvent, - ApplianceDrainingFailureStatusNotificationEvent, - ApplianceDryingFailureStatusNotificationEvent, - ApplianceFanFailureStatusNotificationEvent, - ApplianceMaintenanceStatusNotificationEvent, - ApplianceProgramStatusNotificationEvent, - ApplianceRinsingFailureStatusNotificationEvent, - ApplianceSpinningFailureStatusNotificationEvent, - ApplianceTargetTemperatureFailureStatusNotificationEvent, - ApplianceWashingFailureStatusNotificationEvent, - ApplianceWaterSupplyFailureStatusNotificationEvent, - }, - NotificationType.CO_ALARM: { - CoAlarmAlarmStatusNotificationEvent, - CoAlarmMaintenanceStatusNotificationEvent, - CoAlarmPeriodicInspectionStatusNotificationEvent, - CoAlarmSensorStatusNotificationEvent, - CoAlarmTestStatusNotificationEvent, - }, - NotificationType.CO2_ALARM: { - Co2AlarmAlarmStatusNotificationEvent, - Co2AlarmMaintenanceStatusNotificationEvent, - Co2AlarmPeriodicInspectionStatusNotificationEvent, - Co2AlarmSensorStatusNotificationEvent, - Co2AlarmTestStatusNotificationEvent, - }, - NotificationType.GAS_ALARM: { - GasAlarmAlarmStatusNotificationEvent, - GasAlarmCombustibleGasStatusNotificationEvent, - GasAlarmMaintenanceStatusNotificationEvent, - GasAlarmToxicGasStatusNotificationEvent, - }, - NotificationType.HEAT_ALARM: { - HeatAlarmAlarmStatusNotificationEvent, - HeatAlarmDustInDeviceStatusNotificationEvent, - HeatAlarmHeatSensorStatusNotificationEvent, - HeatAlarmMaintenanceStatusNotificationEvent, - HeatAlarmPeriodicInspectionStatusNotificationEvent, - }, - NotificationType.HOME_HEALTH: { - HomeHealthPositionStatusNotificationEvent, - HomeHealthSleepApneaStatusNotificationEvent, - HomeHealthSleepStageStatusNotificationEvent, - HomeHealthVocLevelStatusNotificationEvent, - }, - NotificationType.HOME_MONITORING: { - HomeMonitoringHomeOccupancyStatusNotificationEvent, - }, - NotificationType.HOME_SECURITY: { - HomeSecurityCoverStatusNotificationEvent, - HomeSecurityMagneticInterferenceStatusNotificationEvent, - HomeSecurityMotionSensorStatusNotificationEvent, - HomeSecuritySensorStatusNotificationEvent, - }, - NotificationType.IRRIGATION: { - IrrigationDeviceConfigurationStatusNotificationEvent, - IrrigationScheduleStatusNotificationEvent, - IrrigationValveRunStatusNotificationEvent, - }, - NotificationType.LIGHT_SENSOR: { - LightSensorLightDetectionStatusNotificationEvent, - }, - NotificationType.PEST_CONTROL: { - PestControlTrapStatusNotificationEvent, - }, - NotificationType.POWER_MANAGEMENT: { - PowerManagementBackupBatteryLevelStatusNotificationEvent, - PowerManagementBatteryLevelStatusNotificationEvent, - PowerManagementBatteryLoadStatusNotificationEvent, - PowerManagementBatteryMaintenanceStatusNotificationEvent, - PowerManagementLoadErrorStatusNotificationEvent, - PowerManagementMainsStatusNotificationEvent, - PowerManagementOverCurrentStatusNotificationEvent, - PowerManagementOverLoadStatusNotificationEvent, - PowerManagementOverVoltageStatusNotificationEvent, - PowerManagementPowerStatusNotificationEvent, - }, - NotificationType.SIREN: { - SirenSirenStatusNotificationEvent, - }, - NotificationType.SMOKE_ALARM: { - SmokeAlarmAlarmStatusNotificationEvent, - SmokeAlarmDustInDeviceStatusNotificationEvent, - SmokeAlarmMaintenanceStatusNotificationEvent, - SmokeAlarmPeriodicInspectionStatusNotificationEvent, - SmokeAlarmSensorStatusNotificationEvent, - }, - NotificationType.WATER_ALARM: { - WaterAlarmMaintenanceStatusNotificationEvent, - WaterAlarmPumpStatusNotificationEvent, - WaterAlarmSensorStatusNotificationEvent, - WaterAlarmWaterFlowAlarmStatusNotificationEvent, - WaterAlarmWaterLevelAlarmStatusNotificationEvent, - WaterAlarmWaterPressureAlarmStatusNotificationEvent, - WaterAlarmWaterTemperatureAlarmStatusNotificationEvent, - }, - NotificationType.WATER_QUALITY_MONITORING: { - WaterQualityMonitoringAciditySensorStatusNotificationEvent, - WaterQualityMonitoringAcidityStatusNotificationEvent, - WaterQualityMonitoringChlorineAlarmStatusNotificationEvent, - WaterQualityMonitoringChlorineSensorStatusNotificationEvent, - WaterQualityMonitoringCollectiveDisorderStatusNotificationEvent, - WaterQualityMonitoringDisinfectionSystemStatusNotificationEvent, - WaterQualityMonitoringDryProtectionStatusNotificationEvent, - WaterQualityMonitoringFilterCleaningStatusNotificationEvent, - WaterQualityMonitoringFilterPumpStatusNotificationEvent, - WaterQualityMonitoringFreshwaterFlowStatusNotificationEvent, - WaterQualityMonitoringHeatingStatusNotificationEvent, - WaterQualityMonitoringWaterOxidationAlarmStatusNotificationEvent, - WaterQualityMonitoringWaterTankStatusNotificationEvent, - WaterQualityMonitoringWaterflowClearWaterSensorNotificationEvent, - WaterQualityMonitoringWaterflowMeasuringStationSensorNotificationEvent, - }, - NotificationType.WATER_VALVE: { - WaterValveMasterValveCurrentAlarmStatusNotificationEvent, - WaterValveMasterValveOperationStatusNotificationEvent, - WaterValveMasterValveShortCircuitStatusNotificationEvent, - WaterValveValveCurrentAlarmStatusNotificationEvent, - WaterValveValveOperationStatusNotificationEvent, - WaterValveValveShortCircuitStatusNotificationEvent, - }, - NotificationType.WEATHER_ALARM: { - WeatherAlarmFreezeAlarmStatusNotificationEvent, - WeatherAlarmMoistureAlarmStatusNotificationEvent, - WeatherAlarmRainAlarmStatusNotificationEvent, - }, + ) -> WeatherAlarmNotificationEvent: # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return WeatherAlarmNotificationEvent.UNKNOWN + + @property + def unknown(self) -> WeatherAlarmNotificationEvent: + """Return the unknown enum value so it can be checked.""" + return WeatherAlarmNotificationEvent.UNKNOWN + + +NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, type[NotificationEvent]] = { + NotificationType.ACCESS_CONTROL: AccessControlNotificationEvent, + NotificationType.APPLIANCE: ApplianceNotificationEvent, + NotificationType.CLOCK: ClockNotificationEvent, + NotificationType.CO_ALARM: CoAlarmNotificationEvent, + NotificationType.CO2_ALARM: Co2AlarmNotificationEvent, + NotificationType.GAS_ALARM: GasAlarmNotificationEvent, + NotificationType.HEAT_ALARM: HeatAlarmNotificationEvent, + NotificationType.HOME_HEALTH: HomeHealthNotificationEvent, + NotificationType.HOME_MONITORING: HomeMonitoringNotificationEvent, + NotificationType.HOME_SECURITY: HomeSecurityNotificationEvent, + NotificationType.IRRIGATION: IrrigationNotificationEvent, + NotificationType.LIGHT_SENSOR: LightSensorNotificationEvent, + NotificationType.PEST_CONTROL: PestControlNotificationEvent, + NotificationType.POWER_MANAGEMENT: PowerManagementNotificationEvent, + NotificationType.SIREN: SirenNotificationEvent, + NotificationType.SMOKE_ALARM: SmokeAlarmNotificationEvent, + NotificationType.SYSTEM: SystemNotificationEvent, + NotificationType.WATER_ALARM: WaterAlarmNotificationEvent, + NotificationType.WATER_QUALITY_MONITORING: WaterQualityMonitoringNotificationEvent, + NotificationType.WATER_VALVE: WaterValveNotificationEvent, + NotificationType.WEATHER_ALARM: WeatherAlarmNotificationEvent, +} + +NOTIFICATION_EVENT_TO_EVENT_VALUE_MAP: dict[ + NotificationEvent, type[NotificationEventValue] +] = { + AccessControlNotificationEvent.BARRIER_PERFORMING_INITIALIZATION_PROCESS: BarrierPerformingInitializationProcessNotificationEventValue, + AccessControlNotificationEvent.BARRIER_SAFETY_BEAM_OBSTACLE: BarrierSafetyBeamObstacleNotificationEventValue, + AccessControlNotificationEvent.BARRIER_VACATION_MODE: BarrierVacationModeNotificationEventValue, + AccessControlNotificationEvent.DOOR_STATE_WINDOW_DOOR_IS_OPEN: DoorStateWindowDoorIsOpenNotificationEventValue, + Co2AlarmNotificationEvent.TEST_STATUS_CARBON_DIOXIDE_TEST: TestStatusCarbonDioxideTestNotificationEventValue, + CoAlarmNotificationEvent.TEST_STATUS_CARBON_MONOXIDE_TEST: TestStatusCarbonMonoxideTestNotificationEventValue, + HomeHealthNotificationEvent.SLEEP_APNEA_STATUS_SLEEP_APNEA_DETECTED: SleepApneaStatusSleepApneaDetectedNotificationEventValue, + HomeHealthNotificationEvent.VOC_LEVEL_STATUS_VOLATILE_ORGANIC_COMPOUND_LEVEL: VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue, + WaterAlarmNotificationEvent.WATER_FLOW_ALARM: WaterFlowAlarmNotificationEventValue, + WaterAlarmNotificationEvent.WATER_LEVEL_ALARM: WaterLevelAlarmNotificationEventValue, + WaterAlarmNotificationEvent.WATER_PRESSURE_ALARM: WaterPressureAlarmNotificationEventValue, + WaterAlarmNotificationEvent.WATER_TEMPERATURE_ALARM: WaterTemperatureAlarmNotificationEventValue, + WaterQualityMonitoringNotificationEvent.ACIDITY_PH_STATUS_ACIDITY_PH_ALARM: AcidityStatusAcidityAlarmNotificationEventValue, + WaterQualityMonitoringNotificationEvent.CHLORINE_ALARM: ChlorineAlarmNotificationEventValue, + WaterQualityMonitoringNotificationEvent.WATER_OXIDATION_ALARM: WaterOxidationAlarmNotificationEventValue, + WaterValveNotificationEvent.MASTER_VALVE_CURRENT_ALARM: MasterValveCurrentAlarmNotificationEventValue, + WaterValveNotificationEvent.MASTER_VALVE_OPERATION: MasterValveOperationNotificationEventValue, + WaterValveNotificationEvent.VALVE_CURRENT_ALARM: ValveCurrentAlarmNotificationEventValue, + WaterValveNotificationEvent.VALVE_OPERATION: ValveOperationNotificationEventValue, } From 47c371e98be6890713b6defc98e0fdf7fb13ca5d Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:33:51 -0400 Subject: [PATCH 07/14] Remove repeated logic --- scripts/generate_notification_constants.py | 5 - .../const/command_class/notification.py | 202 ------------------ 2 files changed, 207 deletions(-) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 2f37f7816..35e172721 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -130,11 +130,6 @@ def generate_int_enum_class_definition( f" def _missing_(cls: type, value: object) -> {class_name}: # noqa: ARG003", ' """Set default enum member if an unknown value is provided."""', f" return {class_name}.UNKNOWN", - "", - " @property", - f" def unknown(self) -> {class_name}:", - ' """Return the unknown enum value so it can be checked."""', - f" return {class_name}.UNKNOWN", ] ) return class_def diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 7482283de..528b5c575 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -104,11 +104,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return AccessControlNotificationEvent.UNKNOWN - @property - def unknown(self) -> AccessControlNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return AccessControlNotificationEvent.UNKNOWN - class BarrierPerformingInitializationProcessNotificationEventValue( NotificationEventValue @@ -127,11 +122,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return BarrierPerformingInitializationProcessNotificationEventValue.UNKNOWN - @property - def unknown(self) -> BarrierPerformingInitializationProcessNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return BarrierPerformingInitializationProcessNotificationEventValue.UNKNOWN - class BarrierSafetyBeamObstacleNotificationEventValue(NotificationEventValue): """Enum for known barrier safety beam obstacle notification event value.""" @@ -148,11 +138,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return BarrierSafetyBeamObstacleNotificationEventValue.UNKNOWN - @property - def unknown(self) -> BarrierSafetyBeamObstacleNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return BarrierSafetyBeamObstacleNotificationEventValue.UNKNOWN - class BarrierVacationModeNotificationEventValue(NotificationEventValue): """Enum for known barrier vacation mode notification event value.""" @@ -169,11 +154,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return BarrierVacationModeNotificationEventValue.UNKNOWN - @property - def unknown(self) -> BarrierVacationModeNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return BarrierVacationModeNotificationEventValue.UNKNOWN - class DoorStateWindowDoorIsOpenNotificationEventValue(NotificationEventValue): """Enum for known door state window/door is open notification event value.""" @@ -190,11 +170,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return DoorStateWindowDoorIsOpenNotificationEventValue.UNKNOWN - @property - def unknown(self) -> DoorStateWindowDoorIsOpenNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return DoorStateWindowDoorIsOpenNotificationEventValue.UNKNOWN - class ApplianceNotificationEvent(NotificationEvent): """Enum for known appliance notification event.""" @@ -230,11 +205,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return ApplianceNotificationEvent.UNKNOWN - @property - def unknown(self) -> ApplianceNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return ApplianceNotificationEvent.UNKNOWN - class ClockNotificationEvent(NotificationEvent): """Enum for known clock notification event.""" @@ -250,11 +220,6 @@ def _missing_(cls: type, value: object) -> ClockNotificationEvent: # noqa: ARG0 """Set default enum member if an unknown value is provided.""" return ClockNotificationEvent.UNKNOWN - @property - def unknown(self) -> ClockNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return ClockNotificationEvent.UNKNOWN - class CoAlarmNotificationEvent(NotificationEvent): """Enum for known co alarm notification event.""" @@ -274,11 +239,6 @@ def _missing_(cls: type, value: object) -> CoAlarmNotificationEvent: # noqa: AR """Set default enum member if an unknown value is provided.""" return CoAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> CoAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return CoAlarmNotificationEvent.UNKNOWN - class TestStatusCarbonMonoxideTestNotificationEventValue(NotificationEventValue): """Enum for known test status carbon monoxide test notification event value.""" @@ -295,11 +255,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return TestStatusCarbonMonoxideTestNotificationEventValue.UNKNOWN - @property - def unknown(self) -> TestStatusCarbonMonoxideTestNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return TestStatusCarbonMonoxideTestNotificationEventValue.UNKNOWN - class Co2AlarmNotificationEvent(NotificationEvent): """Enum for known co2 alarm notification event.""" @@ -321,11 +276,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return Co2AlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> Co2AlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return Co2AlarmNotificationEvent.UNKNOWN - class TestStatusCarbonDioxideTestNotificationEventValue(NotificationEventValue): """Enum for known test status carbon dioxide test notification event value.""" @@ -342,11 +292,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return TestStatusCarbonDioxideTestNotificationEventValue.UNKNOWN - @property - def unknown(self) -> TestStatusCarbonDioxideTestNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return TestStatusCarbonDioxideTestNotificationEventValue.UNKNOWN - class GasAlarmNotificationEvent(NotificationEvent): """Enum for known gas alarm notification event.""" @@ -367,11 +312,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return GasAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> GasAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return GasAlarmNotificationEvent.UNKNOWN - class HeatAlarmNotificationEvent(NotificationEvent): """Enum for known heat alarm notification event.""" @@ -399,11 +339,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return HeatAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> HeatAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return HeatAlarmNotificationEvent.UNKNOWN - class HomeHealthNotificationEvent(NotificationEvent): """Enum for known home health notification event.""" @@ -430,11 +365,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return HomeHealthNotificationEvent.UNKNOWN - @property - def unknown(self) -> HomeHealthNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return HomeHealthNotificationEvent.UNKNOWN - class SleepApneaStatusSleepApneaDetectedNotificationEventValue(NotificationEventValue): """Enum for known sleep apnea status sleep apnea detected notification event value.""" @@ -451,11 +381,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return SleepApneaStatusSleepApneaDetectedNotificationEventValue.UNKNOWN - @property - def unknown(self) -> SleepApneaStatusSleepApneaDetectedNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return SleepApneaStatusSleepApneaDetectedNotificationEventValue.UNKNOWN - class VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue( NotificationEventValue @@ -478,13 +403,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue.UNKNOWN - @property - def unknown( - self, - ) -> VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue.UNKNOWN - class HomeMonitoringNotificationEvent(NotificationEvent): """Enum for known home monitoring notification event.""" @@ -501,11 +419,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return HomeMonitoringNotificationEvent.UNKNOWN - @property - def unknown(self) -> HomeMonitoringNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return HomeMonitoringNotificationEvent.UNKNOWN - class HomeSecurityNotificationEvent(NotificationEvent): """Enum for known home security notification event.""" @@ -532,11 +445,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return HomeSecurityNotificationEvent.UNKNOWN - @property - def unknown(self) -> HomeSecurityNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return HomeSecurityNotificationEvent.UNKNOWN - class IrrigationNotificationEvent(NotificationEvent): """Enum for known irrigation notification event.""" @@ -556,11 +464,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return IrrigationNotificationEvent.UNKNOWN - @property - def unknown(self) -> IrrigationNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return IrrigationNotificationEvent.UNKNOWN - class LightSensorNotificationEvent(NotificationEvent): """Enum for known light sensor notification event.""" @@ -577,11 +480,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return LightSensorNotificationEvent.UNKNOWN - @property - def unknown(self) -> LightSensorNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return LightSensorNotificationEvent.UNKNOWN - class PestControlNotificationEvent(NotificationEvent): """Enum for known pest control notification event.""" @@ -604,11 +502,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return PestControlNotificationEvent.UNKNOWN - @property - def unknown(self) -> PestControlNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return PestControlNotificationEvent.UNKNOWN - class PowerManagementNotificationEvent(NotificationEvent): """Enum for known power management notification event.""" @@ -641,11 +534,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return PowerManagementNotificationEvent.UNKNOWN - @property - def unknown(self) -> PowerManagementNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return PowerManagementNotificationEvent.UNKNOWN - class SirenNotificationEvent(NotificationEvent): """Enum for known siren notification event.""" @@ -659,11 +547,6 @@ def _missing_(cls: type, value: object) -> SirenNotificationEvent: # noqa: ARG0 """Set default enum member if an unknown value is provided.""" return SirenNotificationEvent.UNKNOWN - @property - def unknown(self) -> SirenNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return SirenNotificationEvent.UNKNOWN - class SmokeAlarmNotificationEvent(NotificationEvent): """Enum for known smoke alarm notification event.""" @@ -686,11 +569,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return SmokeAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> SmokeAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return SmokeAlarmNotificationEvent.UNKNOWN - class SystemNotificationEvent(NotificationEvent): """Enum for known system notification event.""" @@ -706,11 +584,6 @@ def _missing_(cls: type, value: object) -> SystemNotificationEvent: # noqa: ARG """Set default enum member if an unknown value is provided.""" return SystemNotificationEvent.UNKNOWN - @property - def unknown(self) -> SystemNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return SystemNotificationEvent.UNKNOWN - class WaterAlarmNotificationEvent(NotificationEvent): """Enum for known water alarm notification event.""" @@ -736,11 +609,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> WaterAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return WaterAlarmNotificationEvent.UNKNOWN - class WaterFlowAlarmNotificationEventValue(NotificationEventValue): """Enum for known water flow alarm notification event value.""" @@ -759,11 +627,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterFlowAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> WaterFlowAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return WaterFlowAlarmNotificationEventValue.UNKNOWN - class WaterLevelAlarmNotificationEventValue(NotificationEventValue): """Enum for known water level alarm notification event value.""" @@ -781,11 +644,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterLevelAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> WaterLevelAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return WaterLevelAlarmNotificationEventValue.UNKNOWN - class WaterPressureAlarmNotificationEventValue(NotificationEventValue): """Enum for known water pressure alarm notification event value.""" @@ -804,11 +662,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterPressureAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> WaterPressureAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return WaterPressureAlarmNotificationEventValue.UNKNOWN - class WaterTemperatureAlarmNotificationEventValue(NotificationEventValue): """Enum for known water temperature alarm notification event value.""" @@ -826,11 +679,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterTemperatureAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> WaterTemperatureAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return WaterTemperatureAlarmNotificationEventValue.UNKNOWN - class WaterQualityMonitoringNotificationEvent(NotificationEvent): """Enum for known water quality monitoring notification event.""" @@ -862,11 +710,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterQualityMonitoringNotificationEvent.UNKNOWN - @property - def unknown(self) -> WaterQualityMonitoringNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return WaterQualityMonitoringNotificationEvent.UNKNOWN - class AcidityStatusAcidityAlarmNotificationEventValue(NotificationEventValue): """Enum for known acidity (ph) status acidity (ph) alarm notification event value.""" @@ -885,11 +728,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return AcidityStatusAcidityAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> AcidityStatusAcidityAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return AcidityStatusAcidityAlarmNotificationEventValue.UNKNOWN - class ChlorineAlarmNotificationEventValue(NotificationEventValue): """Enum for known chlorine alarm notification event value.""" @@ -906,11 +744,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return ChlorineAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> ChlorineAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return ChlorineAlarmNotificationEventValue.UNKNOWN - class WaterOxidationAlarmNotificationEventValue(NotificationEventValue): """Enum for known water oxidation alarm notification event value.""" @@ -927,11 +760,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterOxidationAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> WaterOxidationAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return WaterOxidationAlarmNotificationEventValue.UNKNOWN - class WaterValveNotificationEvent(NotificationEvent): """Enum for known water valve notification event.""" @@ -952,11 +780,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WaterValveNotificationEvent.UNKNOWN - @property - def unknown(self) -> WaterValveNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return WaterValveNotificationEvent.UNKNOWN - class MasterValveCurrentAlarmNotificationEventValue(NotificationEventValue): """Enum for known master valve current alarm notification event value.""" @@ -975,11 +798,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return MasterValveCurrentAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> MasterValveCurrentAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return MasterValveCurrentAlarmNotificationEventValue.UNKNOWN - class MasterValveOperationNotificationEventValue(NotificationEventValue): """Enum for known master valve operation notification event value.""" @@ -996,11 +814,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return MasterValveOperationNotificationEventValue.UNKNOWN - @property - def unknown(self) -> MasterValveOperationNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return MasterValveOperationNotificationEventValue.UNKNOWN - class ValveCurrentAlarmNotificationEventValue(NotificationEventValue): """Enum for known valve current alarm notification event value.""" @@ -1019,11 +832,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return ValveCurrentAlarmNotificationEventValue.UNKNOWN - @property - def unknown(self) -> ValveCurrentAlarmNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return ValveCurrentAlarmNotificationEventValue.UNKNOWN - class ValveOperationNotificationEventValue(NotificationEventValue): """Enum for known valve operation notification event value.""" @@ -1040,11 +848,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return ValveOperationNotificationEventValue.UNKNOWN - @property - def unknown(self) -> ValveOperationNotificationEventValue: - """Return the unknown enum value so it can be checked.""" - return ValveOperationNotificationEventValue.UNKNOWN - class WeatherAlarmNotificationEvent(NotificationEvent): """Enum for known weather alarm notification event.""" @@ -1062,11 +865,6 @@ def _missing_( """Set default enum member if an unknown value is provided.""" return WeatherAlarmNotificationEvent.UNKNOWN - @property - def unknown(self) -> WeatherAlarmNotificationEvent: - """Return the unknown enum value so it can be checked.""" - return WeatherAlarmNotificationEvent.UNKNOWN - NOTIFICATION_TYPE_TO_EVENT_MAP: dict[NotificationType, type[NotificationEvent]] = { NotificationType.ACCESS_CONTROL: AccessControlNotificationEvent, From 8b4012e4555d5f9f83599a95ac7f996c078b7ab2 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:46:15 -0400 Subject: [PATCH 08/14] a --- scripts/generate_multilevel_sensor_constants.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/generate_multilevel_sensor_constants.py b/scripts/generate_multilevel_sensor_constants.py index 91c946c5e..6a4bc3160 100755 --- a/scripts/generate_multilevel_sensor_constants.py +++ b/scripts/generate_multilevel_sensor_constants.py @@ -260,3 +260,15 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: ) else: print("Could not run black on new file, please run it to properly format it.") + +if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: + if subprocess.run( + ["git", "diff", "--stat"], + check=True, + ).stdout != "": + print("Repo is dirty and needs to be committed!") + exit(1) + else: + print("Repo is clean!") +else: + print("Could not run git on repo, please run it to properly format it.") From 396329f42df4ff9f207fa8b201a109d03732a9fc Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:47:24 -0400 Subject: [PATCH 09/14] a --- scripts/generate_multilevel_sensor_constants.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/generate_multilevel_sensor_constants.py b/scripts/generate_multilevel_sensor_constants.py index 6a4bc3160..d229418bf 100755 --- a/scripts/generate_multilevel_sensor_constants.py +++ b/scripts/generate_multilevel_sensor_constants.py @@ -262,10 +262,14 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: print("Could not run black on new file, please run it to properly format it.") if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: + # print(subprocess.run( + # ["git", "diff", "--stat"], + # check=True, + # ).stdout) if subprocess.run( ["git", "diff", "--stat"], check=True, - ).stdout != "": + ).stdout is not None: print("Repo is dirty and needs to be committed!") exit(1) else: From 01260684a2fc7dfbf1e2faf17431d7eb21615a20 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:49:38 -0400 Subject: [PATCH 10/14] Exit non zero if repo is dirty so we can use it in CI --- scripts/generate_multilevel_sensor_constants.py | 8 +------- scripts/generate_notification_constants.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/generate_multilevel_sensor_constants.py b/scripts/generate_multilevel_sensor_constants.py index d229418bf..3acea995d 100755 --- a/scripts/generate_multilevel_sensor_constants.py +++ b/scripts/generate_multilevel_sensor_constants.py @@ -262,17 +262,11 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: print("Could not run black on new file, please run it to properly format it.") if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: - # print(subprocess.run( - # ["git", "diff", "--stat"], - # check=True, - # ).stdout) if subprocess.run( ["git", "diff", "--stat"], check=True, ).stdout is not None: print("Repo is dirty and needs to be committed!") exit(1) - else: - print("Repo is clean!") else: - print("Could not run git on repo, please run it to properly format it.") + print("Could not run `git diff --stat` on repo, please run it to determine whether constants have changed.") diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 35e172721..431b9054c 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -297,3 +297,13 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: ) else: print("Could not run black on new file, please run it to properly format it.") + +if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: + if subprocess.run( + ["git", "diff", "--stat"], + check=True, + ).stdout is not None: + print("Repo is dirty and needs to be committed!") + exit(1) +else: + print("Could not run git on repo, please run it to properly format it.") From 07e05be03911408089fa73abfdac9dad3cf3eece Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:51:46 -0400 Subject: [PATCH 11/14] black --- scripts/generate_multilevel_sensor_constants.py | 16 +++++++++++----- scripts/generate_notification_constants.py | 16 +++++++++++----- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/generate_multilevel_sensor_constants.py b/scripts/generate_multilevel_sensor_constants.py index 3acea995d..2b6d758eb 100755 --- a/scripts/generate_multilevel_sensor_constants.py +++ b/scripts/generate_multilevel_sensor_constants.py @@ -262,11 +262,17 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: print("Could not run black on new file, please run it to properly format it.") if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: - if subprocess.run( - ["git", "diff", "--stat"], - check=True, - ).stdout is not None: + if ( + subprocess.run( + ["git", "diff", "--stat"], + check=True, + ).stdout + is not None + ): print("Repo is dirty and needs to be committed!") exit(1) else: - print("Could not run `git diff --stat` on repo, please run it to determine whether constants have changed.") + print( + "Could not run `git diff --stat` on repo, please run it to determine whether " + "constants have changed." + ) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 431b9054c..76dd03840 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -299,11 +299,17 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: print("Could not run black on new file, please run it to properly format it.") if subprocess.run(["which", "git"], capture_output=True, check=True).stdout: - if subprocess.run( - ["git", "diff", "--stat"], - check=True, - ).stdout is not None: + if ( + subprocess.run( + ["git", "diff", "--stat"], + check=True, + ).stdout + is not None + ): print("Repo is dirty and needs to be committed!") exit(1) else: - print("Could not run git on repo, please run it to properly format it.") + print( + "Could not run `git diff --stat` on repo, please run it to determine whether " + "constants have changed." + ) From d2573ca123cea695c1aff12c8f84b2afee7cb933 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:54:55 -0400 Subject: [PATCH 12/14] Update notification.py --- zwave_js_server/const/command_class/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 528b5c575..41aadfa47 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -1,4 +1,4 @@ -# pylint: disable=line-too-long,too-many-lines +# pylint: disable=line-too-long """Constants for the Notification CC.""" # ----------------------------------------------------------------------------------- # From ff9c579c7de042b4c36ad74fb84b67cdf818eaf1 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Thu, 5 Oct 2023 07:26:03 -0400 Subject: [PATCH 13/14] adjust path logic --- scripts/generate_multilevel_sensor_constants.py | 5 +++-- scripts/generate_notification_constants.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/generate_multilevel_sensor_constants.py b/scripts/generate_multilevel_sensor_constants.py index 2b6d758eb..56bf025b3 100755 --- a/scripts/generate_multilevel_sensor_constants.py +++ b/scripts/generate_multilevel_sensor_constants.py @@ -17,8 +17,9 @@ SENSOR_TYPES_FILE_PATH = "packages/config/config/sensorTypes.json" DEFAULT_SCALES_FILE_PATH = "packages/config/config/scales.json" -CONST_FILE_PATH = pathlib.Path(__file__).parent.joinpath( - "../zwave_js_server/const/command_class/multilevel_sensor.py" +CONST_FILE_PATH = ( + pathlib.Path(__file__).parent.parent + / "zwave_js_server/const/command_class/multilevel_sensor.py" ) diff --git a/scripts/generate_notification_constants.py b/scripts/generate_notification_constants.py index 76dd03840..9e40fc604 100755 --- a/scripts/generate_notification_constants.py +++ b/scripts/generate_notification_constants.py @@ -15,8 +15,9 @@ BRANCH_NAME = "master" NOTIFICATIONS_FILE_PATH = "packages/config/config/notifications.json" -CONST_FILE_PATH = pathlib.Path(__file__).parent.joinpath( - "../zwave_js_server/const/command_class/notification.py" +CONST_FILE_PATH = ( + pathlib.Path(__file__).parent.parent + / "zwave_js_server/const/command_class/notification.py" ) @@ -148,7 +149,7 @@ def generate_int_enum_base_class(class_name: str, docstring: str) -> list[str]: ) lines = [ - "# pylint: disable=line-too-long,too-many-lines", + "# pylint: disable=line-too-long", '"""Constants for the Notification CC."""', "", "# ----------------------------------------------------------------------------------- #", From ee8424f9a946df8a7023dbf7e3099e80ff5b737b Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:19:42 -0400 Subject: [PATCH 14/14] Pull latest data --- .../const/command_class/notification.py | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py index 41aadfa47..414ea4a99 100644 --- a/zwave_js_server/const/command_class/notification.py +++ b/zwave_js_server/const/command_class/notification.py @@ -22,6 +22,7 @@ class NotificationType(IntEnum): CLOCK = 11 CO_ALARM = 2 CO2_ALARM = 3 + EMERGENCY_ALARM = 10 GAS_ALARM = 18 HEAT_ALARM = 4 HOME_HEALTH = 13 @@ -33,7 +34,7 @@ class NotificationType(IntEnum): POWER_MANAGEMENT = 8 SIREN = 14 SMOKE_ALARM = 1 - SYSTEM = 10 + SYSTEM = 9 WATER_ALARM = 5 WATER_QUALITY_MONITORING = 21 WATER_VALVE = 15 @@ -293,6 +294,23 @@ def _missing_( return TestStatusCarbonDioxideTestNotificationEventValue.UNKNOWN +class EmergencyAlarmNotificationEvent(NotificationEvent): + """Enum for known emergency alarm notification event.""" + + # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json + UNKNOWN = -1 + CONTACT_FIRE_SERVICE = 2 + CONTACT_MEDICAL_SERVICE = 3 + CONTACT_POLICE = 1 + + @classmethod + def _missing_( + cls: type, value: object + ) -> EmergencyAlarmNotificationEvent: # noqa: ARG003 + """Set default enum member if an unknown value is provided.""" + return EmergencyAlarmNotificationEvent.UNKNOWN + + class GasAlarmNotificationEvent(NotificationEvent): """Enum for known gas alarm notification event.""" @@ -575,9 +593,13 @@ class SystemNotificationEvent(NotificationEvent): # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json UNKNOWN = -1 - CONTACT_FIRE_SERVICE = 2 - CONTACT_MEDICAL_SERVICE = 3 - CONTACT_POLICE = 1 + COVER_STATUS_TAMPERING_PRODUCT_COVER_REMOVED = 6 + EMERGENCY_SHUTOFF = 7 + HARDWARE_STATUS_SYSTEM_HARDWARE_FAILURE = 1 + HARDWARE_STATUS_SYSTEM_HARDWARE_FAILURE_WITH_FAILURE_CODE = 3 + HEARTBEAT = 5 + SOFTWARE_STATUS_SYSTEM_SOFTWARE_FAILURE = 2 + SOFTWARE_STATUS_SYSTEM_SOFTWARE_FAILURE_WITH_FAILURE_CODE = 4 @classmethod def _missing_(cls: type, value: object) -> SystemNotificationEvent: # noqa: ARG003 @@ -872,6 +894,7 @@ def _missing_( NotificationType.CLOCK: ClockNotificationEvent, NotificationType.CO_ALARM: CoAlarmNotificationEvent, NotificationType.CO2_ALARM: Co2AlarmNotificationEvent, + NotificationType.EMERGENCY_ALARM: EmergencyAlarmNotificationEvent, NotificationType.GAS_ALARM: GasAlarmNotificationEvent, NotificationType.HEAT_ALARM: HeatAlarmNotificationEvent, NotificationType.HOME_HEALTH: HomeHealthNotificationEvent,