Skip to content

Commit

Permalink
use constants in multi-press handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
fholzer committed Sep 19, 2023
1 parent 1e5aa4a commit c2fdd4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zhaquirks/philips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2fdd4d

Please sign in to comment.