Add T5E-WF thermostat, assistance needed
See original GitHub issueHi!
Trying to add support for this Wifi thermostat for equal level of control from HA as in the Tuya app. https://www.alibaba.com/product-detail/EU-Standard-230V-Indoor-Electric-Floor_1600385798775.html?spm=a2700.shop_index.82.10.52962bc2aaT4SB
The thermostat is wrongly identified as a simple switch in the “tuya-local” component. In the “local tuya” component it is correctly identified as a thermostat allthough with very limited functionality.
Appreciate if anyone could gives some pointers to in order to get the dps mapping file in usable condition for the “local tuya” component.
Below are some excerpts from the Tuya developer portal as well as my attempted yaml mapping-file.
name: T5E-WF thermostat
primary_entity:
entity: climate
dps:
- id: 1
type: boolean
name: Switch
mapping:
- dps_val: False
value: OFF
icon: "mdi:fire-off"
- dps_val: True
value: ON
icon: "mdi:fire"
- id: 2
type: string
name: Mode
mapping:
- dps_val: cold
value: Cool
- dps_val: hot
value: Heat
- id: 3
entity: sensor
name: Working status
type: string
mapping:
- dps_val: auto
value: Auto
- dps_val: auxiliary_heat
value: Opened
- dps_val: cold
value: Cooling
- dps_val: comfortable
value: Comfortable
- dps_val: dry
value: Dry
- dps_val: eco
value: ECO
- dps_val: energy
value: Energy
- dps_val: floor_heat
value: Floor heat
- dps_val: holiday
value: Holiday
- dps_val: hot
value: Heating
- dps_val: manual
value: Manual
- dps_val: program
value: Program
- dps_val: sleep
value: Sleep
- dps_val: wind
value: Wind
- dps_val: wait
value: Wait
- id: 4
type: boolean
name: ECO mode
mapping:
- dps_val: True
value: Eco
- dps_val: False
value: Normal
- id: 8
type: boolean
name: window_check
mapping:
- dps_val: True
value: ON
- dps_val: False
value: OFF
- id: 10
type: boolean
name: Frost protection
mapping:
- dps_val: True
value: ON
- dps_val: False
value: OFF
- id: 16
type: integer
name: temperature
class: temperature
unit: C
range:
min: 0
max: 400
mapping:
- scale: 1
- step: 5
- id: 17
type: integer
name: temperature_f
class: temperature
unit: F
range:
min: 320
max: 1040
mapping:
- scale: 1
- step: 10
- id: 18
type: integer
name: upper_temp_f
class: temperature
unit: F
range:
min: 370
max: 1040
mapping:
- scale: 1
- step: 10
- id: 19
type: integer
name: upper_temp
class: temperature
unit: C
range:
min: 25
max: 400
mapping:
- scale: 1
- step: 5
- id: 20
type: integer
name: lower_temp_f
class: temperature
unit: F
range:
min: 330
max: 1000
mapping:
- scale: 1
- step: 10
- id: 22
type: Integer
name: Current power
class: energy
unit: W
icon: "mdi:lightning"
range:
min: 0
max: 50000
mapping:
- scale: 1
- step: 1
- id: 23
type: string
name: Temperature Unit
icon: "mdi:temperature-celsius"
mapping:
- dps_val: c
value: C
- dps_val: f
value: F
- id: 24
name: Current temperature
class: temperature
type: integer
unit: C
readonly: true
- id: 25
name: Window sensor
class: window
type: string
mapping:
- dps_val: close
value: Closed
- dps_val: open
value: Opened
- id: 26
type: integer
name: lower_temp
class: temperature
unit: C
range:
min: 5
max: 380
mapping:
- scale: 1
- step: 5
- id: 27
type: integer
name: Temperature correction
range:
min: -10
max: 10
mapping:
- scale: 0
- step: 1
- id: 29
name: Current temperature_F
class: temperature
unit: F
type: integer
readonly: true
- id: 31
type: string
name: Working day setting
mapping:
- dps_val: 5_2
value: 5+2
- dps_val: 6_1
value: 6+1
- id: 44
type: integer
name: Backlight brightness
range:
min: 10
max: 100
mapping:
- scale: 0
- step: 10
- id: 45
type: boolean
name: Fault alarm
mapping:
- dps_val: 0
value: OK
- dps_val: e_r1
value: ER1
- dps_val: e_r2
value: ER2
- dps_val: e_r3
value: ER3
- dps_val: e_r4
value: ER5
- dps_val: e_r5
value: ER5
- dps_val: e_r6
value: ER6
- dps_val: e_r7
value: ER7
- id: 40
name: Child Lock
category: config
type: boolean
mapping:
- dps_val: true
icon: "mdi:hand-back-right-off"
- dps_val: false
icon: "mdi:hand-back-right"
- id: 39
type: boolean
category: config
name: Factory Reset
icon: "mdi:cog-refresh"
- id: 43
type: boolean
name: uknown
mapping:
- dps_val: F
value: F
- id: 58
type: boolean
name: uknown_2
mapping:
- dps_val: pro
value: pro
{
"result": {
"category": "wk",
"functions": [
{
"code": "switch",
"dp_id": 1,
"type": "Boolean",
"values": "{}"
},
{
"code": "mode",
"dp_id": 2,
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\"]}"
},
{
"code": "eco",
"dp_id": 4,
"type": "Boolean",
"values": "{}"
},
{
"code": "window_check",
"dp_id": 8,
"type": "Boolean",
"values": "{}"
},
{
"code": "frost",
"dp_id": 10,
"type": "Boolean",
"values": "{}"
},
{
"code": "temp_set",
"dp_id": 16,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":0,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "temp_set_f",
"dp_id": 17,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":320,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp_f",
"dp_id": 18,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":370,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp",
"dp_id": 19,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":25,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "lower_temp_f",
"dp_id": 20,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":330,\"max\":1000,\"scale\":1,\"step\":10}"
},
{
"code": "temp_unit_convert",
"dp_id": 23,
"type": "Enum",
"values": "{\"range\":[\"c\",\"f\"]}"
},
{
"code": "lower_temp",
"dp_id": 26,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":5,\"max\":380,\"scale\":1,\"step\":5}"
},
{
"code": "temp_correction",
"dp_id": 27,
"type": "Integer",
"values": "{\"unit\":\"\",\"min\":-10,\"max\":10,\"scale\":0,\"step\":1}"
},
{
"code": "work_days",
"dp_id": 31,
"type": "Enum",
"values": "{\"range\":[\"5_2\",\"6_1\"]}"
},
{
"code": "factory_reset",
"dp_id": 39,
"type": "Boolean",
"values": "{}"
},
{
"code": "child_lock",
"dp_id": 40,
"type": "Boolean",
"values": "{}"
},
{
"code": "backlight",
"dp_id": 44,
"type": "Integer",
"values": "{\"unit\":\"%\",\"min\":10,\"max\":100,\"scale\":0,\"step\":10}"
}
],
"status": [
{
"code": "switch",
"dp_id": 1,
"type": "Boolean",
"values": "{}"
},
{
"code": "mode",
"dp_id": 2,
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\"]}"
},
{
"code": "work_state",
"dp_id": 3,
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\",\"wind\",\"comfortable\",\"energy\",\"auto\",\"holiday\",\"manual\",\"eco\",\"sleep\",\"dry\",\"program\",\"floor_heat\",\"auxiliary_heat\"]}"
},
{
"code": "eco",
"dp_id": 4,
"type": "Boolean",
"values": "{}"
},
{
"code": "window_check",
"dp_id": 8,
"type": "Boolean",
"values": "{}"
},
{
"code": "frost",
"dp_id": 10,
"type": "Boolean",
"values": "{}"
},
{
"code": "temp_set",
"dp_id": 16,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":0,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "temp_set_f",
"dp_id": 17,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":320,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp_f",
"dp_id": 18,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":370,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp",
"dp_id": 19,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":25,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "lower_temp_f",
"dp_id": 20,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":330,\"max\":1000,\"scale\":1,\"step\":10}"
},
{
"code": "work_power",
"dp_id": 22,
"type": "Integer",
"values": "{\"unit\":\"W\",\"min\":0,\"max\":50000,\"scale\":1,\"step\":1}"
},
{
"code": "temp_unit_convert",
"dp_id": 23,
"type": "Enum",
"values": "{\"range\":[\"c\",\"f\"]}"
},
{
"code": "temp_current",
"dp_id": 24,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":-100,\"max\":600,\"scale\":1,\"step\":5}"
},
{
"code": "window_state",
"dp_id": 25,
"type": "Enum",
"values": "{\"range\":[\"close\",\"open\"]}"
},
{
"code": "lower_temp",
"dp_id": 26,
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":5,\"max\":380,\"scale\":1,\"step\":5}"
},
{
"code": "temp_correction",
"dp_id": 27,
"type": "Integer",
"values": "{\"unit\":\"\",\"min\":-10,\"max\":10,\"scale\":0,\"step\":1}"
},
{
"code": "temp_current_f",
"dp_id": 29,
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":140,\"max\":1400,\"scale\":1,\"step\":10}"
},
{
"code": "work_days",
"dp_id": 31,
"type": "Enum",
"values": "{\"range\":[\"5_2\",\"6_1\"]}"
},
{
"code": "factory_reset",
"dp_id": 39,
"type": "Boolean",
"values": "{}"
},
{
"code": "child_lock",
"dp_id": 40,
"type": "Boolean",
"values": "{}"
},
{
"code": "backlight",
"dp_id": 44,
"type": "Integer",
"values": "{\"unit\":\"%\",\"min\":10,\"max\":100,\"scale\":0,\"step\":10}"
},
{
"code": "fault",
"dp_id": 45,
"type": "Bitmap",
"values": "{\"label\":[\"ER1\",\"ER2\",\"ER3\",\"ER4\",\"ER5\",\"ER6\",\"ER7\"]}"
}
]
},
"success": true,
"t": 1658010658453,
"tid": "f6ca2fe7055611edbf8a7eeb5c0b2a19"
}
{
"result": {
"category": "wk",
"functions": [
{
"code": "switch",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Switch",
"type": "Boolean",
"values": "{}"
},
{
"code": "mode",
"lang_config": {
"cold": "Cool",
"hot": "Heat"
},
"name": "Mode",
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\"]}"
},
{
"code": "eco",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "ECO mode",
"type": "Boolean",
"values": "{}"
},
{
"code": "window_check",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Window check",
"type": "Boolean",
"values": "{}"
},
{
"code": "frost",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Frost protection",
"type": "Boolean",
"values": "{}"
},
{
"code": "temp_set",
"lang_config": {
"unit": "°C"
},
"name": "Set temperature",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":0,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "temp_set_f",
"lang_config": {
"unit": "°F"
},
"name": "Set temperature _F",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":320,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp_f",
"lang_config": {
"unit": "℉"
},
"name": "Set temperature upper limit -℉",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":370,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp",
"lang_config": {
"unit": "℃"
},
"name": "Set temperature ceiling",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":25,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "lower_temp_f",
"lang_config": {
"unit": "℉"
},
"name": "Set the lower limit -℉",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":330,\"max\":1000,\"scale\":1,\"step\":10}"
},
{
"code": "temp_unit_convert",
"lang_config": {
"c": "℃",
"f": "℉"
},
"name": "Temperature scale",
"type": "Enum",
"values": "{\"range\":[\"c\",\"f\"]}"
},
{
"code": "lower_temp",
"lang_config": {
"unit": "°C"
},
"name": "The lower limit of temperature",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":5,\"max\":380,\"scale\":1,\"step\":5}"
},
{
"code": "temp_correction",
"lang_config": {
"unit": ""
},
"name": "Temperature correction",
"type": "Integer",
"values": "{\"unit\":\"\",\"min\":-10,\"max\":10,\"scale\":0,\"step\":1}"
},
{
"code": "work_days",
"lang_config": {
"5_2": "5+2",
"6_1": "6+1"
},
"name": "Working day setting",
"type": "Enum",
"values": "{\"range\":[\"5_2\",\"6_1\"]}"
},
{
"code": "factory_reset",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Factory data reset",
"type": "Boolean",
"values": "{}"
},
{
"code": "child_lock",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Child lock",
"type": "Boolean",
"values": "{}"
},
{
"code": "backlight",
"lang_config": {
"unit": "%"
},
"name": "Backlight brightness",
"type": "Integer",
"values": "{\"unit\":\"%\",\"min\":10,\"max\":100,\"scale\":0,\"step\":10}"
}
],
"status": [
{
"code": "switch",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Switch",
"type": "Boolean",
"values": "{}"
},
{
"code": "mode",
"lang_config": {
"cold": "Cool",
"hot": "Heat"
},
"name": "Mode",
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\"]}"
},
{
"code": "work_state",
"lang_config": {
"auto": "Auto",
"auxiliary_heat": "Auxiliary heat",
"cold": "Cooling",
"comfortable": "Comfortable",
"dry": "Dry",
"eco": "ECO",
"energy": "Energy",
"floor_heat": "Floor heat",
"holiday": "Holiday",
"hot": "Heating",
"manual": "Manual",
"program": "Program",
"sleep": "Sleep",
"wind": "Wind"
},
"name": "Working status",
"type": "Enum",
"values": "{\"range\":[\"cold\",\"hot\",\"wind\",\"comfortable\",\"energy\",\"auto\",\"holiday\",\"manual\",\"eco\",\"sleep\",\"dry\",\"program\",\"floor_heat\",\"auxiliary_heat\"]}"
},
{
"code": "eco",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "ECO mode",
"type": "Boolean",
"values": "{}"
},
{
"code": "window_check",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Window check",
"type": "Boolean",
"values": "{}"
},
{
"code": "frost",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Frost protection",
"type": "Boolean",
"values": "{}"
},
{
"code": "temp_set",
"lang_config": {
"unit": "°C"
},
"name": "Set temperature",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":0,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "temp_set_f",
"lang_config": {
"unit": "°F"
},
"name": "Set temperature _F",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":320,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp_f",
"lang_config": {
"unit": "℉"
},
"name": "Set temperature upper limit -℉",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":370,\"max\":1040,\"scale\":1,\"step\":10}"
},
{
"code": "upper_temp",
"lang_config": {
"unit": "℃"
},
"name": "Set temperature ceiling",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":25,\"max\":400,\"scale\":1,\"step\":5}"
},
{
"code": "lower_temp_f",
"lang_config": {
"unit": "℉"
},
"name": "Set the lower limit -℉",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":330,\"max\":1000,\"scale\":1,\"step\":10}"
},
{
"code": "work_power",
"lang_config": {
"unit": "w"
},
"name": "Current power",
"type": "Integer",
"values": "{\"unit\":\"W\",\"min\":0,\"max\":50000,\"scale\":1,\"step\":1}"
},
{
"code": "temp_unit_convert",
"lang_config": {
"c": "℃",
"f": "℉"
},
"name": "Temperature scale",
"type": "Enum",
"values": "{\"range\":[\"c\",\"f\"]}"
},
{
"code": "temp_current",
"lang_config": {
"unit": "°C"
},
"name": "Current temperature",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":-100,\"max\":600,\"scale\":1,\"step\":5}"
},
{
"code": "window_state",
"lang_config": {
"close": "Closed",
"open": "Opened"
},
"name": "State of the window",
"type": "Enum",
"values": "{\"range\":[\"close\",\"open\"]}"
},
{
"code": "lower_temp",
"lang_config": {
"unit": "°C"
},
"name": "The lower limit of temperature",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":5,\"max\":380,\"scale\":1,\"step\":5}"
},
{
"code": "temp_correction",
"lang_config": {
"unit": ""
},
"name": "Temperature correction",
"type": "Integer",
"values": "{\"unit\":\"\",\"min\":-10,\"max\":10,\"scale\":0,\"step\":1}"
},
{
"code": "temp_current_f",
"lang_config": {
"unit": "°F"
},
"name": "Current temperature_F",
"type": "Integer",
"values": "{\"unit\":\"℉\",\"min\":140,\"max\":1400,\"scale\":1,\"step\":10}"
},
{
"code": "work_days",
"lang_config": {
"5_2": "5+2",
"6_1": "6+1"
},
"name": "Working day setting",
"type": "Enum",
"values": "{\"range\":[\"5_2\",\"6_1\"]}"
},
{
"code": "factory_reset",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Factory data reset",
"type": "Boolean",
"values": "{}"
},
{
"code": "child_lock",
"lang_config": {
"false": "OFF",
"true": "ON"
},
"name": "Child lock",
"type": "Boolean",
"values": "{}"
},
{
"code": "backlight",
"lang_config": {
"unit": "%"
},
"name": "Backlight brightness",
"type": "Integer",
"values": "{\"unit\":\"%\",\"min\":10,\"max\":100,\"scale\":0,\"step\":10}"
},
{
"code": "fault",
"lang_config": {
"e_r1": "",
"e_r2": "",
"e_r3": "",
"e_r4": "",
"e_r5": "",
"e_r6": "",
"e_r7": ""
},
"name": "Fault alarm",
"type": "Bitmap",
"values": "{\"label\":[\"ER1\",\"ER2\",\"ER3\",\"ER4\",\"ER5\",\"ER6\",\"ER7\"]}"
}
]
},
"success": true,
"t": 1658010166838,
"tid": "d1c0b256055511edbf8a7eeb5c0b2a19"
}
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Contact Us - Google Nest Help
Contact Us · What can we help with? · What can we help with? · Case in progress · Case in progress ·...
Read more >Thermostat Help & Support - Honeywell Home
Need help with your Honeywell Home Thermostat device? Browse our library of help & support resources and guides or contact us today.
Read more >Amazon Smart Thermostat Support - Amazon Customer Service
Amazon Smart Thermostat Support. Learn how to set up and use the Amazon Smart Thermostat.
Read more >Honeywell: Help & Support
Click to get help with Honeywell sales & support: find out how to get product support, ... For support around thermostats and other...
Read more >Resideo App Help & Support
Resideo App Help & Support ... What do you need help with? ThermostatsSecurityAir QualityWater Leak DetectorApps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The matching to config files is done by comparing the data returned by the device to the ids and types in the config files. The documentation from iot.tuya.com is useful to get an idea of what everything is, but it is not always correct, in particular some items can be missing sometimes (these can now be marked as “optional: true”) or enum types can be represented in the local protocol as quoted integers while in the cloud API they are descriptive strings (depending on the device - some use descriptive strings in the local protocol as well).
In particular for vacuums, the clean_record is often only available when the robot is cleaning, so needs to be marked optional. Have a look at the existing Kyvol and Lefant configs for hints as the Kogan one is likely similar.
Implementing tests can also catch some non-obvious typos in config files.
I’ve gone ahead and added support for this on the assumption that the upper and lower temperatures are configurable minimum and maximum limits rather than an a target range for the thermostat. This seems like the most likely purpose given that the target temperature is also separately available.