Skip to content

Commit

Permalink
Refactor domMaj and remove Devices[Unit].xxxx (#1681)
Browse files Browse the repository at this point in the history
* refactor and remove references to Domoticz and Devices by using abstract layer
  • Loading branch information
pipiche38 authored Dec 10, 2023
1 parent 0ae0857 commit cca108e
Show file tree
Hide file tree
Showing 3 changed files with 782 additions and 730 deletions.
6 changes: 4 additions & 2 deletions Modules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ def mgtCommand(self, Devices, Unit, Command, Level, Color):

elif DeviceType == "ThermoOnOff":
if "Model" in self.ListOfDevices[NWKID] and self.ListOfDevices[NWKID]["Model"] in ("eTRV0100"):
danfoss_on_off(self, NWKID, 0x01)
danfoss_on_off(self, NWKID, 0x01)
else:
tuya_trv_onoff(self, NWKID, 0x01)
tuya_trv_onoff(self, NWKID, 0x01)
UpdateDevice_v2(self, Devices, Unit, 1, "On", BatteryLevel, SignalLevel, ForceUpdate_=forceUpdateDev)

elif DeviceType == "ShutterCalibration":
Expand Down Expand Up @@ -1360,6 +1360,8 @@ def mgtCommand(self, Devices, Unit, Command, Level, Color):

UpdateDevice_v2(self, Devices, Unit, 1, str(Level), BatteryLevel, SignalLevel, str(Color))



def get_previous_switch_level(self, NwkId, Ep):

if NwkId not in self.ListOfDevices:
Expand Down
Loading

0 comments on commit cca108e

Please sign in to comment.