bug-fix: device status led in gfw_dirk
Tento commit je obsažen v:
rodič
2864660082
revize
0dda549124
@ -243,8 +243,6 @@ class ground_floor_west_dirk(room_shelly_tradfri_light):
|
||||
self.active_device_state = self.STATE_ACTIVE_DEVICE_AMPLIFIER
|
||||
else:
|
||||
self.choose_next_device()
|
||||
for num in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
|
||||
self.active_device_state_led.set_state(num, self.active_device_state == num)
|
||||
|
||||
def get_activity_state(self, state):
|
||||
if state == self.STATE_ACTIVE_DEVICE_MAIN_LIGHT:
|
||||
@ -261,6 +259,8 @@ class ground_floor_west_dirk(room_shelly_tradfri_light):
|
||||
target_state = (start_value + i + 1) % (self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1)
|
||||
if self.get_activity_state(target_state):
|
||||
self.active_device_state = target_state
|
||||
for num in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
|
||||
self.active_device_state_led.set_state(num, self.active_device_state == num)
|
||||
return
|
||||
self.active_device_state = None
|
||||
|
||||
@ -271,6 +271,8 @@ class ground_floor_west_dirk(room_shelly_tradfri_light):
|
||||
target_state = (start_value - i - 1) % (self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1)
|
||||
if self.get_activity_state(target_state):
|
||||
self.active_device_state = target_state
|
||||
for num in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
|
||||
self.active_device_state_led.set_state(num, self.active_device_state == num)
|
||||
return
|
||||
self.active_device_state = None
|
||||
|
||||
|
Načítá se…
x
Odkázat v novém úkolu
Zablokovat Uživatele