From 65339ddc4b580b010c9fb0ba0252e3bc208b92cb Mon Sep 17 00:00:00 2001 From: Glenn Waters Date: Mon, 30 Sep 2024 10:55:30 -0400 Subject: [PATCH] Add new const for keypad; fix re syntax. --- bin/cmdr.py | 2 +- elkm1_lib/const.py | 1 + pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cmdr.py b/bin/cmdr.py index f9363ff..6485df0 100644 --- a/bin/cmdr.py +++ b/bin/cmdr.py @@ -60,7 +60,7 @@ def parse_range(rng, max): def parse_element_command(cmd, line, max): - match = re.match("([\d,\- <*]+)(\w*.*)", line) + match = re.match("([\\d,\\- <*]+)(\\w*.*)", line) if match: ids = parse_range(match.groups()[0], max) subcommand = parse_subcommand(match.groups()[1]) diff --git a/elkm1_lib/const.py b/elkm1_lib/const.py index 73cb20b..0ef0e38 100644 --- a/elkm1_lib/const.py +++ b/elkm1_lib/const.py @@ -180,6 +180,7 @@ class ZoneAlarmState(Enum): class KeypadKeys(Enum): """Keys on the keypad.""" + NO_KEY = 0 USER_CODE_ENTERED = 0 STAR = 11 POUND = 12 diff --git a/pyproject.toml b/pyproject.toml index 2027ff5..9146668 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "elkm1-lib" -version = "2.2.7" +version = "2.2.8" description = "Library for interacting with ElkM1 alarm/automation panel." readme = "README.md" requires-python = ">= 3.11"