Skip to content

Commit

Permalink
Manage Tuya Human Sensor and Lux
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Nov 11, 2023
1 parent d7f5510 commit 95cc5bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Modules/switchSelectorWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"Language": {
"fr-FR": {"LevelNames": "Off | Simple click|Double click|Triple click|Quadruple+ click"}},
},

"SwitchAQ3WithOff": {
"0": (0, "00"),
"1": (1, "10"),
Expand Down Expand Up @@ -806,4 +805,17 @@
"fr-FR": { "Off|Movie|At Home|Sleep|Go Out"}
},
},
"TuyaRadarSensor": {
0: (0, "Off"),
0x1: (1, "10"),
0x2: (2, "20"),
"ForceUpdate": True,
"OffHidden": False,
"SelectorStyle": 1,
"LevelNames": "Off|Presence|Moving",
"Language": {
"fr-FR": { "Off|Presence|Deplacement"}
},
},

}
6 changes: 6 additions & 0 deletions Modules/tuyaTS0601.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ def ts0601_motion(self, Devices, nwkid, ep, value):
MajDomoDevice(self, Devices, nwkid, ep, "0406", value )
checkAndStoreAttributeValue(self, nwkid, "01", "0406", "0000", value)

def ts0601_tuya_presence_state(self, Devices, nwkid, ep, value):
# Presence State ( None, Present, Moving )
self.log.logging("Tuya0601", "Debug", "ts0601_tuya_presence_state - state %s %s %s" % (nwkid, ep, value), nwkid)
store_tuya_attribute(self, nwkid, "presence_state", value)
MajDomoDevice(self, Devices, nwkid, ep, "0006", value )

def ts0601_illuminance(self, Devices, nwkid, ep, value):
# Illuminance
Expand Down Expand Up @@ -511,6 +516,7 @@ def ts0601_sensor_irrigation_mode(self, Devices, nwkid, ep, value):
"smoke_ppm": ts0601_smoke_concentration,
"water_consumption": ts0601_water_consumption,
"power_factor": ts0601_power_factor,
"presence_state": ts0601_tuya_presence_state
}

def ts0601_tuya_cmd(self, NwkId, Ep, action, data):
Expand Down

0 comments on commit 95cc5bc

Please sign in to comment.