From 6903eeefcd10859ff66e45dd1cd57299b6a817df Mon Sep 17 00:00:00 2001 From: MattHag <16444067+MattHag@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:06:08 +0100 Subject: [PATCH] Remove NamedInts: Convert LedFormChoices to enum Related #2273 --- lib/logitech_receiver/hidpp20.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index 0b9430b5..6d5c868c 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -1002,7 +1002,16 @@ class LedRampChoice(IntEnum): NO = 2 -LEDFormChoices = common.NamedInts(default=0, sine=1, square=2, triangle=3, sawtooth=4, sharkfin=5, exponential=6) +class LedFormChoices(IntEnum): + DEFAULT = 0 + SINE = 1 + SQUARE = 2 + TRIANGLE = 3 + SAWTOOTH = 4 + SHARKFIN = 5 + EXPONENTIAL = 6 + + LEDParamSize = { LEDParam.color: 3, LEDParam.speed: 1,