Add Circuit Breaker (ZNJDQ) Fixture in Tuya integration (#181509)

Co-authored-by: Thomas Munzer <tmunzer@juniper.net>
This commit is contained in:
Thomas Munzer
2026-09-07 09:41:36 +02:00
committed by GitHub
co-authored by Thomas Munzer
parent 9afabaaba1
commit b29766a138
2 changed files with 329 additions and 30 deletions
@@ -0,0 +1,269 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "Smart Circuit Breaker",
"category": "znjdq",
"product_id": "au6dqazvkxqnpaak",
"product_name": "63A Smart Circuit Breaker",
"online": true,
"sub": false,
"time_zone": "+02:00",
"active_time": "2026-09-05T15:54:33+00:00",
"create_time": "2026-09-05T15:54:33+00:00",
"update_time": "2026-09-05T15:54:33+00:00",
"function": {
"switch_1": {
"type": "Boolean",
"value": "{}"
},
"countdown_1": {
"type": "Integer",
"value": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
"relay_status": {
"type": "Enum",
"value": "{\"range\":[\"off\",\"on\",\"memory\"]}"
},
"light_mode": {
"type": "Enum",
"value": "{\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}"
},
"child_lock": {
"type": "Boolean",
"value": "{}"
}
},
"local_strategy": {
"1": {
"value_convert": "default",
"status_code": "switch_1",
"config_item": {
"statusFormat": "{\"switch_1\":\"$\"}",
"valueDesc": "{}",
"valueType": "Boolean",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"9": {
"value_convert": "default",
"status_code": "countdown_1",
"config_item": {
"statusFormat": "{\"countdown_1\":\"$\"}",
"valueDesc": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"17": {
"value_convert": "default",
"status_code": "add_ele",
"config_item": {
"statusFormat": "{\"add_ele\":\"$\"}",
"valueDesc": "{\"unit\":\"\",\"min\":0,\"max\":9999999,\"scale\":3,\"step\":100}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"18": {
"value_convert": "default",
"status_code": "cur_current",
"config_item": {
"statusFormat": "{\"cur_current\":\"$\"}",
"valueDesc": "{\"unit\":\"mA\",\"min\":0,\"max\":99999,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"19": {
"value_convert": "default",
"status_code": "cur_power",
"config_item": {
"statusFormat": "{\"cur_power\":\"$\"}",
"valueDesc": "{\"unit\":\"W\",\"min\":0,\"max\":260000,\"scale\":1,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"20": {
"value_convert": "default",
"status_code": "cur_voltage",
"config_item": {
"statusFormat": "{\"cur_voltage\":\"$\"}",
"valueDesc": "{\"unit\":\"V\",\"min\":0,\"max\":9999,\"scale\":1,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"22": {
"value_convert": "default",
"status_code": "voltage_coe",
"config_item": {
"statusFormat": "{\"voltage_coe\":\"$\"}",
"valueDesc": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"23": {
"value_convert": "default",
"status_code": "electric_coe",
"config_item": {
"statusFormat": "{\"electric_coe\":\"$\"}",
"valueDesc": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"24": {
"value_convert": "default",
"status_code": "power_coe",
"config_item": {
"statusFormat": "{\"power_coe\":\"$\"}",
"valueDesc": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"25": {
"value_convert": "default",
"status_code": "electricity_coe",
"config_item": {
"statusFormat": "{\"electricity_coe\":\"$\"}",
"valueDesc": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"valueType": "Integer",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"38": {
"value_convert": "default",
"status_code": "relay_status",
"config_item": {
"statusFormat": "{\"relay_status\":\"$\"}",
"valueDesc": "{\"range\":[\"off\",\"on\",\"memory\"]}",
"valueType": "Enum",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"40": {
"value_convert": "default",
"status_code": "light_mode",
"config_item": {
"statusFormat": "{\"light_mode\":\"$\"}",
"valueDesc": "{\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}",
"valueType": "Enum",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
},
"41": {
"value_convert": "default",
"status_code": "child_lock",
"config_item": {
"statusFormat": "{\"child_lock\":\"$\"}",
"valueDesc": "{}",
"valueType": "Boolean",
"enumMappingMap": {},
"pid": "au6dqazvkxqnpaak"
}
}
},
"status_range": {
"switch_1": {
"type": "Boolean",
"value": "{}",
"report_type": null
},
"countdown_1": {
"type": "Integer",
"value": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
"report_type": null
},
"add_ele": {
"type": "Integer",
"value": "{\"unit\":\"\",\"min\":0,\"max\":9999999,\"scale\":3,\"step\":100}",
"report_type": "sum"
},
"cur_current": {
"type": "Integer",
"value": "{\"unit\":\"mA\",\"min\":0,\"max\":99999,\"scale\":0,\"step\":1}",
"report_type": null
},
"cur_power": {
"type": "Integer",
"value": "{\"unit\":\"W\",\"min\":0,\"max\":260000,\"scale\":1,\"step\":1}",
"report_type": null
},
"cur_voltage": {
"type": "Integer",
"value": "{\"unit\":\"V\",\"min\":0,\"max\":9999,\"scale\":1,\"step\":1}",
"report_type": null
},
"voltage_coe": {
"type": "Integer",
"value": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"report_type": null
},
"electric_coe": {
"type": "Integer",
"value": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"report_type": null
},
"power_coe": {
"type": "Integer",
"value": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"report_type": null
},
"electricity_coe": {
"type": "Integer",
"value": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}",
"report_type": null
},
"relay_status": {
"type": "Enum",
"value": "{\"range\":[\"off\",\"on\",\"memory\"]}",
"report_type": null
},
"light_mode": {
"type": "Enum",
"value": "{\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}",
"report_type": null
},
"child_lock": {
"type": "Boolean",
"value": "{}",
"report_type": null
}
},
"status": {
"switch_1": true,
"countdown_1": 0,
"add_ele": 7,
"cur_current": 258,
"cur_power": 143,
"cur_voltage": 2286,
"voltage_coe": 15950,
"electric_coe": 12638,
"power_coe": 3126,
"electricity_coe": 2683,
"relay_status": "memory",
"light_mode": "relay",
"child_lock": false
},
"set_up": false,
"support_local": true,
"quirk": null,
"warnings": null
}
+60 -30
View File
@@ -3269,6 +3269,36 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[eikafwrmuhdvizruqzktk]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'tuya',
'eikafwrmuhdvizruqzktk',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'VITAL+ (unsupported)',
'model_id': 'urzivdhumrwfakie',
'name': 'VITAL+',
'name_by_user': None,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[ej2zsznihehztkzqcaderarfni]
DeviceRegistryEntrySnapshot({
'area_id': None,
@@ -5039,6 +5069,36 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[kaapnqxkvzaqd6uaqdjnz]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'tuya',
'kaapnqxkvzaqd6uaqdjnz',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': '63A Smart Circuit Breaker (unsupported)',
'model_id': 'au6dqazvkxqnpaak',
'name': 'Smart Circuit Breaker',
'name_by_user': None,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[kcdngswaxs8hm52bnocfw]
DeviceRegistryEntrySnapshot({
'area_id': None,
@@ -8219,36 +8279,6 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[eikafwrmuhdvizruqzktk]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'tuya',
'eikafwrmuhdvizruqzktk',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'VITAL+ (unsupported)',
'model_id': 'urzivdhumrwfakie',
'name': 'VITAL+',
'name_by_user': None,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[uvh6oeqrfliovfiwzc]
DeviceRegistryEntrySnapshot({
'area_id': None,