Closed sirinveen closed 6 months ago
This a new Thermostat sell by MOES.
With PRESET there is only 4 entry (0 = Auto, 1 = MANUAL, 2 = OFF, 3 = ON)
To be compatible with HA or HB I change a little bit the PRESET ('holiday' will be use for Off)
I use help of this link: https://github.com/Koenkk/zigbee2mqtt/issues/18892
Question: For this Thermostat there are 7 endpoints for the schedule (Monday to Sunday) how I can create that in DDF and use by HA or Eve?
See under DDF working without schedule:
{
"schema": "devcap1.schema.json",
"manufacturername": "_TZE200_rtrmfadk",
"modelid": "TS0601",
"vendor": "Tuya",
"product": "Tuya TRS (MOES)",
"sleeper": false,
"status": "Gold",
"path": "/devices/ts0601_v1.json",
"subdevices": [
{
"type": "$TYPE_THERMOSTAT",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0201"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"write": {
"dpid": 16,
"dt": "0x2b",
"eval": "Item.val / 10;",
"fn": "tuya"
},
"parse": {
"dpid": 16,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
},
"default": 0
},
{
"name": "cap/measured_value/min",
"write": {
"dpid": 15,
"dt": "0x2b",
"eval": "Item.val / 10;",
"fn": "tuya"
},
"parse": {
"dpid": 15,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/battery",
"parse": {
"dpid": 13,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/heatsetpoint",
"read": {
"fn": "None"
},
"write": {
"dpid": 2,
"dt": "0x2b",
"eval": "Item.val / 10;",
"fn": "tuya"
},
"parse": {
"dpid": 2,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/locked",
"read": {
"fn": "none"
},
"write": {
"dpid": 12,
"dt": "0x10",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 12,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": false
},
{
"name": "config/mode",
"write": {
"dpid": 1,
"dt": "0x30",
"eval": "if (Item.val == 'auto') { 0 } else if (Item.val == 'manual') { 1 } else if (Item.val == 'off') { 2 } else { 3 }",
"fn": "tuya"
},
"parse": {
"dpid": 1,
"eval": "if (Attr.val == 0) { Item.val = 'auto' } else if (Attr.val == 1) { Item.val = 'manual' } else if (Attr.val == 2) { Item.val = 'off' } else { Item.val = 'on' }",
"fn": "tuya"
}
},
{
"name": "config/offset",
"read": {
"fn": "None"
},
"write": {
"dpid": 101,
"dt": "0x2b",
"eval": "Item.val / 10;",
"fn": "tuya"
},
"parse": {
"dpid": 101,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/preset",
"read": {
"fn": "none"
},
"write": {
"dpid": 1,
"dt": "0x30",
"eval": "if (Item.val == 'auto') { 0 } else if (Item.val == 'manual') { 1 } else if (Item.val == 'holiday') { 2 } else { 3 }",
"fn": "tuya"
},
"parse": {
"dpid": 1,
"eval": "if (Attr.val == 0) { Item.val = 'auto' } else if (Attr.val == 1) { Item.val = 'manual' } else if (Attr.val == 2) { Item.val = 'holiday' } else { Item.val = 'on' }",
"fn": "tuya"
}
},
{
"name": "config/reachable"
},
{
"name": "config/reversed",
"write": {
"dpid": 113,
"dt": "0x30",
"eval": "if (Item.val == 'up') { 0 } else { 1 }",
"fn": "tuya"
},
"parse": {
"dpid": 113,
"eval": "f (Attr.val == 0) { Item.val = 'up' } else { Item.val = 'down' }",
"fn": "tuya"
},
"default": false
},
{
"name": "config/schedule",
"parse": {
"dpid": 17,
"eval": "Item.val = Attr.val",
"fn": "tuya"
},
"default": "1"
},
{
"name": "config/windowopen_set",
"read": {
"fn": "none"
},
"write": {
"dpid": 7,
"dt": "0x10",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = (Attr.val == 'OPEN');",
"fn": "tuya"
},
"default": false
},
{
"name": "config/windowopendetectionenabled",
"write": {
"dpid": 8,
"dt": "0x10",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 8,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": true
},
{
"name": "state/lastupdated"
},
{
"name": "state/lowbattery",
"description": "True when the device battery runs low."
},
{
"name": "state/temperature",
"read": {
"fn": "none"
},
"parse": {
"dpid": 3,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
},
"default": 0
},
{
"name": "state/temperature_bis",
"public": false,
"description": "Local Temperature Calibration",
"parse": {
"dpid": 101,
"eval": "Item.val = Attr.val * 10;",
"fn": "tuya"
}
},
{
"name": "state/valve",
"write": {
"fn": "None"
},
"parse": {
"dpid": 108,
"eval": "Item.val = Attr.val / 10;",
"fn": "tuya"
},
"default": 0
}
]
}
]
}
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.
As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.
Is there already an existing issue for this?
Product name
TRV801Z
Manufacturer
_TZE200_rtrmfadk
Model identifier
TS0601
Device type to add
Thermostat
Node info
Endpoints and clusters
Basic
Further relevant clusters
Power Configuration
On/Off
Level Control
Color Control
Thermostat
Simple Metering
Electrical Measurement
Any other cluster of relevance/interest