Skip to content

Commit

Permalink
adding level to the Tuya Moe to Huve
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 authored Oct 23, 2023
1 parent bea4027 commit 3df3e3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/tuya.py
Original file line number Diff line number Diff line change
Expand Up @@ -1526,15 +1526,15 @@ def tuya_color_control_rgbMode( self, NwkId, mode):
payload = "11" + sqn + "f0" + mode
raw_APS_request(self, NwkId, "01", "0300", "0104", payload, zigpyzqn=sqn, zigate_ep=ZIGATE_EP, ackIsDisabled=False)

def tuya_Move_To_Hue_Saturation( self, NwkId, EPout, hue, saturation, transition):
def tuya_Move_To_Hue_Saturation( self, NwkId, EPout, hue, saturation, transition, level):
# Command 0x06
self.log.logging("Tuya", "Debug", "tuya_Move_To_Hue_Saturation", NwkId)

hue = "%02x" % hue
saturation = "%02x" % saturation

sqn = get_and_inc_ZCL_SQN(self, NwkId)
payload = "11" + sqn + "06" + hue + saturation + "0000" + "ff"
payload = "11" + sqn + "06" + hue + saturation + "0000" + "%02x" %level

raw_APS_request(self, NwkId, EPout, "0300", "0104", payload, zigpyzqn=sqn, zigate_ep=ZIGATE_EP, ackIsDisabled=False)

Expand All @@ -1549,4 +1549,4 @@ def tuya_Move_To_Hue_Saturation_Brightness( self, NwkId, epout, hue, saturation,
sqn = get_and_inc_ZCL_SQN(self, NwkId)
payload = "11" + sqn + "e1" + hue + saturation + brightness

raw_APS_request(self, NwkId, epout, "0300", "0104", payload, zigpyzqn=sqn, zigate_ep=ZIGATE_EP, ackIsDisabled=False)
raw_APS_request(self, NwkId, epout, "0300", "0104", payload, zigpyzqn=sqn, zigate_ep=ZIGATE_EP, ackIsDisabled=False)

0 comments on commit 3df3e3d

Please sign in to comment.