From c2fdd4d4c00c70dbf95aefafaea3cfe50b897ad6 Mon Sep 17 00:00:00 2001 From: Ferdinand Holzer Date: Tue, 19 Sep 2023 23:18:09 +0200 Subject: [PATCH] use constants in multi-press handling code --- zhaquirks/philips/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zhaquirks/philips/__init__.py b/zhaquirks/philips/__init__.py index 5fe55e33fc..823fb38239 100644 --- a/zhaquirks/philips/__init__.py +++ b/zhaquirks/philips/__init__.py @@ -178,15 +178,15 @@ def send_press_event(click_count): ) press_type = None if click_count == 1: - press_type = "press" + press_type = SHORT_PRESS elif click_count == 2: - press_type = "double_press" + press_type = DOUBLE_PRESS elif click_count == 3: - press_type = "triple_press" + press_type = TRIPLE_PRESS elif click_count == 4: - press_type = "quadruple_press" + press_type = QUADRUPLE_PRESS elif click_count > 4: - press_type = "quintuple_press" + press_type = QUINTUPLE_PRESS if press_type: # Override PRESS_TYPE