zha: handle "step_with_on_off" cluster command in LevelListener. (#14756)

This commit is contained in:
Alexei Chetroi 2018-06-07 16:56:07 -04:00 committed by Paulus Schoutsen
parent d4cc806cd5
commit 87d55834be

View file

@ -187,8 +187,8 @@ class Switch(zha.Entity, BinarySensorDevice):
if args[0] == 0xff:
rate = 10 # Should read default move rate
self._entity.move_level(-rate if args[0] else rate)
elif command_id == 0x0002: # step
# Step (technically shouldn't change on/off)
elif command_id in (0x0002, 0x0006): # step, -with_on_off
# Step (technically may change on/off)
self._entity.move_level(-args[1] if args[0] else args[1])
def attribute_update(self, attrid, value):