Skip to content

Commit

Permalink
DDF for Tuya Photoelectric smoke detector (#6736)
Browse files Browse the repository at this point in the history
* Add DDF for Tuya Photoelectric Smoke Detector _TZE200_m9skfctm

Create DDF for Tuya Photoelectric Smoke Detector _TZE200_m9skfctm
Description is in #6734

* Invert the fire logic

For this tuya device 0 means fire
  • Loading branch information
BabaIsYou authored Mar 2, 2023
1 parent d43ce4f commit a8f4a77
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions devices/tuya/_TZE200_m9skfctm_smoke_detector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "_TZE200_m9skfctm",
"modelid": "TS0601",
"vendor": "Tuya",
"product": "Photoelectric Smoke sensor",
"sleeper": true,
"status": "Silver",
"subdevices": [
{
"type": "$TYPE_FIRE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0xef00"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
"read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"awake": true,
"refresh.interval": 3600,
"read": {
"fn": "none"
},
"parse": {
"dpid": 15,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/enrolled",
"public": false
},
{
"name": "config/on"
},
{
"name": "config/pending"
},
{
"name": "config/reachable"
},
{
"name": "state/errorcode",
"read": {
"fn": "none"
},
"parse": {
"dpid": 11,
"eval": "Item.val = String(Attr.val);",
"fn": "tuya"
},
"default": "0"
},
{
"name": "state/fire",
"awake": true,
"read": {
"fn": "none"
},
"parse": {
"dpid": 1,
"eval": "Item.val = (Attr.val == 0 ? true : false);",
"fn": "tuya"
},
"default": false
},
{
"name": "state/lastupdated"
},
{
"name": "state/test",
"read": {
"fn": "none"
},
"parse": {
"dpid": 101,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"cl": "0xEF00"
}
]
}

0 comments on commit a8f4a77

Please sign in to comment.