From ce37672216395c9abb8d799b0c2448f757e4e1fb Mon Sep 17 00:00:00 2001 From: raman325 <7243222+raman325@users.noreply.github.com> Date: Wed, 22 Sep 2021 01:23:37 -0400 Subject: [PATCH] Add additional property constants --- zwave_js_server/const/__init__.py | 5 +++++ zwave_js_server/const/command_class/barrier_operator.py | 2 ++ zwave_js_server/const/command_class/lock.py | 4 ++++ zwave_js_server/const/command_class/meter.py | 2 ++ zwave_js_server/const/command_class/notification.py | 3 +++ zwave_js_server/const/command_class/protection.py | 4 ++++ zwave_js_server/const/command_class/sound_switch.py | 4 ++++ 7 files changed, 24 insertions(+) create mode 100644 zwave_js_server/const/command_class/notification.py create mode 100644 zwave_js_server/const/command_class/protection.py diff --git a/zwave_js_server/const/__init__.py b/zwave_js_server/const/__init__.py index 485623536..895d52330 100644 --- a/zwave_js_server/const/__init__.py +++ b/zwave_js_server/const/__init__.py @@ -10,9 +10,14 @@ INTERVIEW_FAILED = "Failed" +CURRENT_STATE_PROPERTY = "currentState" TARGET_STATE_PROPERTY = "targetState" +CURRENT_VALUE_PROPERTY = "currentValue" TARGET_VALUE_PROPERTY = "targetValue" +TRANSITION_DURATION_OPTION = "transitionDuration" +VOLUME_OPTION = "volume" + class CommandStatus(str, Enum): """Status of a command sent to zwave-js-server.""" diff --git a/zwave_js_server/const/command_class/barrier_operator.py b/zwave_js_server/const/command_class/barrier_operator.py index f3a16ce99..d19d18a65 100644 --- a/zwave_js_server/const/command_class/barrier_operator.py +++ b/zwave_js_server/const/command_class/barrier_operator.py @@ -1,6 +1,8 @@ """Constants for the Barrier Operator CC.""" from enum import IntEnum +SIGNALING_STATE_PROPERTY = "signalingState" + class BarrierEventSignalingSubsystemState(IntEnum): """Enum with all (known/used) Z-Wave Barrier Event Signaling Subsystem States.""" diff --git a/zwave_js_server/const/command_class/lock.py b/zwave_js_server/const/command_class/lock.py index e740f3ea1..7fd062c76 100644 --- a/zwave_js_server/const/command_class/lock.py +++ b/zwave_js_server/const/command_class/lock.py @@ -46,6 +46,10 @@ class CodeSlotStatus(IntEnum): LOCK_USERCODE_PROPERTY = "userCode" LOCK_USERCODE_STATUS_PROPERTY = "userIdStatus" +DOOR_STATUS_PROPERTY = "doorStatus" +CURRENT_MODE_PROPERTY = "currentMode" +LOCKED_PROPERTY = "locked" + ATTR_CODE_SLOT = "code_slot" ATTR_IN_USE = "in_use" ATTR_NAME = "name" diff --git a/zwave_js_server/const/command_class/meter.py b/zwave_js_server/const/command_class/meter.py index 280142e87..09341ef7e 100644 --- a/zwave_js_server/const/command_class/meter.py +++ b/zwave_js_server/const/command_class/meter.py @@ -2,6 +2,8 @@ from enum import IntEnum from typing import Dict, Set, Type, Union +VALUE_PROPERTY = "value" + CC_SPECIFIC_SCALE = "scale" CC_SPECIFIC_METER_TYPE = "meterType" CC_SPECIFIC_RATE_TYPE = "rateType" diff --git a/zwave_js_server/const/command_class/notification.py b/zwave_js_server/const/command_class/notification.py new file mode 100644 index 000000000..176feb41e --- /dev/null +++ b/zwave_js_server/const/command_class/notification.py @@ -0,0 +1,3 @@ +"""Constants for the Notification CC.""" + +CC_SPECIFIC_NOTIFICATION_TYPE = "notificationType" diff --git a/zwave_js_server/const/command_class/protection.py b/zwave_js_server/const/command_class/protection.py new file mode 100644 index 000000000..148b624be --- /dev/null +++ b/zwave_js_server/const/command_class/protection.py @@ -0,0 +1,4 @@ +"""Constants for the Protection CC.""" + +LOCAL_PROPERTY = "local" +RF_PROPERTY = "rf" diff --git a/zwave_js_server/const/command_class/sound_switch.py b/zwave_js_server/const/command_class/sound_switch.py index 69309f8dc..0af65980b 100644 --- a/zwave_js_server/const/command_class/sound_switch.py +++ b/zwave_js_server/const/command_class/sound_switch.py @@ -1,6 +1,10 @@ """Constants for the Sound Switch CC.""" from enum import IntEnum +TONE_ID_PROPERTY = "toneId" +DEFAULT_TONE_ID_PROPERTY = "defaultToneId" +DEFAULT_VOLUME_PROPERTY = "defaultVolume" + class ToneID(IntEnum): """Enum with all known Sound Switch CC tone IDs."""