Skip to content

Commit

Permalink
Actuatoir based on TS0601 DP
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Aug 16, 2024
1 parent 6f5b3dc commit d6def0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Modules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ def handle_command_off(self,Devices, DeviceID, Unit, Level, Nwkid, EPout, Device
return

elif DeviceType in ( "Venetian", "Vanne", "Curtain"):

if model_name in ( "PR412", "CPR412", "CPR412-E"):
actuator_off(self, Nwkid, EPout, "Light")

Expand All @@ -420,6 +421,9 @@ def handle_command_off(self,Devices, DeviceID, Unit, Level, Nwkid, EPout, Device

elif DeviceType in ( "CurtainInverted", "Curtain"):
# Refresh will be done via the Report Attribute
if ts0601_extract_data_point_infos( self, model_name):
ts0601_actuator(self, Nwkid, "CurtainState", 0)
update_domoticz_widget(self, Devices, DeviceID, Unit, 0, "Off", BatteryLevel, SignalLevel, ForceUpdate_=forceUpdateDev)
return

else:
Expand Down Expand Up @@ -600,6 +604,10 @@ def handle_command_on(self,Devices, DeviceID, Unit, Level, Nwkid, EPout, DeviceT
actuator_on(self, Nwkid, EPout, "WindowCovering")

elif DeviceType in ( "CurtainInverted", "Curtain"):
if ts0601_extract_data_point_infos( self, model_name):
ts0601_actuator(self, Nwkid, "CurtainState", 1)
update_domoticz_widget(self, Devices, DeviceID, Unit, 0, "Open", BatteryLevel, SignalLevel, ForceUpdate_=forceUpdateDev)

return

else:
Expand Down Expand Up @@ -954,6 +962,10 @@ def handle_command_setlevel(self,Devices, DeviceID, Unit, Level, Nwkid, EPout, D
profalux_MoveToLiftAndTilt(self, Nwkid, tilt=Tilt)

elif DeviceType in ( "WindowCovering", "Venetian", "Vanne", "Curtain", "VenetianInverted", "VanneInverted", "CurtainInverted"):
if ts0601_extract_data_point_infos( self, model_name):
ts0601_actuator(self, Nwkid, "CurtainLevel", int(Level))
update_domoticz_widget(self, Devices, DeviceID, Unit, 2, str(Level), BatteryLevel, SignalLevel, ForceUpdate_=forceUpdateDev)

_set_level_windows_covering(self, DeviceType, Nwkid, EPout, Level)

elif DeviceType == "AlarmWD":
Expand Down

0 comments on commit d6def0c

Please sign in to comment.