Skip to content

Commit

Permalink
Remove the call to on_off cluster in TuyaLevelControl (#1748)
Browse files Browse the repository at this point in the history
This PR will remove the call to `on_off` cluster when calling the `move_to_level_with_on_off` in the `TuyaLevelControl` (MCU) cluster.
  • Loading branch information
javicalle committed Sep 12, 2022
1 parent ded6fb1 commit a072ca3
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions zhaquirks/tuya/mcu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,21 +420,8 @@ async def command(
command_id,
args,
)
# (move_to_level_with_on_off --> send the on_off command first)
if command_id == 0x0004:
cluster_data = TuyaClusterData(
endpoint_id=self.endpoint.endpoint_id,
cluster_attr="on_off",
attr_value=args[1],
expect_reply=expect_reply,
manufacturer=manufacturer,
)
self.endpoint.device.command_bus.listener_event(
TUYA_MCU_COMMAND,
cluster_data,
)

# (move_to_level, move, move_to_level_with_on_off)
# (move_to_level_with_on_off --> ZHA have the `ForceOnLight` implementation)
if command_id in (0x0000, 0x0001, 0x0004):
cluster_data = TuyaClusterData(
endpoint_id=self.endpoint.endpoint_id,
Expand Down

0 comments on commit a072ca3

Please sign in to comment.