Skip to content

Commit

Permalink
Merge branch 'wip-stable7-7.1.13' into upgrade-zigpy-libraries-7-1-13…
Browse files Browse the repository at this point in the history
…-stable7
  • Loading branch information
pipiche38 committed Aug 16, 2024
2 parents 9268b53 + d6def0c commit bfff4fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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
3 changes: 2 additions & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ def onStop(self):
Domoticz.Log("onStop()")

# Flush ListOfDevices
self.log.logging("Plugin", "Log", "Flushing plugin database onto disk")
if self.log:
self.log.logging("Plugin", "Log", "Flushing plugin database onto disk")
WriteDeviceList(self, 0) # write immediatly

# Uninstall Z4D custom UI from Domoticz
Expand Down

0 comments on commit bfff4fe

Please sign in to comment.