Hello, i want to request the integration of the smart button ZG-101Z in tuya-local.
I have read the data from tuya platform:
{
"result": [
{
"active_time": 1742886980,
"bind_space_id": "210626xxx",
"category": "wxkg",
"create_time": 1742886980,
"custom_name": "XXXX",
"icon": "smart/icon/ay157243613457092I4D/164298963395309e2c9b8.png",
"id": "bf13dc204c15e90b50mxwk",
"ip": "",
"is_online": true,
"lat": "46.17",
"local_key": "",
"lon": "11.14",
"model": "-",
"name": "ZC-YED-一键无线开关 2",
"product_id": "ja5osu5g",
"product_name": "ZC-YED-一键无线开关",
"sub": true,
"time_zone": "+01:00",
"update_time": 1742887007,
"uuid": "bf13dc204c15e90b50mxwk"
}
],
"success": true,
"t": 1744802070XXX,
"tid": "f7a565561ab311f0a1480a15xxxxxxxx"
}
{
"result": {
"properties": [
{
"code": "switch_type_1",
"custom_name": "",
"dp_id": 1,
"time": 1744795201877,
"type": "enum",
"value": "single_click"
},
{
"code": "battery_percentage",
"custom_name": "",
"dp_id": 10,
"time": 1744794539451,
"type": "value",
"value": 100
},
{
"code": "mode",
"custom_name": "",
"dp_id": 11,
"time": 1744794538981,
"type": "enum",
"value": "wireless_switch"
},
{
"code": "scene_preset",
"custom_name": "",
"dp_id": 14,
"time": 1742886980675,
"type": "string",
"value": ""
}
]
},
"success": true,
"t": 1744802070XXX,
"tid": "f7a565561ab311f0a1480a15xxxxxxxx"
}
i need so to create an yaml file:
name: Tuya smart button
products:
- id: bf13dc204c15e90b50mxwk
model: ZG-101Z
entities:
- entity: switch
class: switch
dps:
- id: 1
type: enum
name: switch
mapping:
- entity: sensor
class: battery
category: diagnostic
dps:
- id: 10
type: integer
name: sensor
unit: "%"
- entity: number
class: none
dps:
- id: 11
type: enum
name: mode
- entity: scenes
class: none
dps:
- id: 14
type: string
name: scene
i have some doubts expecially for the dps 10 & 11. Someone can help me ?
First time i’m trying to integrate a new tuya device.
Thanks
1 post - 1 participant
Read full topic