Closed bjeanes closed 2 months ago
I created my own mapping, put it in custom_components/tuya_local/devices/bonaire_heater.yaml
and got everything except the light working:
name: Bonaire Electric Heater
products:
- id: xto0qf9xem5bi7sj
name: Bonaire Electric Heater HPC5200020
primary_entity:
entity: climate
translation_only_key: heater
dps:
- id: 1
name: hvac_mode
type: boolean
mapping:
- dps_val: true
value: "heat"
- dps_val: false
value: "off"
- id: 2
name: temperature
type: integer
unit: C
range:
min: 5
max: 35
- id: 3
name: current_temperature
type: integer
- id: 4
name: preset_mode
type: string
mapping:
- dps_val: low
value: eco
- dps_val: high
value: boost
- dps_val: af
value: away
- id: 12
name: error
type: bitfield
mapping:
- dps_val: 0
value: "OK"
secondary_entities:
- entity: lock
translation_key: child_lock
category: config
dps:
- id: 7
type: boolean
name: lock
- entity: light
translation_key: backlight
dps:
- id: 10
type: boolean
name: switch
- entity: number
translation_key: timer
category: config
dps:
- id: 19
type: string
name: value
unit: hour
optional: true
range:
min: 0
max: 24
mapping:
- dps_val: "cancel"
value: 0
- dps_val: "1h"
value: 1
- dps_val: "2h"
value: 2
- dps_val: "3h"
value: 3
- dps_val: "4h"
value: 4
- dps_val: "5h"
value: 5
- dps_val: "6h"
value: 6
- dps_val: "7h"
value: 7
- dps_val: "8h"
value: 8
- dps_val: "9h"
value: 9
- dps_val: "10h"
value: 10
- dps_val: "11h"
value: 11
- dps_val: "12h"
value: 12
- dps_val: "13h"
value: 13
- dps_val: "14h"
value: 14
- dps_val: "15h"
value: 15
- dps_val: "16h"
value: 16
- dps_val: "17h"
value: 17
- dps_val: "18h"
value: 18
- dps_val: "19h"
value: 19
- dps_val: "20h"
value: 20
- dps_val: "21h"
value: 21
- dps_val: "22h"
value: 22
- dps_val: "23h"
value: 23
- dps_val: "24h"
value: 24
Amazon link for this product: https://www.amazon.com.au/gp/product/B0BY1V1XHR
Log Message
I'm probably overlooking something obvious, but even with "Enable debug logging" set for this integration (and restarting Home Assistant afterwards), I'm not seeing much detail in the logs. The closest is:
However, I hope the abundance of information provided in the rest of this issue will be sufficient.
Information about DPS mappings
Full output
```json { "result": { "model": "{\"modelId\":\"000004dh7k\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"Power\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"1\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"TempSet\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_temp\",\"attribute\":\"4\"},\"name\":\"目标温度\",\"typeSpec\":{\"type\":\"value\",\"max\":50,\"min\":5,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":3,\"accessMode\":\"ro\",\"code\":\"TempCurrent\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_sun\"},\"name\":\"当前温度\",\"typeSpec\":{\"type\":\"value\",\"max\":50,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"Mode\",\"description\":\"高档、低档、防霜冻\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"4\"},\"name\":\"模式\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"low\",\"high\",\"af\"]}},{\"abilityId\":7,\"accessMode\":\"rw\",\"code\":\"child_lock\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_shake\",\"attribute\":\"128\"},\"name\":\"童锁\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":10,\"accessMode\":\"rw\",\"code\":\"light\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"128\"},\"name\":\"灯光\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":12,\"accessMode\":\"ro\",\"code\":\"Fault\",\"description\":\"例如,温度传感器故障,高温故障,电机故障等\",\"extensions\":{\"iconName\":\"icon-dp_warming\",\"scope\":\"fault\"},\"name\":\"故障告警\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"1\",\"2\",\"3\"],\"maxlen\":3}},{\"abilityId\":19,\"accessMode\":\"rw\",\"code\":\"countdown_set\",\"description\":\"需和 倒计时剩余时间 配合使用\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"倒计时\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"cancel\",\"1h\",\"2h\",\"3h\",\"4h\",\"5h\",\"6h\",\"7h\",\"8h\",\"9h\",\"10h\",\"11h\",\"12h\",\"13h\",\"14h\",\"15h\",\"16h\",\"17h\",\"18h\",\"19h\",\"20h\",\"21h\",\"22h\",\"23h\",\"24h\"]}}]}]}" }, "success": true, "t": 1720252132761, "tid": "3074a65a3b6c11ef9e3b1acebe103cd3" } ```Product ID
xto0qf9xem5bi7sj
Tuya IoT Platform gives this device name
GPH-CPH-XA-NEW
in the UIInformation about how the device functions
When adding device it proposes a few options to map, but defaults to
arlec_panel_heater_v2
(with logDevice matches arlec_panel_heater_v2 with quality of 75%. DPS: {"updated_at": 1720251219.5391908, "1": true, "2": 21, "3": 21, "4": "high", "7": false, "10": true, "12": 0, "19": "cancel"}
):00
to indicate a 0 timeout so it is making a call to the heater, but with invalid values)Interestingly
arlec_panel_heater
(nonv2
) actually looks closer, though it is not listed as an option to select:I looked through the device definitions and found
andersson_gsh_heater
(which is given as an option) is actually an ideal fit for basic controls. I re-added the device usingandersson_gsh_heater
and all the core functionality works 100%, though is missing the child lock and timer definitions.