mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
zha: handle "step_with_on_off" cluster command in LevelListener. (#14756)
This commit is contained in:
parent
d4cc806cd5
commit
87d55834be
@ -187,8 +187,8 @@ class Switch(zha.Entity, BinarySensorDevice):
|
|||||||
if args[0] == 0xff:
|
if args[0] == 0xff:
|
||||||
rate = 10 # Should read default move rate
|
rate = 10 # Should read default move rate
|
||||||
self._entity.move_level(-rate if args[0] else rate)
|
self._entity.move_level(-rate if args[0] else rate)
|
||||||
elif command_id == 0x0002: # step
|
elif command_id in (0x0002, 0x0006): # step, -with_on_off
|
||||||
# Step (technically shouldn't change on/off)
|
# Step (technically may change on/off)
|
||||||
self._entity.move_level(-args[1] if args[0] else args[1])
|
self._entity.move_level(-args[1] if args[0] else args[1])
|
||||||
|
|
||||||
def attribute_update(self, attrid, value):
|
def attribute_update(self, attrid, value):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user