diff --git a/tests/common.py b/tests/common.py index dde7781c..dbe4ab0e 100644 --- a/tests/common.py +++ b/tests/common.py @@ -381,14 +381,34 @@ def zigpy_device_from_device_data( device = quirks_get_device(device) for epid, ep in device_data["endpoints"].items(): - endpoint = device.endpoints[int(epid)] + try: + endpoint = device.endpoints[int(epid)] + except KeyError: + _LOGGER.warning( + "Endpoint %d not found on device %s", + int(epid), + device, + ) + continue + endpoint.request = AsyncMock(return_value=[0]) for cluster_type in ("in_clusters", "out_clusters"): + clusters = getattr(endpoint, cluster_type) + for cluster in ep[cluster_type]: - real_cluster = getattr(endpoint, cluster_type)[ - int(cluster["cluster_id"], 16) - ] + cluster_id = int(cluster["cluster_id"], 16) + + try: + real_cluster = clusters[cluster_id] + except KeyError: + _LOGGER.warning( + "Cluster %0#04x not found on endpoint %r of device %s", + cluster_id, + endpoint, + device, + ) + continue if patch_cluster: patch_cluster_for_testing(real_cluster) diff --git a/tests/data/devices/adeo-zb-watersensor-d0001.json b/tests/data/devices/adeo-zb-watersensor-d0001.json new file mode 100644 index 00000000..e46070c6 --- /dev/null +++ b/tests/data/devices/adeo-zb-watersensor-d0001.json @@ -0,0 +1,411 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7b:20:a5:2a", + "nwk": "0x35E0", + "manufacturer": "ADEO", + "model": "ZB-WaterSensor-D0001", + "friendly_manufacturer": "ADEO", + "friendly_model": "ZB-WaterSensor-D0001", + "name": "ADEO ZB-WaterSensor-D0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4727, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-13T10:32:54.670046+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4727, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "ADEO" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZB-WaterSensor-D0001" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0003", + "name": "fast_poll_timeout", + "zcl_type": "uint16", + "value": 120 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:12:4b:00:2a:2e:91:8b" + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 48 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 554827778 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:20:a5:2a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:7b:20:a5:2a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:20:a5:2a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x21120002", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-airrtc-aeu001.json b/tests/data/devices/aqara-lumi-airrtc-aeu001.json new file mode 100644 index 00000000..0e0f6930 --- /dev/null +++ b/tests/data/devices/aqara-lumi-airrtc-aeu001.json @@ -0,0 +1,1423 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:71:24:74:6a", + "nwk": "0x6323", + "manufacturer": "Aqara", + "model": "lumi.airrtc.aeu001", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.airrtc.aeu001", + "name": "Aqara lumi.airrtc.aeu001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-10-19T17:44:54.465459+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.airrtc.aeu001" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0067", + "name": "reliability", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 100 + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2330 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 0 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2600 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0023", + "name": "temp_setpoint_hold", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0024", + "name": "temp_setpoint_hold_duration", + "zcl_type": "uint16", + "value": 120 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": -1 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5100 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 159 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 2586 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 35.0, + "min_temp": 5.0, + "supported_features": 387, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat_cool", + "cool", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 23.3, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "off", + "hvac_mode": "off", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[0]/off", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2600, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "ThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 2.5, + "native_min_value": -2.5, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "ThermostatLocalTempCalibration", + "available": true, + "state": 0.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 1.0, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 35.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": 0.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": -0.01 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 51.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "off" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:24:74:6a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:71:24:74:6a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:24:74:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000a1a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-light-agl003.json b/tests/data/devices/aqara-lumi-light-agl003.json new file mode 100644 index 00000000..d4277f04 --- /dev/null +++ b/tests/data/devices/aqara-lumi-light-agl003.json @@ -0,0 +1,1207 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:83:74:c5:0a", + "nwk": "0x35A7", + "manufacturer": "Aqara", + "model": "lumi.light.agl003", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.light.agl003", + "name": "Aqara lumi.light.agl003", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 65, + "rssi": null, + "last_seen": "2025-06-09T13:40:10.639755+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_DIMMABLE_LIGHT", + "id": 258 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 27 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.light.agl003" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 24 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 111 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 20486 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 21474 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 153 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 159 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 27 + } + ] + } + ] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 111, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 1, + "xy_color": [ + 0.3125963225757229, + 0.32767223620965896 + ], + "color_temp": 153, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 500, + "native_min_value": 111, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 153 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 65 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:74:c5:0a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:83:74:c5:0a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:74:c5:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001b", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-light-agl005.json b/tests/data/devices/aqara-lumi-light-agl005.json new file mode 100644 index 00000000..9ce9273d --- /dev/null +++ b/tests/data/devices/aqara-lumi-light-agl005.json @@ -0,0 +1,1213 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5f:ec:15:50", + "nwk": "0x47E3", + "manufacturer": "Aqara", + "model": "lumi.light.agl005", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.light.agl005", + "name": "Aqara lumi.light.agl005", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 65, + "rssi": null, + "last_seen": "2025-06-09T15:18:31.184354+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_DIMMABLE_LIGHT", + "id": 258 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 27 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.light.agl005" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 24 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 111 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 111 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 8912 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 2621 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 153 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 159 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 27 + } + ] + } + ] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 111, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": [ + 0.1359884031433585, + 0.03999389639124132 + ], + "color_temp": 111, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "xy", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 500, + "native_min_value": 111, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 153 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 15 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 65 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:ec:15:50-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:5f:ec:15:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:ec:15:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001b", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-switch-acn047.json b/tests/data/devices/aqara-lumi-switch-acn047.json new file mode 100644 index 00000000..57e48266 --- /dev/null +++ b/tests/data/devices/aqara-lumi-switch-acn047.json @@ -0,0 +1,1493 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "nwk": "0x4DF8", + "manufacturer": "Aqara", + "model": "lumi.switch.acn047", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.switch.acn047", + "name": "Aqara lumi.switch.acn047", + "quirk_applied": true, + "quirk_class": "zhaquirks.xiaomi.aqara.switch_acn047.AqaraT2Relay", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 108, + "rssi": -84, + "last_seen": "2025-10-12T14:34:30.456504+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 28 + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.acn047" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0010", + "name": "dev_temp_alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0014", + "name": "high_temp_dwell_trip_point", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0013", + "name": "low_temp_dwell_trip_point", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0003", + "name": "over_temp_total_dwell", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0020", + "name": "active_register_tier_delivered", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 35 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 7899 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0103", + "name": "dc_current", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0100", + "name": "dc_voltage", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0502", + "name": "instantaneous_active_current", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0501", + "name": "instantaneous_line_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0504", + "name": "instantaneous_power", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0303", + "name": "neutral_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "value": 1 + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "value": 1 + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [ + { + "id": "0x0200", + "name": "decoupled_mode", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x02d0", + "name": "interlock", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x00eb", + "name": "pulse_length", + "zcl_type": "uint16", + "value": 200 + }, + { + "id": "0x0517", + "name": "startup_on_off", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0289", + "name": "switch_mode", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x000a", + "name": "switch_type", + "zcl_type": "uint8", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 28 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [ + { + "id": "0x0200", + "name": "decoupled_mode", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0517", + "name": "startup_on_off", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0289", + "name": "switch_mode", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x000a", + "name": "switch_type", + "zcl_type": "uint8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 789.8800048828125 + }, + { + "id": "0x0067", + "name": "reliability", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": { + "models_info": [ + [ + "Aqara", + "lumi.switch.acn047" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0000", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0005", + "0x0004", + "0x0006", + "0x0012", + "0x0702", + "0x0b04", + "0xfcc0" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0000", + "input_clusters": [ + "0x0003", + "0x0005", + "0x0004", + "0x0006", + "0x0012", + "0xfcc0" + ], + "output_clusters": [] + }, + "21": { + "profile_id": "0x0104", + "device_type": "0x0000", + "input_clusters": [ + "0x000c" + ], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-64704-decoupled_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "AqaraT2RelayDecoupledMode", + "translation_key": "decoupled_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "OppleCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DecoupledMode", + "options": [ + "Decoupled", + "ControlRelay" + ] + }, + "state": { + "class_name": "AqaraT2RelayDecoupledMode", + "available": true, + "state": "ControlRelay" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-64704-startup_on_off", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "AqaraT2RelayStartupOnOff", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "OppleCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartupOnOff", + "options": [ + "On", + "Previous", + "Off", + "Toggle" + ] + }, + "state": { + "class_name": "AqaraT2RelayStartupOnOff", + "available": true, + "state": "Previous" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-64704-switch_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "AqaraT2RelaySwitchMode", + "translation_key": "switch_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "OppleCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SwitchMode", + "options": [ + "Power", + "Pulse", + "Dry" + ] + }, + "state": { + "class_name": "AqaraT2RelaySwitchMode", + "available": true, + "state": "Power" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-64704-switch_type", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "AqaraT2RelaySwitchType", + "translation_key": "switch_type", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "OppleCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SwitchType", + "options": [ + "Toggle", + "Momentary", + "NoSwitch" + ] + }, + "state": { + "class_name": "AqaraT2RelaySwitchType", + "available": true, + "state": "Toggle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-2-64704-decoupled_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "AqaraT2RelayDecoupledMode", + "translation_key": "decoupled_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 2, + "cluster": { + "id": 64704, + "name": "OppleCluster", + "type": "server" + }, + "id": "2:0xfcc0", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:2:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 2, + "available": true, + "group_id": null, + "enum": "DecoupledMode", + "options": [ + "Decoupled", + "ControlRelay" + ] + }, + "state": { + "class_name": "AqaraT2RelayDecoupledMode", + "available": true, + "state": "ControlRelay" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 108 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -84 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "T2MeteringCluster", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 35.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 789.9 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:3a:b1:1a:5d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:b1:1a:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001c", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-switch-aeu003.json b/tests/data/devices/aqara-lumi-switch-aeu003.json new file mode 100644 index 00000000..cbf24ed3 --- /dev/null +++ b/tests/data/devices/aqara-lumi-switch-aeu003.json @@ -0,0 +1,1069 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "nwk": "0xFF3D", + "manufacturer": "Aqara", + "model": "lumi.switch.aeu003", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.switch.aeu003", + "name": "Aqara lumi.switch.aeu003", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 196, + "rssi": -62, + "last_seen": "2025-10-17T13:19:26.838076+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.aeu003" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 159 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 3604 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0067", + "name": "reliability", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "shade", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 100, + "current_tilt_position": null, + "state": "open", + "is_opening": false, + "is_closing": false, + "is_closed": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 196 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -62 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-258-window_covering_type", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "WindowCoveringTypeSensor", + "translation_key": "window_covering_type", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Rollershade" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-258-inverted", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "WindowCoveringInversionSwitch", + "translation_key": "inverted", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "config_status", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "WindowCoveringInversionSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:8d:ae:d7:5d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:ae:d7:5d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000e14", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-switch-agl010.json b/tests/data/devices/aqara-lumi-switch-agl010.json new file mode 100644 index 00000000..6f3ecb0c --- /dev/null +++ b/tests/data/devices/aqara-lumi-switch-agl010.json @@ -0,0 +1,1017 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:19:5a:ce:c8", + "nwk": "0xBE80", + "manufacturer": "Aqara", + "model": "lumi.switch.agl010", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.switch.agl010", + "name": "Aqara lumi.switch.agl010", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 81, + "rssi": null, + "last_seen": "2025-07-10T07:53:48.239819+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.agl010" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 159 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4885 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0067", + "name": "reliability", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 81 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:5a:ce:c8-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:19:5a:ce:c8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:5a:ce:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001315", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/awox-esmlfzm-w6-dimm.json b/tests/data/devices/awox-esmlfzm-w6-dimm.json new file mode 100644 index 00000000..903ddc17 --- /dev/null +++ b/tests/data/devices/awox-esmlfzm-w6-dimm.json @@ -0,0 +1,679 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4f:a8:bc:46", + "nwk": "0x51F1", + "manufacturer": "AwoX", + "model": "ESMLFzm_w6_Dimm", + "friendly_manufacturer": "AwoX", + "friendly_model": "ESMLFzm_w6_Dimm", + "name": "AwoX ESMLFzm_w6_Dimm", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.771587+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "AwoX" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ESMLFzm_w6_Dimm" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "max_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 4751, + "device_type": { + "name": "unknown", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0xff50", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xff51", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0xff50", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xff51", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": [ + 0, + 0 + ], + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "xy", + "supported_color_modes": [ + "brightness", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:a8:bc:46-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:a8:bc:46:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:a8:bc:46", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/bosch-rbsh-rth0-bat-zb-eu.json b/tests/data/devices/bosch-rbsh-rth0-bat-zb-eu.json new file mode 100644 index 00000000..482e245b --- /dev/null +++ b/tests/data/devices/bosch-rbsh-rth0-bat-zb-eu.json @@ -0,0 +1,1281 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e1:24:c2:fc", + "nwk": "0xFD09", + "manufacturer": "Bosch", + "model": "RBSH-RTH0-BAT-ZB-EU", + "friendly_manufacturer": "Bosch", + "friendly_model": "RBSH-RTH0-BAT-ZB-EU", + "name": "Bosch RBSH-RTH0-BAT-ZB-EU", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4617, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -43, + "last_seen": "2025-08-06T16:43:13.717429+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4617, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Bosch" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RBSH-RTH0-BAT-ZB-EU" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x003e", + "name": "battery_alarm_state", + "zcl_type": "map32", + "value": 0 + }, + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 62 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2180 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 0 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2300 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1700 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5326 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 34105904 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 21.8, + "outdoor_temperature": null, + "target_temperature": 17.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": 0, + "occupied_cooling_setpoint": 2300, + "occupied_heating_setpoint": 1700, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "BoschThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 5.0, + "native_min_value": -5.0, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "BoschThermostatLocalTempCalibration", + "available": true, + "state": 0.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + }, + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-display_brightness", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_brightness", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Display on-time", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-display_on_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_on_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + }, + { + "info_object": { + "fallback_name": "Control sequence", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-ctrl_sequence_of_oper", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "ctrl_sequence_of_oper", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BoschControlSequenceOfOperation", + "options": [ + "Cooling", + "Heating" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Heating" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -43 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_voltage": 6.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 53.26 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": "Manual" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Operating mode", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-operating_mode", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "operating_mode", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Boost heating", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-boost_heating", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "boost_heating", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "boost_heating", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-window_open", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_open", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:24:c2:fc-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e1:24:c2:fc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:24:c2:fc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x02086a30", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/bosch-rbsh-rth0-zb-eu.json b/tests/data/devices/bosch-rbsh-rth0-zb-eu.json new file mode 100644 index 00000000..b5dbedb9 --- /dev/null +++ b/tests/data/devices/bosch-rbsh-rth0-zb-eu.json @@ -0,0 +1,1409 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:28:a4:a4:f2", + "nwk": "0x8ED4", + "manufacturer": "Bosch", + "model": "RBSH-RTH0-ZB-EU", + "friendly_manufacturer": "Bosch", + "friendly_model": "RBSH-RTH0-ZB-EU", + "name": "Bosch RBSH-RTH0-ZB-EU", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4617, + "power_source": "Mains", + "lqi": 164, + "rssi": -70, + "last_seen": "2025-09-05T16:21:49.433996+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4617, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Bosch" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RBSH-RTH0-ZB-EU" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0040", + "name": "ac_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001d", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x4043", + "name": "boost_heating", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2295 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": -9 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0022", + "name": "number_of_daily_transitions", + "zcl_type": "uint8", + "value": 6 + }, + { + "id": "0x0021", + "name": "number_of_weekly_transitions", + "zcl_type": "uint8", + "value": 6 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2150 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2150 + }, + { + "id": "0x4007", + "name": "operating_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0001", + "name": "outdoor_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001a", + "name": "remote_sensing", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 2 + }, + { + "id": "0x0031", + "name": "setpoint_change_amount", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0020", + "name": "start_of_week", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0009", + "name": "system_type_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0023", + "name": "temp_setpoint_hold", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0024", + "name": "temp_setpoint_hold_duration", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x4042", + "name": "window_open", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x403b", + "name": "display_brightness", + "zcl_type": "enum8", + "value": 7 + }, + { + "id": "0x403a", + "name": "display_on_time", + "zcl_type": "enum8", + "value": 5 + }, + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "schedule_programming_visibility", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "temperature_display_mode", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "uint16", + "value": 5016 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5198 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "uint16", + "value": 4036 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "tolerance", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 50555440 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "cool" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 22.95, + "outdoor_temperature": null, + "target_temperature": 21.5, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "cooling", + "hvac_mode": "cool", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[3]/cool", + "occupancy": 0, + "occupied_cooling_setpoint": 2150, + "occupied_heating_setpoint": 2150, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "BoschThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 5.0, + "native_min_value": -5.0, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "BoschThermostatLocalTempCalibration", + "available": true, + "state": -0.9 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + }, + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-display_brightness", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_brightness", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 7 + } + }, + { + "info_object": { + "fallback_name": "Display on-time", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-display_on_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_on_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 5 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + }, + { + "info_object": { + "fallback_name": "Control sequence", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-ctrl_sequence_of_oper", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "ctrl_sequence_of_oper", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BoschControlSequenceOfOperation", + "options": [ + "Cooling", + "Heating" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Cooling" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 164 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -70 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 51.98 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "cooling" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": "External" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Operating mode", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-operating_mode", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "operating_mode", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": "Manual" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Boost heating", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-boost_heating", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "boost_heating", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "boost_heating", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-window_open", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_open", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:a4:a4:f2-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:28:a4:a4:f2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:a4:a4:f2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x03036a30", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/bosch-rbsh-trv0-zb-eu.json b/tests/data/devices/bosch-rbsh-trv0-zb-eu.json new file mode 100644 index 00000000..1c37f0d4 --- /dev/null +++ b/tests/data/devices/bosch-rbsh-trv0-zb-eu.json @@ -0,0 +1,1497 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d1:eb:38:68", + "nwk": "0x09BA", + "manufacturer": "BOSCH", + "model": "RBSH-TRV0-ZB-EU", + "friendly_manufacturer": "BOSCH", + "friendly_model": "RBSH-TRV0-ZB-EU", + "name": "BOSCH RBSH-TRV0-ZB-EU", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4617, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.735956+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4617, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "BOSCH" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RBSH-TRV0-ZB-EU" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 16 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 27 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x4043", + "name": "boost_heating", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2170 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": -6 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2300 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1800 + }, + { + "id": "0x4007", + "name": "operating_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x4020", + "name": "pi_heating_demand", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x4040", + "name": "remote_temperature", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x4042", + "name": "window_open", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x403b", + "name": "display_brightness", + "zcl_type": "enum8", + "value": 7 + }, + { + "id": "0x403a", + "name": "display_on_time", + "zcl_type": "enum8", + "value": 10 + }, + { + "id": "0x400b", + "name": "display_orientation", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x4039", + "name": "displayed_temperature", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 839193876 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + }, + { + "info_object": { + "fallback_name": "Calibrate valve", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-calibrate_valve", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "Button", + "translation_key": "calibrate_valve", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "calibrate_valve", + "args": [], + "kwargs": {} + }, + "state": { + "class_name": "Button", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 21.7, + "outdoor_temperature": null, + "target_temperature": 18.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": 2300, + "occupied_heating_setpoint": 1800, + "pi_heating_demand": 0, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "BoschThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 5.0, + "native_min_value": -5.0, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "BoschThermostatLocalTempCalibration", + "available": true, + "state": -0.6000000000000001 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + }, + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-display_brightness", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_brightness", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 7 + } + }, + { + "info_object": { + "fallback_name": "Display on-time", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-display_on_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_on_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 10 + } + }, + { + "info_object": { + "fallback_name": "Remote temperature", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-remote_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 0.1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0.0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Control sequence", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-ctrl_sequence_of_oper", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "ctrl_sequence_of_oper", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BoschControlSequenceOfOperation", + "options": [ + "Cooling", + "Heating" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Heating" + } + }, + { + "info_object": { + "fallback_name": "Display orientation", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-display_orientation", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_orientation", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BoschDisplayOrientation", + "options": [ + "Normal", + "Flipped" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Normal" + } + }, + { + "info_object": { + "fallback_name": "Displayed temperature", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-displayed_temperature", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "displayed_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BoschDisplayedTemperature", + "options": [ + "Target", + "Measured" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Target" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 8.0, + "battery_size": "AA", + "battery_quantity": 2, + "battery_voltage": 2.7 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": "External" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Operating mode", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-operating_mode", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "operating_mode", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": "Manual" + } + }, + { + "info_object": { + "fallback_name": "Valve adaptation status", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-valve_adapt_status", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "valve_adapt_status", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Boost heating", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-boost_heating", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "boost_heating", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "boost_heating", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-window_open", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_open", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "BoschThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:eb:38:68-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d1:eb:38:68:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:eb:38:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x32051514", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/bosch-rbsh-us4btn-zb-eu.json b/tests/data/devices/bosch-rbsh-us4btn-zb-eu.json new file mode 100644 index 00000000..28a1680d --- /dev/null +++ b/tests/data/devices/bosch-rbsh-us4btn-zb-eu.json @@ -0,0 +1,555 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:55:78:47:04", + "nwk": "0x7401", + "manufacturer": "Bosch", + "model": "RBSH-US4BTN-ZB-EU", + "friendly_manufacturer": "Bosch", + "friendly_model": "RBSH-US4BTN-ZB-EU", + "name": "Bosch RBSH-US4BTN-ZB-EU", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4617, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.479438+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4617, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 29 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20221219" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Bosch" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RBSH-US4BTN-ZB-EU" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000e", + "name": "product_label", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0052", + "name": "battery_2_a_hr_rating", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0051", + "name": "battery_2_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x003b", + "name": "battery_percent_thres1", + "zcl_type": "uint8", + "value": 28 + }, + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 31 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "mains_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 6480 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0x0116", + "name": "aps_decrypt_failures", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfca1", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 4 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 269314608 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:55:78:47:04-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:55:78:47:04:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:55:78:47:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:55:78:47:04-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:55:78:47:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:55:78:47:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:55:78:47:04-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:55:78:47:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:55:78:47:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:55:78:47:04-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:55:78:47:04:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:55:78:47:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:55:78:47:04-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:55:78:47:04:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:55:78:47:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x100d6a30", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/candeo-c-zb-lc20-dim.json b/tests/data/devices/candeo-c-zb-lc20-dim.json new file mode 100644 index 00000000..cd099e5b --- /dev/null +++ b/tests/data/devices/candeo-c-zb-lc20-dim.json @@ -0,0 +1,542 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:99:61:76:7a", + "nwk": "0x5E52", + "manufacturer": "Candeo", + "model": "C-ZB-LC20-Dim", + "friendly_manufacturer": "Candeo", + "friendly_model": "C-ZB-LC20-Dim", + "name": "Candeo C-ZB-LC20-Dim", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4687, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.811830+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4687, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 404, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 404, + "descriptor_capability_field": 0 + }, + "endpoints": { + "11": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Candeo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "C-ZB-LC20-Dim" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 129 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 687943681 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 11, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "11:0x0003", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 11, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "11:0x0008", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 11, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "11:0x0008", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 129 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 11, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "11:0x0000", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 11, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "11:0x0000", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:61:76:7a-11-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 11, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "11:0x0019_client", + "unique_id": "ab:cd:ef:12:99:61:76:7a:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:61:76:7a", + "endpoint_id": 11, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x29013001", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/candeo-c-zb-lc20-rgb.json b/tests/data/devices/candeo-c-zb-lc20-rgb.json new file mode 100644 index 00000000..5c67ab8c --- /dev/null +++ b/tests/data/devices/candeo-c-zb-lc20-rgb.json @@ -0,0 +1,614 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ca:6d:9d:be", + "nwk": "0x605B", + "manufacturer": "Candeo", + "model": "C-ZB-LC20-RGB", + "friendly_manufacturer": "Candeo", + "friendly_model": "C-ZB-LC20-RGB", + "name": "Candeo C-ZB-LC20-RGB", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4687, + "power_source": "Mains", + "lqi": 196, + "rssi": -51, + "last_seen": "2025-07-31T08:58:24.375408+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4687, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 404, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 404, + "descriptor_capability_field": 0 + }, + "endpoints": { + "11": { + "profile_id": 260, + "device_type": { + "name": "COLOR_DIMMABLE_LIGHT", + "id": 258 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Candeo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "C-ZB-LC20-RGB" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 8 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 158 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 4915 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 52428 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 822161409 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 11, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "11:0x0003", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 11, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "11:0x0008", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 11, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "11:0x0300", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 158, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 2, + "xy_color": [ + 0.07499809262226291, + 0.8 + ], + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "xy", + "supported_color_modes": [ + "brightness", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 11, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "11:0x0008", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 11, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "11:0x0000", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 196 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 11, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "11:0x0000", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -51 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:6d:9d:be-11-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 11, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "11:0x0019_client", + "unique_id": "ab:cd:ef:12:ca:6d:9d:be:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:6d:9d:be", + "endpoint_id": 11, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x31013001", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/danfoss-etrv0103.json b/tests/data/devices/danfoss-etrv0103.json new file mode 100644 index 00000000..dff9ef25 --- /dev/null +++ b/tests/data/devices/danfoss-etrv0103.json @@ -0,0 +1,2372 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "nwk": "0x423A", + "manufacturer": "Danfoss", + "model": "eTRV0103", + "friendly_manufacturer": "Danfoss", + "friendly_model": "eTRV0103", + "name": "Danfoss eTRV0103", + "quirk_applied": true, + "quirk_class": "zhaquirks.danfoss.thermostat.DanfossThermostat", + "quirk_id": "danfoss.ally_thermostat", + "manufacturer_code": 4678, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.322980+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4678, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Danfoss" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "eTRV0103" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 27 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "value": 779375341 + }, + { + "id": "0x0001", + "name": "time_status", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0002", + "name": "time_zone", + "zcl_type": "int32", + "value": -3600 + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x404c", + "name": "adaptation_run_control", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x404e", + "name": "adaptation_run_settings", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x404d", + "name": "adaptation_run_status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4020", + "name": "control_algorithm_scale_factor", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x4010", + "name": "exercise_day_of_week", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x4011", + "name": "exercise_trigger_time", + "zcl_type": "uint16", + "value": 660 + }, + { + "id": "0x4015", + "name": "external_measured_room_sensor", + "zcl_type": "int16", + "value": 2080 + }, + { + "id": "0x4003", + "name": "external_open_window_detected", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4030", + "name": "heat_available", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4031", + "name": "heat_required", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4032", + "name": "load_balancing_enable", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x404a", + "name": "load_estimate", + "zcl_type": "int16", + "value": 437 + }, + { + "id": "0x4040", + "name": "load_room_mean", + "zcl_type": "int16", + "value": -8000 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2014 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x4012", + "name": "mounting_mode_active", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4013", + "name": "mounting_mode_control", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x4000", + "name": "open_window_detection", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x4014", + "name": "orientation", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x404f", + "name": "preheat_status", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4050", + "name": "preheat_time", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x4016", + "name": "radiator_covered", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x404b", + "name": "regulation_setpoint_offset", + "zcl_type": "int8", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x4051", + "name": "window_open_feature", + "zcl_type": "bool", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x4000", + "name": "viewing_direction", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0x4021", + "name": "control_diagnostics", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b''" + } + }, + { + "id": "0x4010", + "name": "motor_step_counter", + "zcl_type": "uint32", + "value": 63774 + }, + { + "id": "0x4000", + "name": "sw_error_code", + "zcl_type": "map16", + "value": 512 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 20 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "Danfoss", + "eTRV0100" + ], + [ + "Danfoss", + "eTRV0101" + ], + [ + "Danfoss", + "eTRV0103" + ], + [ + "D5X84YU", + "eT093WRO" + ], + [ + "D5X84YU", + "eT093WRG" + ], + [ + "Danfoss", + "TRV001" + ], + [ + "Danfoss", + "TRV003" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0301", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x000a", + "0x0020", + "0x0201", + "0x0204", + "0x0b05" + ], + "output_clusters": [ + "0x0000", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-heat_required", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "DanfossHeatRequired", + "translation_key": "heat_required", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "heat_required" + }, + "state": { + "class_name": "DanfossHeatRequired", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-mounting_mode_active", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "DanfossMountingModeActive", + "translation_key": "mounting_mode_active", + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "mounting_mode_active" + }, + "state": { + "class_name": "DanfossMountingModeActive", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-preheat_status", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "DanfossPreheatStatus", + "translation_key": "preheat_status", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "preheat_status" + }, + "state": { + "class_name": "DanfossPreheatStatus", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 35.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 20.14, + "outdoor_temperature": null, + "target_temperature": 5.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 500, + "pi_heating_demand": 0, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-exercise_trigger_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "DanfossExerciseTriggerTime", + "translation_key": "exercise_trigger_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 1439, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "DanfossExerciseTriggerTime", + "available": true, + "state": 660 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-external_measured_room_sensor", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "DanfossExternalMeasuredRoomSensor", + "translation_key": "external_temperature_sensor", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35, + "native_min_value": -80, + "native_step": 0.01, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "DanfossExternalMeasuredRoomSensor", + "available": true, + "state": 20.8 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-load_room_mean", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "DanfossLoadRoomMean", + "translation_key": "load_room_mean", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 2000, + "native_min_value": -8000, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "DanfossLoadRoomMean", + "available": true, + "state": -8000 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 35.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-regulation_setpoint_offset", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "DanfossRegulationSetpointOffset", + "translation_key": "regulation_setpoint_offset", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 2.5, + "native_min_value": -2.5, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "DanfossRegulationSetpointOffset", + "available": true, + "state": 0.0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-adaptation_run_control", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DanfossAdaptationRunControl", + "translation_key": "adaptation_run_command", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DanfossAdaptationRunControlEnum", + "options": [ + "Nothing", + "Initiate", + "Cancel" + ] + }, + "state": { + "class_name": "DanfossAdaptationRunControl", + "available": true, + "state": "Nothing" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-control_algorithm_scale_factor", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DanfossControlAlgorithmScaleFactor", + "translation_key": "setpoint_response_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DanfossControlAlgorithmScaleFactorEnum", + "options": [ + "quick 5min", + "quick 10min", + "quick 15min", + "quick 25min", + "moderate 30min", + "moderate 40min", + "moderate 50min", + "moderate 60min", + "moderate 70min", + "slow 80min", + "quick open disabled" + ] + }, + "state": { + "class_name": "DanfossControlAlgorithmScaleFactor", + "available": true, + "state": "quick 5min" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-exercise_day_of_week", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DanfossExerciseDayOfTheWeek", + "translation_key": "exercise_day_of_week", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DanfossExerciseDayOfTheWeekEnum", + "options": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Undefined" + ] + }, + "state": { + "class_name": "DanfossExerciseDayOfTheWeek", + "available": true, + "state": "Thursday" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-orientation", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DanfossOrientation", + "translation_key": "valve_orientation", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DanfossOrientationEnum", + "options": [ + "Horizontal", + "Vertical" + ] + }, + "state": { + "class_name": "DanfossOrientation", + "available": true, + "state": "Horizontal" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossUserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-516-viewing_direction", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DanfossViewingDirection", + "translation_key": "viewing_direction", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossUserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "DanfossViewingDirectionEnum", + "options": [ + "Default", + "Inverted" + ] + }, + "state": { + "class_name": "DanfossViewingDirection", + "available": true, + "state": "Default" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 35.0, + "battery_voltage": 2.7 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-2821-motor_step_counter", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossMotorStepCounter", + "translation_key": "motor_stepcount", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossDiagnosticClusterHandler", + "generic_id": "cluster_handler_0x0b05", + "endpoint_id": 1, + "cluster": { + "id": 2821, + "name": "DanfossDiagnosticCluster", + "type": "server" + }, + "id": "1:0x0b05", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0b05", + "status": "INITIALIZED", + "value_attribute": "sw_error_code" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossMotorStepCounter", + "available": true, + "state": 63774 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-2821-sw_error_code", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossSoftwareErrorCode", + "translation_key": "software_error", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossDiagnosticClusterHandler", + "generic_id": "cluster_handler_0x0b05", + "endpoint_id": 1, + "cluster": { + "id": 2821, + "name": "DanfossDiagnosticCluster", + "type": "server" + }, + "id": "1:0x0b05", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0b05", + "status": "INITIALIZED", + "value_attribute": "sw_error_code" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossSoftwareErrorCode", + "available": true, + "state": "something", + "Top_pcb_sensor_error": false, + "Side_pcb_sensor_error": false, + "Non_volatile_memory_error": false, + "Unknown_hw_error": false, + "Motor_error": false, + "Invalid_internal_communication": false, + "Invalid_clock_information": true, + "Radio_communication_error": false, + "Encoder_jammed": false, + "Low_battery": false, + "Critical_low_battery": false + }, + "extra_state_attributes": [ + "Critical_low_battery", + "Encoder_jammed", + "Invalid_clock_information", + "Invalid_internal_communication", + "Low_battery", + "Motor_error", + "Non_volatile_memory_error", + "Radio_communication_error", + "Side_pcb_sensor_error", + "Top_pcb_sensor_error", + "Unknown_hw_error" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-adaptation_run_status", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossAdaptationRunStatus", + "translation_key": "adaptation_run_status", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossAdaptationRunStatus", + "available": true, + "state": "nothing", + "In_progress": false, + "Valve_characteristic_found": false, + "Valve_characteristic_lost": false + }, + "extra_state_attributes": [ + "In_progress", + "Valve_characteristic_found", + "Valve_characteristic_lost" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-load_estimate", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossLoadEstimate", + "translation_key": "load_estimate", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossLoadEstimate", + "available": true, + "state": 437 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-open_window_detection", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossOpenWindowDetection", + "translation_key": "open_window_detected", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossOpenWindowDetection", + "available": true, + "state": "Closed" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-preheat_time", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DanfossPreheatTime", + "translation_key": "preheat_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossPreheatTime", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": "External" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-adaptation_run_settings", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossAdaptationRunSettings", + "translation_key": "adaptation_run_enabled", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "adaptation_run_settings", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossAdaptationRunSettings", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-external_open_window_detected", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossExternalOpenWindowDetected", + "translation_key": "external_window_sensor", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "external_open_window_detected", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossExternalOpenWindowDetected", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-heat_available", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossHeatAvailable", + "translation_key": "heat_available", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "heat_available", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossHeatAvailable", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-load_balancing_enable", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossLoadBalancingEnable", + "translation_key": "use_load_balancing", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "load_balancing_enable", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossLoadBalancingEnable", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-mounting_mode_control", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossMountingModeControl", + "translation_key": "mounting_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "mounting_mode_control", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossMountingModeControl", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-radiator_covered", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossRadiatorCovered", + "translation_key": "prioritize_external_temperature_sensor", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "radiator_covered", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossRadiatorCovered", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-513-window_open_feature", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "DanfossWindowOpenFeature", + "translation_key": "use_internal_window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DanfossThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "DanfossThermostatCluster", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open_feature", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "DanfossWindowOpenFeature", + "available": true, + "state": true, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:5c:a0:3f:1c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:a0:3f:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000014", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/develco-products-a-s-zhemi-zigbee-external-meter-interface.json b/tests/data/devices/develco-products-a-s-zhemi-zigbee-external-meter-interface.json new file mode 100644 index 00000000..4722e16f --- /dev/null +++ b/tests/data/devices/develco-products-a-s-zhemi-zigbee-external-meter-interface.json @@ -0,0 +1,492 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:57:64:bf:25", + "nwk": "0x2645", + "manufacturer": "Develco Products A/S", + "model": "ZHEMI - ZigBee External Meter Interface", + "friendly_manufacturer": "Develco Products A/S", + "friendly_model": "ZHEMI - ZigBee External Meter Interface", + "name": "Develco Products A/S ZHEMI - ZigBee External Meter Interface", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": 87, + "rssi": null, + "last_seen": "2025-05-03T16:14:40.099307+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 80, + "server_mask": 0, + "maximum_outgoing_transfer_size": 80, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 49353, + "device_type": { + "name": "unknown", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Develco Products A/S" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZHEMI - ZigBee External Meter Interface" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 42317930 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "value": 281474976710655 + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "value": 281474976710655 + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0401", + "name": "currentday_consumption_delivered", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0402", + "name": "currentday_consumption_received", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "value": 251 + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "value": 1140 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 251 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:57:64:bf:25-2-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 2, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "2:0x0003", + "unique_id": "ab:cd:ef:12:57:64:bf:25:2:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:57:64:bf:25", + "endpoint_id": 2, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:57:64:bf:25-2-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 2, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "2:0x0000", + "unique_id": "ab:cd:ef:12:57:64:bf:25:2:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:57:64:bf:25", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 87 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:57:64:bf:25-2-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 2, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "2:0x0000", + "unique_id": "ab:cd:ef:12:57:64:bf:25:2:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:57:64:bf:25", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:57:64:bf:25-2-1794", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergyMetering", + "translation_key": "instantaneous_demand", + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 2, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "2:0x0702", + "unique_id": "ab:cd:ef:12:57:64:bf:25:2:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:57:64:bf:25", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 1140, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:57:64:bf:25-2-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 2, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "2:0x0702", + "unique_id": "ab:cd:ef:12:57:64:bf:25:2:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:57:64:bf:25", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 42317.93, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/digi-xbee3.json b/tests/data/devices/digi-xbee3.json new file mode 100644 index 00000000..9413746c --- /dev/null +++ b/tests/data/devices/digi-xbee3.json @@ -0,0 +1,1421 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e9:3f:91:6d", + "nwk": "0x6ADB", + "manufacturer": "Digi", + "model": "XBee3", + "friendly_manufacturer": "Digi", + "friendly_model": "XBee3", + "name": "Digi XBee3", + "quirk_applied": true, + "quirk_class": "zhaquirks.xbee.xbee3_io.XBee3Sensor", + "quirk_id": null, + "manufacturer_code": 4126, + "power_source": "Mains", + "lqi": 255, + "rssi": -63, + "last_seen": "2025-08-15T21:07:49.512697+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4126, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "208": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "209": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + } + ] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "210": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "211": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + } + ] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "212": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "213": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "214": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "215": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "216": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "217": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "218": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 1023.0 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1.0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "219": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 1023.0 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1.0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "220": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "221": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "222": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "230": { + "profile_id": 49413, + "device_type": { + "name": "unknown", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x00a1", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": null, + "attributes": [] + } + ] + }, + "232": { + "profile_id": 49413, + "device_type": { + "name": "unknown", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0011", + "endpoint_attribute": "xbee_serial_data", + "attributes": [] + }, + { + "cluster_id": "0x0092", + "endpoint_attribute": "binary_input", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0011", + "endpoint_attribute": "xbee_serial_data", + "attributes": [] + } + ] + } + }, + "original_signature": { + "endpoints": { + "232": { + "profile_id": "0xc105", + "device_type": "0x0001", + "input_clusters": [], + "output_clusters": [] + }, + "230": { + "profile_id": "0xc105", + "device_type": "0x0001", + "input_clusters": [], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-218-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 218, + "cluster": { + "id": 13, + "name": "XBeePWM", + "type": "server" + }, + "id": "218:0x000d", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:218:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 218, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1023.0, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-219-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 219, + "cluster": { + "id": 13, + "name": "XBeePWM", + "type": "server" + }, + "id": "219:0x000d", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:219:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 219, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1023.0, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-208-12", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DigiAnalogInput", + "translation_key": "analog_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 208, + "cluster": { + "id": 12, + "name": "XBeeAnalogInput", + "type": "server" + }, + "id": "208:0x000c", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:208:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 208, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DigiAnalogInput", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-209-12", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DigiAnalogInput", + "translation_key": "analog_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 209, + "cluster": { + "id": 12, + "name": "XBeeAnalogInput", + "type": "server" + }, + "id": "209:0x000c", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:209:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 209, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DigiAnalogInput", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-210-12", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DigiAnalogInput", + "translation_key": "analog_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 210, + "cluster": { + "id": 12, + "name": "XBeeAnalogInput", + "type": "server" + }, + "id": "210:0x000c", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:210:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 210, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DigiAnalogInput", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-211-12", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DigiAnalogInput", + "translation_key": "analog_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 211, + "cluster": { + "id": 12, + "name": "XBeeAnalogInput", + "type": "server" + }, + "id": "211:0x000c", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:211:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 211, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DigiAnalogInput", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-215-12", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DigiAnalogInput", + "translation_key": "analog_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 215, + "cluster": { + "id": 12, + "name": "XBeeAnalogInput", + "type": "server" + }, + "id": "215:0x000c", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:215:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 215, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DigiAnalogInput", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-208-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 208, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "208:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:208:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 208, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-209-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 209, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "209:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:209:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 209, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-210-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 210, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "210:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:210:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 210, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-211-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 211, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "211:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:211:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 211, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-212-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 212, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "212:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:212:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 212, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-213-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 213, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "213:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:213:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 213, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-214-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 214, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "214:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:214:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 214, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-215-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 215, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "215:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:215:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 215, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-216-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 216, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "216:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:216:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 216, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-217-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 217, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "217:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:217:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 217, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-218-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 218, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "218:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:218:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 218, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-219-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 219, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "219:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:219:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 219, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-220-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 220, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "220:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:220:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 220, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-221-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 221, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "221:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:221:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 221, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:3f:91:6d-222-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 222, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "222:0x0006", + "unique_id": "ab:cd:ef:12:e9:3f:91:6d:222:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:3f:91:6d", + "endpoint_id": 222, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ecodim-bv-eco-dim-05-zigbee.json b/tests/data/devices/ecodim-bv-eco-dim-05-zigbee.json new file mode 100644 index 00000000..24d2944e --- /dev/null +++ b/tests/data/devices/ecodim-bv-eco-dim-05-zigbee.json @@ -0,0 +1,796 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c4:e7:80:b2", + "nwk": "0x36C7", + "manufacturer": "EcoDim BV", + "model": "Eco-Dim.05 Zigbee", + "friendly_manufacturer": "EcoDim BV", + "friendly_model": "Eco-Dim.05 Zigbee", + "name": "EcoDim BV Eco-Dim.05 Zigbee", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 179, + "rssi": -77, + "last_seen": "2025-10-06T11:53:49.256893+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "EcoDim BV" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Eco-Dim.05 Zigbee" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 1 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-2-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 2, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 254 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 179 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -77 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000001", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c4:e7:80:b2-2-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 2, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "2:0x0019_client", + "unique_id": "ab:cd:ef:12:c4:e7:80:b2:2:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c4:e7:80:b2", + "endpoint_id": 2, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/eurotronic-spzb0001.json b/tests/data/devices/eurotronic-spzb0001.json new file mode 100644 index 00000000..f79a2a72 --- /dev/null +++ b/tests/data/devices/eurotronic-spzb0001.json @@ -0,0 +1,856 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:32:62:3d:21", + "nwk": "0x4D24", + "manufacturer": "Eurotronic", + "model": "SPZB0001", + "friendly_manufacturer": "Eurotronic", + "friendly_model": "SPZB0001", + "name": "Eurotronic SPZB0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4151, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.692202+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4151, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 1617, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 1617, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Eurotronic" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SPZB0001" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 130 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 229 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2250 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 0 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 2850 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 750 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 1157693471 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 28.5, + "min_temp": 7.5, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 22.5, + "outdoor_temperature": null, + "target_temperature": 20.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": 0, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": 2000 + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "ThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 2.5, + "native_min_value": -2.5, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "ThermostatLocalTempCalibration", + "available": true, + "state": 0.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 7.5, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 28.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 28.5, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 7.5 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 65.0, + "battery_size": "AA", + "battery_quantity": 2, + "battery_voltage": 22.9 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:32:62:3d:21-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:32:62:3d:21:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:62:3d:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x4501001f", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ewelink-ds01.json b/tests/data/devices/ewelink-ds01.json new file mode 100644 index 00000000..a94d1622 --- /dev/null +++ b/tests/data/devices/ewelink-ds01.json @@ -0,0 +1,374 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:cb:5d:55", + "nwk": "0xE04D", + "manufacturer": "eWeLink", + "model": "DS01", + "friendly_manufacturer": "eWeLink", + "friendly_model": "DS01", + "name": "eWeLink DS01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": 232, + "rssi": -53, + "last_seen": "2025-08-01T15:08:11.696096+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 0, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "eWeLink" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "DS01" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 29 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "04:e3:e5:ff:fe:6b:c7:33" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 21 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:cb:5d:55-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:39:cb:5d:55:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:cb:5d:55", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:cb:5d:55-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:39:cb:5d:55:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:cb:5d:55", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:cb:5d:55-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:cb:5d:55:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:cb:5d:55", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 232 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:cb:5d:55-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:cb:5d:55:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:cb:5d:55", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -53 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:cb:5d:55-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:39:cb:5d:55:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:39:cb:5d:55", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 2.9 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ewelink-snzb-04p.json b/tests/data/devices/ewelink-snzb-04p.json new file mode 100644 index 00000000..7f3cac58 --- /dev/null +++ b/tests/data/devices/ewelink-snzb-04p.json @@ -0,0 +1,533 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:81:81:05:49", + "nwk": "0xD45C", + "manufacturer": "eWeLink", + "model": "SNZB-04P", + "friendly_manufacturer": "eWeLink", + "friendly_model": "SNZB-04P", + "name": "eWeLink SNZB-04P", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.979975+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "eWeLink" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SNZB-04P" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0010", + "name": "mains_alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "e8:e0:7e:ff:fe:7a:f6:75" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 21 + } + ] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": "sonoff_contact_cluster", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 8704 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Tamper", + "unique_id": "ab:cd:ef:12:81:81:05:49-1-tamper", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "tamper", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "Sonoff contact cluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "tamper" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:81:05:49-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:81:81:05:49:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:81:05:49", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00002200", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ewelink-th01.json b/tests/data/devices/ewelink-th01.json new file mode 100644 index 00000000..b4d2290c --- /dev/null +++ b/tests/data/devices/ewelink-th01.json @@ -0,0 +1,411 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:62:93:68:a8", + "nwk": "0x6F45", + "manufacturer": "eWeLink", + "model": "TH01", + "friendly_manufacturer": "eWeLink", + "friendly_model": "TH01", + "name": "eWeLink TH01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": 192, + "rssi": -63, + "last_seen": "2025-07-05T16:12:49.487019+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 0, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "eWeLink" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TH01" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 31 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2660 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5775 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 192 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -63 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 26.6 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:93:68:a8-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:62:93:68:a8:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:62:93:68:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 57.75 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ezviz-cs-t55-r100-g.json b/tests/data/devices/ezviz-cs-t55-r100-g.json new file mode 100644 index 00000000..1ee49724 --- /dev/null +++ b/tests/data/devices/ezviz-cs-t55-r100-g.json @@ -0,0 +1,886 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9d:90:be:b1", + "nwk": "0x05CB", + "manufacturer": "EZVIZ", + "model": "CS-T55-R100-G", + "friendly_manufacturer": "EZVIZ", + "friendly_model": "CS-T55-R100-G", + "name": "EZVIZ CS-T55-R100-G", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4451, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-05-13T08:57:59.864881+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4451, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "EZVIZ" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "CS-T55-R100-G" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 33 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2850 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "94:b2:16:ff:fe:05:24:26" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 271 + } + ] + }, + { + "cluster_id": "0x0704", + "endpoint_attribute": "smartenergy_tunneling", + "attributes": [] + }, + { + "cluster_id": "0xfe00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfec0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0704", + "endpoint_attribute": "smartenergy_tunneling", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 35, + "min_temp": 7, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": 35.0, + "hvac_action": null, + "hvac_mode": "heat_cool", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[1]/heat_cool", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 3500, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 50.0, + "battery_voltage": 3.3 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 28.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:90:be:b1-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:9d:90:be:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:90:be:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000002", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/hive-mbr1.json b/tests/data/devices/hive-mbr1.json new file mode 100644 index 00000000..61650ac2 --- /dev/null +++ b/tests/data/devices/hive-mbr1.json @@ -0,0 +1,565 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1c:d0:af:c8", + "nwk": "0xBE3E", + "manufacturer": "Hive", + "model": "MBR1", + "friendly_manufacturer": "Hive", + "friendly_model": "MBR1", + "name": "Hive MBR1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4153, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.259333+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 140, + "manufacturer_code": 4153, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Hive" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "MBR1" + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0xfe00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0015", + "endpoint_attribute": "commissioning", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 17068832 + }, + { + "id": "0x000a", + "name": "image_stamp", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0xfe01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe04", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe05", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe06", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe07", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0xfe01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe04", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe05", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe06", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe07", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0xfe01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe04", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe05", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe06", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe07", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0xfe01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe04", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe05", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe06", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfe07", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:d0:af:c8-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:1c:d0:af:c8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:d0:af:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:d0:af:c8-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:d0:af:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:d0:af:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:d0:af:c8-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:d0:af:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:d0:af:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:d0:af:c8-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:1c:d0:af:c8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:d0:af:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01047320", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/hobeian-zg-101zl.json b/tests/data/devices/hobeian-zg-101zl.json new file mode 100644 index 00000000..38412347 --- /dev/null +++ b/tests/data/devices/hobeian-zg-101zl.json @@ -0,0 +1,682 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:41:15:95:9c", + "nwk": "0x0224", + "manufacturer": "HOBEIAN", + "model": "ZG-101ZL", + "friendly_manufacturer": "HOBEIAN", + "friendly_model": "ZG-101ZL", + "name": "HOBEIAN ZG-101ZL", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 124, + "rssi": -80, + "last_seen": "2025-10-20T16:45:58.123452+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 147 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "HOBEIAN" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZG-101ZL" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "0122052017" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x4000", + "name": "global_scene_control", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x4000", + "name": "global_scene_control", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Toggle" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 124 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -80 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:41:15:95:9c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:41:15:95:9c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:41:15:95:9c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/hobeian-zg-102zm.json b/tests/data/devices/hobeian-zg-102zm.json new file mode 100644 index 00000000..a86b2e79 --- /dev/null +++ b/tests/data/devices/hobeian-zg-102zm.json @@ -0,0 +1,373 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:be:26:37:f4", + "nwk": "0xCEF6", + "manufacturer": "HOBEIAN", + "model": "ZG-102ZM", + "friendly_manufacturer": "HOBEIAN", + "friendly_model": "ZG-102ZM", + "name": "HOBEIAN ZG-102ZM", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 240, + "rssi": -40, + "last_seen": "2025-09-07T03:21:52.496165+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "HOBEIAN" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZG-102ZM" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "70:c5:9c:ff:fe:48:f4:fd" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 21 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:26:37:f4-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:be:26:37:f4:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:26:37:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:26:37:f4-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:be:26:37:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:26:37:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:26:37:f4-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:be:26:37:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:26:37:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 240 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:26:37:f4-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:be:26:37:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:26:37:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -40 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:26:37:f4-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:be:26:37:f4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:be:26:37:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/hobeian-zg-204zv.json b/tests/data/devices/hobeian-zg-204zv.json new file mode 100644 index 00000000..c7f01898 --- /dev/null +++ b/tests/data/devices/hobeian-zg-204zv.json @@ -0,0 +1,547 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d9:4b:d8:42", + "nwk": "0xAF28", + "manufacturer": "HOBEIAN", + "model": "ZG-204ZV", + "friendly_manufacturer": "HOBEIAN", + "friendly_model": "ZG-204ZV", + "name": "HOBEIAN ZG-204ZV", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-08-15T18:06:45.853422+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "HOBEIAN" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZG-204ZV" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 31688 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2330 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 4130 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:3c:84:ff:fe:bf:f5:df" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 1475 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:4b:d8:42-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:d9:4b:d8:42:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:4b:d8:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 41.3 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-badring-water-leakage-sensor.json b/tests/data/devices/ikea-of-sweden-badring-water-leakage-sensor.json new file mode 100644 index 00000000..16fa32da --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-badring-water-leakage-sensor.json @@ -0,0 +1,471 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:81:d7:c3:57", + "nwk": "0x92DD", + "manufacturer": "IKEA of Sweden", + "model": "BADRING Water Leakage Sensor", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "BADRING Water Leakage Sensor", + "name": "IKEA of Sweden BADRING Water Leakage Sensor", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.249935+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "BADRING Water Leakage Sensor" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 15 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:12:4b:00:2a:7b:54:7d" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 42 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc7c", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc81", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 16777223 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "moisture", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "AAA", + "battery_quantity": 1, + "battery_voltage": 1.5 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:d7:c3:57-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:81:d7:c3:57:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:d7:c3:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01000007", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-ormanas-led-strip.json b/tests/data/devices/ikea-of-sweden-ormanas-led-strip.json new file mode 100644 index 00000000..7f333d4e --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-ormanas-led-strip.json @@ -0,0 +1,922 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:96:7e:63:8a", + "nwk": "0x9812", + "manufacturer": "IKEA of Sweden", + "model": "ORMANAS LED Strip", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "ORMANAS LED Strip", + "name": "IKEA of Sweden ORMANAS LED Strip", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Mains", + "lqi": 204, + "rssi": -60, + "last_seen": "2025-10-07T08:02:03.181977+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 17 + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "value": 7 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ORMANAS LED Strip" + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0000", + "name": "count", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0004", + "name": "current_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 56 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 8 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 31 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x003c", + "name": "color_point_b_intensity", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 454 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 250 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 264 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 24 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 201 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 21167 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 21561 + }, + { + "id": "0x4001", + "name": "enhanced_color_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0013", + "name": "primary1_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0017", + "name": "primary2_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001b", + "name": "primary3_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0022", + "name": "primary4_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0026", + "name": "primary5_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x002a", + "name": "primary6_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0028", + "name": "primary6_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0030", + "name": "white_point_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0031", + "name": "white_point_y", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 16842768 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 250, + "max_mireds": 454 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 56, + "xy_color": [ + 0.3229877164873732, + 0.32899977111467155 + ], + "color_temp": 264, + "effect_list": [ + "off", + "colorloop" + ], + "effect": "off", + "supported_features": 44, + "color_mode": "xy", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 454, + "native_min_value": 250, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 8 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 204 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:96:7e:63:8a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:96:7e:63:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:96:7e:63:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01010010", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-remote-control-n2.json b/tests/data/devices/ikea-of-sweden-remote-control-n2.json new file mode 100644 index 00000000..02f5a8b4 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-remote-control-n2.json @@ -0,0 +1,392 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6b:e7:d0:70", + "nwk": "0x5815", + "manufacturer": "IKEA of Sweden", + "model": "Remote Control N2", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "Remote Control N2", + "name": "IKEA of Sweden Remote Control N2", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.750920+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Remote Control N2" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "1.0.024" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:e7:d0:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:e7:d0:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:e7:d0:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6b:e7:d0:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AAA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:e7:d0:70-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6b:e7:d0:70:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:e7:d0:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-rodret-wireless-dimmer.json b/tests/data/devices/ikea-of-sweden-rodret-wireless-dimmer.json new file mode 100644 index 00000000..91dd12b7 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-rodret-wireless-dimmer.json @@ -0,0 +1,459 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:07:f8:aa:b7", + "nwk": "0xB599", + "manufacturer": "IKEA of Sweden", + "model": "RODRET wireless dimmer", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "RODRET wireless dimmer", + "name": "IKEA of Sweden RODRET wireless dimmer", + "quirk_applied": true, + "quirk_class": "zhaquirks.ikea.twobtnremote.IkeaRodretRemote2BtnNew", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Battery or Unknown", + "lqi": 39, + "rssi": null, + "last_seen": "2025-08-14T19:41:01.731089+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RODRET wireless dimmer" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 15 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0003", + "name": "fast_poll_timeout", + "zcl_type": "uint16", + "value": 120 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc7c", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 16777303 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "IKEA of Sweden", + "RODRET Dimmer" + ], + [ + "IKEA of Sweden", + "RODRET wireless dimmer" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0820", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0004", + "0x0020", + "0x1000", + "0xfc7c" + ], + "output_clusters": [ + "0x0003", + "0x0004", + "0x0006", + "0x0008", + "0x0019", + "0x1000" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f8:aa:b7-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:07:f8:aa:b7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f8:aa:b7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f8:aa:b7-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:07:f8:aa:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f8:aa:b7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 39 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f8:aa:b7-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:07:f8:aa:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f8:aa:b7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f8:aa:b7-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:07:f8:aa:b7:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:07:f8:aa:b7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "AAA", + "battery_quantity": 1, + "battery_voltage": 1.5 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f8:aa:b7-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:07:f8:aa:b7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f8:aa:b7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01000057", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-tradfri-bulb-e14-ws-globe-470lm.json b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e14-ws-globe-470lm.json new file mode 100644 index 00000000..276b2d12 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e14-ws-globe-470lm.json @@ -0,0 +1,789 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:af:8d:14:56", + "nwk": "0x7A25", + "manufacturer": "IKEA of Sweden", + "model": "TRADFRI bulb E14 WS globe 470lm", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "TRADFRI bulb E14 WS globe 470lm", + "name": "IKEA of Sweden TRADFRI bulb E14 WS globe 470lm", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Mains", + "lqi": 160, + "rssi": -60, + "last_seen": "2025-10-06T15:57:46.354299+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TRADFRI bulb E14 WS globe 470lm" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 16 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 454 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 250 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 370 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 24939 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 24701 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 65535 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc7c", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 16842784 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 250, + "max_mireds": 454 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": null, + "color_temp": 370, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 454, + "native_min_value": 250, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 160 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:8d:14:56-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:af:8d:14:56:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:8d:14:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01010020", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ww-g95-cl-470lm.json b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ww-g95-cl-470lm.json new file mode 100644 index 00000000..737b3257 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ww-g95-cl-470lm.json @@ -0,0 +1,660 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "nwk": "0x0D39", + "manufacturer": "IKEA of Sweden", + "model": "TRADFRI bulb E27 WW G95 CL 470lm", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "TRADFRI bulb E27 WW G95 CL 470lm", + "name": "IKEA of Sweden TRADFRI bulb E27 WW G95 CL 470lm", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4476, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.605639+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4476, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "IKEA of Sweden" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TRADFRI bulb E27 WW G95 CL 470lm" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 5 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc7c", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 69638 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:0e:4d:bd:b3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:4d:bd:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00011006", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/innr-sp-240.json b/tests/data/devices/innr-sp-240.json new file mode 100644 index 00000000..50e26957 --- /dev/null +++ b/tests/data/devices/innr-sp-240.json @@ -0,0 +1,1288 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:51:53:67", + "nwk": "0x2020", + "manufacturer": "innr", + "model": "SP 240", + "friendly_manufacturer": "innr", + "friendly_model": "SP 240", + "name": "innr SP 240", + "quirk_applied": true, + "quirk_class": "zhaquirks.innr.innr_sp240_plug.SP240", + "quirk_id": null, + "manufacturer_code": 4454, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.940544+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4454, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 80, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 80, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "innr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SP 240" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 143 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 51 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 2 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 2433372681 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 14 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 231 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 421410437 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0008", + "name": "image_type_id", + "zcl_type": "uint16", + "value": 820 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4454 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "innr", + "SP 240" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0702", + "0x0b04", + "0x1000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "MeteringClusterInnr", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 1.43, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 2.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.014, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 231.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:51:53:67-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:39:51:53:67:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:51:53:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x191e3685", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/innr-sp-242.json b/tests/data/devices/innr-sp-242.json new file mode 100644 index 00000000..ffa23c06 --- /dev/null +++ b/tests/data/devices/innr-sp-242.json @@ -0,0 +1,1238 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:86:df:1b:97", + "nwk": "0x89D2", + "manufacturer": "innr", + "model": "SP 242", + "friendly_manufacturer": "innr", + "friendly_model": "SP 242", + "name": "innr SP 242", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4454, + "power_source": "Mains", + "lqi": 172, + "rssi": -68, + "last_seen": "2025-09-04T09:09:33.452851+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4454, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 80, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 80, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "innr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SP 242" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 466 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 42 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 2433372681 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 240 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 387397253 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 172 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -68 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 466.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 240.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:df:1b:97-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:86:df:1b:97:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:df:1b:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x17173685", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/inovelli-vzm35-sn.json b/tests/data/devices/inovelli-vzm35-sn.json new file mode 100644 index 00000000..841c50cf --- /dev/null +++ b/tests/data/devices/inovelli-vzm35-sn.json @@ -0,0 +1,2709 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:03:3d:90:21", + "nwk": "0xE534", + "manufacturer": "Inovelli", + "model": "VZM35-SN", + "friendly_manufacturer": "Inovelli", + "friendly_model": "VZM35-SN", + "name": "Inovelli VZM35-SN", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4655, + "power_source": "Mains", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-07-31T03:54:23.594775+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4655, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 512, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 512, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Inovelli" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "VZM35-SN" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc31", + "endpoint_attribute": "inovelli_vzm31sn_cluster", + "attributes": [ + { + "id": "0x000c", + "name": "auto_off_timer", + "zcl_type": "uint16", + "value": 3600 + }, + { + "id": "0x007b", + "name": "aux_switch_scenes", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0032", + "name": "button_delay", + "zcl_type": "uint8", + "value": 5 + }, + { + "id": "0x000d", + "name": "default_level_local", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x000e", + "name": "default_level_remote", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0006", + "name": "dimming_speed_down_local", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0005", + "name": "dimming_speed_down_remote", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0002", + "name": "dimming_speed_up_local", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0001", + "name": "dimming_speed_up_remote", + "zcl_type": "uint8", + "value": 25 + }, + { + "id": "0x0036", + "name": "double_tap_down_enabled", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0038", + "name": "double_tap_down_level", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0035", + "name": "double_tap_up_enabled", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0037", + "name": "double_tap_up_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0104", + "name": "firmware_progress_led", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x000b", + "name": "invert_switch", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0060", + "name": "led_color_when_off", + "zcl_type": "uint8", + "value": 170 + }, + { + "id": "0x005f", + "name": "led_color_when_on", + "zcl_type": "uint8", + "value": 170 + }, + { + "id": "0x0062", + "name": "led_intensity_when_off", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0061", + "name": "led_intensity_when_on", + "zcl_type": "uint8", + "value": 33 + }, + { + "id": "0x0011", + "name": "load_level_indicator_timeout", + "zcl_type": "uint8", + "value": 11 + }, + { + "id": "0x0100", + "name": "local_protection", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x000a", + "name": "maximum_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0009", + "name": "minimum_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x001f", + "name": "non_neutral_aux_low_gear_learn_value", + "zcl_type": "uint8", + "value": 110 + }, + { + "id": "0x001e", + "name": "non_neutral_aux_med_gear_learn_value", + "zcl_type": "uint8", + "value": 90 + }, + { + "id": "0x0103", + "name": "on_off_led_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0102", + "name": "output_mode", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x0021", + "name": "overheated", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0015", + "name": "power_type", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0017", + "name": "quick_start_time", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "ramp_rate_off_to_on_local", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0003", + "name": "ramp_rate_off_to_on_remote", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "ramp_rate_on_to_off_local", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0007", + "name": "ramp_rate_on_to_off_remote", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0034", + "name": "smart_fan_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0107", + "name": "smart_fan_led_display_levels", + "zcl_type": "uint8", + "value": 10 + }, + { + "id": "0x000f", + "name": "state_after_power_restored", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0016", + "name": "switch_type", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 33685767 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "DIMMER_SWITCH", + "id": 260 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0xfc31", + "endpoint_attribute": "inovelli_vzm31sn_cluster", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "DIMMER_SWITCH", + "id": 260 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0xfc31", + "endpoint_attribute": "inovelli_vzm31sn_cluster", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-auto_off_timer", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliAutoShutoffTimer", + "translation_key": "auto_off_timer", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 32767, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliAutoShutoffTimer", + "available": true, + "state": 3600 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-button_delay", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliButtonDelay", + "translation_key": "button_delay", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliButtonDelay", + "available": true, + "state": 5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-default_level_local", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLocalDefaultLevel", + "translation_key": "default_level_local", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLocalDefaultLevel", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-default_level_remote", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliRemoteDefaultLevel", + "translation_key": "default_level_remote", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliRemoteDefaultLevel", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-dimming_speed_down_local", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLocalDimmingDownSpeed", + "translation_key": "dimming_speed_down_local", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLocalDimmingDownSpeed", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-dimming_speed_down_remote", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliRemoteDimmingDownSpeed", + "translation_key": "dimming_speed_down_remote", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliRemoteDimmingDownSpeed", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-dimming_speed_up_local", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLocalDimmingUpSpeed", + "translation_key": "dimming_speed_up_local", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLocalDimmingUpSpeed", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-dimming_speed_up_remote", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliRemoteDimmingUpSpeed", + "translation_key": "dimming_speed_up_remote", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 126, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliRemoteDimmingUpSpeed", + "available": true, + "state": 25 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-double_tap_down_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDoubleTapDownLevel", + "translation_key": "double_tap_down_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 254, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDoubleTapDownLevel", + "available": true, + "state": 2 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-double_tap_up_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDoubleTapUpLevel", + "translation_key": "double_tap_up_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 254, + "native_min_value": 2, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDoubleTapUpLevel", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-led_color_when_off", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDefaultAllLEDOffColor", + "translation_key": "led_color_when_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDefaultAllLEDOffColor", + "available": true, + "state": 170 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-led_color_when_on", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDefaultAllLEDOnColor", + "translation_key": "led_color_when_on", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDefaultAllLEDOnColor", + "available": true, + "state": 170 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-led_intensity_when_off", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDefaultAllLEDOffIntensity", + "translation_key": "led_intensity_when_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDefaultAllLEDOffIntensity", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-led_intensity_when_on", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliDefaultAllLEDOnIntensity", + "translation_key": "led_intensity_when_on", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliDefaultAllLEDOnIntensity", + "available": true, + "state": 33 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-load_level_indicator_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLoadLevelIndicatorTimeout", + "translation_key": "load_level_indicator_timeout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 11, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLoadLevelIndicatorTimeout", + "available": true, + "state": 11 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-maximum_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliMaximumLoadDimmingLevel", + "translation_key": "maximum_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 2, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliMaximumLoadDimmingLevel", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-minimum_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliMinimumLoadDimmingLevel", + "translation_key": "minimum_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 254, + "native_min_value": 1, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliMinimumLoadDimmingLevel", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-quick_start_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliQuickStartTime", + "translation_key": "quick_start_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliQuickStartTime", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-ramp_rate_off_to_on_local", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLocalRampRateOffToOn", + "translation_key": "ramp_rate_off_to_on_local", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLocalRampRateOffToOn", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-ramp_rate_off_to_on_remote", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliRemoteDimmingSpeedOffToOn", + "translation_key": "ramp_rate_off_to_on_remote", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliRemoteDimmingSpeedOffToOn", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-ramp_rate_on_to_off_local", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliLocalRampRateOnToOff", + "translation_key": "ramp_rate_on_to_off_local", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliLocalRampRateOnToOff", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-ramp_rate_on_to_off_remote", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliRemoteDimmingSpeedOnToOff", + "translation_key": "ramp_rate_on_to_off_remote", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 127, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliRemoteDimmingSpeedOnToOff", + "available": true, + "state": 127 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-state_after_power_restored", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "InovelliStartupDefaultLevel", + "translation_key": "state_after_power_restored", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "InovelliStartupDefaultLevel", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-output_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "InovelliOutputModeEntity", + "translation_key": "output_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "InovelliOutputMode", + "options": [ + "Dimmer", + "OnOff" + ] + }, + "state": { + "class_name": "InovelliOutputModeEntity", + "available": true, + "state": "OnOff" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-smart_fan_led_display_levels", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "InovelliFanLedScalingModeEntity", + "translation_key": "smart_fan_led_display_levels", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "InovelliFanLedScalingMode", + "options": [ + "VZM31SN", + "Grade 1", + "Grade 2", + "Grade 3", + "Grade 4", + "Grade 5", + "Grade 6", + "Grade 7", + "Grade 8", + "Grade 9", + "Adaptive" + ] + }, + "state": { + "class_name": "InovelliFanLedScalingModeEntity", + "available": true, + "state": "Adaptive" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-switch_type", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "InovelliFanSwitchTypeEntity", + "translation_key": "switch_type", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "InovelliFanSwitchType", + "options": [ + "Load Only", + "Three Way AUX" + ] + }, + "state": { + "class_name": "InovelliFanSwitchTypeEntity", + "available": true, + "state": "Load Only" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "InovelliInternalTemperature", + "translation_key": "internal_temp_monitor", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "InovelliInternalTemperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-overheated", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "InovelliOverheated", + "translation_key": "overheated", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "InovelliOverheated", + "available": true, + "state": "Normal" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-aux_switch_scenes", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliAuxSwitchScenes", + "translation_key": "aux_switch_scenes", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "aux_switch_scenes", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliAuxSwitchScenes", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-double_tap_down_enabled", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliDoubleTapDownEnabled", + "translation_key": "double_tap_down_enabled", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "double_tap_down_enabled", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliDoubleTapDownEnabled", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-double_tap_up_enabled", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliDoubleTapUpEnabled", + "translation_key": "double_tap_up_enabled", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "double_tap_up_enabled", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliDoubleTapUpEnabled", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-firmware_progress_led", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliFirmwareProgressLED", + "translation_key": "firmware_progress_led", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "firmware_progress_led", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliFirmwareProgressLED", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-invert_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliInvertSwitch", + "translation_key": "invert_switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "invert_switch", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliInvertSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-local_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliLocalProtection", + "translation_key": "local_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "local_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliLocalProtection", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-on_off_led_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliOnOffLEDMode", + "translation_key": "one_led_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off_led_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliOnOffLEDMode", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-smart_bulb_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliSmartBulbMode", + "translation_key": "smart_bulb_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "smart_bulb_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliSmartBulbMode", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-64561-smart_fan_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "InovelliSmartFanMode", + "translation_key": "smart_fan_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "InovelliConfigEntityClusterHandler", + "generic_id": "cluster_handler_0xfc31", + "endpoint_id": 1, + "cluster": { + "id": 64561, + "name": "InovelliVZM35SNCluster", + "type": "server" + }, + "id": "1:0xfc31", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0xfc31", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "smart_fan_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "InovelliSmartFanMode", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:3d:90:21-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:03:3d:90:21:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:3d:90:21", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x02020107", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/legrand-contactor.json b/tests/data/devices/legrand-contactor.json new file mode 100644 index 00000000..538d715d --- /dev/null +++ b/tests/data/devices/legrand-contactor.json @@ -0,0 +1,1041 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0d:ab:89:6b", + "nwk": "0x30DD", + "manufacturer": " Legrand", + "model": " Contactor", + "friendly_manufacturer": " Legrand", + "friendly_model": " Contactor", + "name": " Legrand Contactor", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4129, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.056228+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": true, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4129, + "maximum_buffer_size": 89, + "maximum_incoming_transfer_size": 63, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 63, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": " " + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": " Legrand" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": " Contactor" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "value": " https://developer.legrand.com" + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 69 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "005a" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 8 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x0004", + "name": "active_text", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc41", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "COMBO_BASIC", + "id": 102 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-15", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinaryInput", + "translation_key": "binary_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BinaryInputClusterHandler", + "generic_id": "cluster_handler_0x000f", + "endpoint_id": 1, + "cluster": { + "id": 15, + "name": "Binary Input (Basic)", + "type": "server" + }, + "id": "1:0x000f", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "present_value" + }, + "state": { + "class_name": "BinaryInput", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-2820-apparent_power", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementApparentPower", + "translation_key": null, + "translation_placeholders": null, + "device_class": "apparent_power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:ab:89:6b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:0d:ab:89:6b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:ab:89:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/legrand-dimmer-switch-w-o-neutral.json b/tests/data/devices/legrand-dimmer-switch-w-o-neutral.json new file mode 100644 index 00000000..199c709c --- /dev/null +++ b/tests/data/devices/legrand-dimmer-switch-w-o-neutral.json @@ -0,0 +1,1021 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:5a:79:5a", + "nwk": "0xFD5E", + "manufacturer": " Legrand", + "model": " Dimmer switch w/o neutral", + "friendly_manufacturer": " Legrand", + "friendly_model": " Dimmer switch w/o neutral", + "name": " Legrand Dimmer switch w/o neutral", + "quirk_applied": true, + "quirk_class": "zhaquirks.legrand.dimmer.DimmerWithoutNeutralAndBallast", + "quirk_id": null, + "manufacturer_code": 4129, + "power_source": "Mains", + "lqi": 57, + "rssi": null, + "last_seen": "2025-10-18T13:57:59.436859+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": true, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4129, + "maximum_buffer_size": 89, + "maximum_incoming_transfer_size": 63, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 63, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": " Legrand" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": " Dimmer switch w/o neutral" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 76 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 5 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 76 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 56 + } + ] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0301", + "endpoint_attribute": "light_ballast", + "attributes": [ + { + "id": "0x0015", + "name": "ballast_factor_adjustment", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "ballast_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0014", + "name": "intrinsic_ballast_factor", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "legrand_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 5064191 + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "legrand_cluster", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "COMBO_BASIC", + "id": 102 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + " Legrand", + " Dimmer switch w/o neutral" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0006", + "0x0008", + "0x0005", + "0x000f", + "0x0301", + "0xfc01" + ], + "output_clusters": [ + "0x0000", + "0xfc01", + "0x0019", + "0x0006", + "0x0005" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0066", + "input_clusters": [ + "0x0021" + ], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-15", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinaryInput", + "translation_key": "binary_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BinaryInputClusterHandler", + "generic_id": "cluster_handler_0x000f", + "endpoint_id": 1, + "cluster": { + "id": 15, + "name": "Binary Input (Basic)", + "type": "server" + }, + "id": "1:0x000f", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "present_value" + }, + "state": { + "class_name": "BinaryInput", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 76, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-default_move_rate", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "DefaultMoveRateConfigurationEntity", + "translation_key": "default_move_rate", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 254, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "DefaultMoveRateConfigurationEntity", + "available": true, + "state": 254 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 76 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-on_off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnOffTransitionTimeConfigurationEntity", + "translation_key": "on_off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnOffTransitionTimeConfigurationEntity", + "available": true, + "state": 3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 56 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Toggle" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 57 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:5a:79:5a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b1:5a:79:5a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:5a:79:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x004d45ff", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/legrand-double-gangs-remote-switch.json b/tests/data/devices/legrand-double-gangs-remote-switch.json new file mode 100644 index 00000000..127d3bcc --- /dev/null +++ b/tests/data/devices/legrand-double-gangs-remote-switch.json @@ -0,0 +1,500 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b6:14:95:c6", + "nwk": "0x8014", + "manufacturer": " Legrand", + "model": " Double gangs remote switch", + "friendly_manufacturer": " Legrand", + "friendly_model": " Double gangs remote switch", + "name": " Legrand Double gangs remote switch", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4129, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.398527+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": true, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4129, + "maximum_buffer_size": 89, + "maximum_incoming_transfer_size": 63, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 63, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMER_SWITCH", + "id": 260 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": " Legrand" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": " Double gangs remote switch" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "DIMMER_SWITCH", + "id": 260 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-2-15", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinaryInput", + "translation_key": "binary_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BinaryInputClusterHandler", + "generic_id": "cluster_handler_0x000f", + "endpoint_id": 2, + "cluster": { + "id": 15, + "name": "Binary Input (Basic)", + "type": "server" + }, + "id": "2:0x000f", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:2:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "present_value" + }, + "state": { + "class_name": "BinaryInput", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:14:95:c6-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b6:14:95:c6:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:14:95:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/legrand-light-switch-with-neutral.json b/tests/data/devices/legrand-light-switch-with-neutral.json new file mode 100644 index 00000000..cb5bffdd --- /dev/null +++ b/tests/data/devices/legrand-light-switch-with-neutral.json @@ -0,0 +1,637 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:bc:b5:2d", + "nwk": "0x8540", + "manufacturer": " Legrand", + "model": " Light switch with neutral", + "friendly_manufacturer": " Legrand", + "friendly_model": " Light switch with neutral", + "name": " Legrand Light switch with neutral", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4129, + "power_source": "Mains", + "lqi": 220, + "rssi": -67, + "last_seen": "2025-09-10T13:44:21.223921+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": true, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4129, + "maximum_buffer_size": 89, + "maximum_incoming_transfer_size": 63, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 63, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": " Legrand" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": " Light switch with neutral" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "legrand_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 1851907 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "COMBO_BASIC", + "id": 102 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-15", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinaryInput", + "translation_key": "binary_input", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BinaryInputClusterHandler", + "generic_id": "cluster_handler_0x000f", + "endpoint_id": 1, + "cluster": { + "id": 15, + "name": "Binary Input (Basic)", + "type": "server" + }, + "id": "1:0x000f", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "present_value" + }, + "state": { + "class_name": "BinaryInput", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "LegrandIdentify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 220 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -67 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Turn on LED when off", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-led_dark", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "turn_on_led_when_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ClusterHandler", + "generic_id": "cluster_handler_0xfc01", + "endpoint_id": 1, + "cluster": { + "id": 64513, + "name": "LegrandCluster", + "type": "server" + }, + "id": "1:0xfc01", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0xfc01", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "led_dark", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Turn on LED when on", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-led_on", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "turn_on_led_when_on", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ClusterHandler", + "generic_id": "cluster_handler_0xfc01", + "endpoint_id": 1, + "cluster": { + "id": 64513, + "name": "LegrandCluster", + "type": "server" + }, + "id": "1:0xfc01", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0xfc01", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "led_on", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:bc:b5:2d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:39:bc:b5:2d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:bc:b5:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x001c4203", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-airrtc-agl001.json b/tests/data/devices/lumi-lumi-airrtc-agl001.json new file mode 100644 index 00000000..4ffde35d --- /dev/null +++ b/tests/data/devices/lumi-lumi-airrtc-agl001.json @@ -0,0 +1,695 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ce:61:df:4c", + "nwk": "0x7E61", + "manufacturer": "LUMI", + "model": "lumi.airrtc.agl001", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.airrtc.agl001", + "name": "LUMI lumi.airrtc.agl001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.578732+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.airrtc.agl001" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 10 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2170 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2600 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 21.7, + "outdoor_temperature": null, + "target_temperature": 20.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": 2600, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "CR2032", + "battery_quantity": 1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:61:df:4c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ce:61:df:4c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:61:df:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-curtain-acn002.json b/tests/data/devices/lumi-lumi-curtain-acn002.json new file mode 100644 index 00000000..3c2194a4 --- /dev/null +++ b/tests/data/devices/lumi-lumi-curtain-acn002.json @@ -0,0 +1,907 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:dc:6a:11:ac", + "nwk": "0x7F3C", + "manufacturer": "LUMI", + "model": "lumi.curtain.acn002", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.curtain.acn002", + "name": "LUMI lumi.curtain.acn002", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-08-23T20:52:03.003610+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "09-12-2023" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.curtain.acn002" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 158 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 2400 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Current position" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 100.0 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + }, + { + "id": "0x0068", + "name": "relinquish_default", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1.0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0013", + "endpoint_attribute": "multistate_output", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 43 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 8 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [ + { + "id": "0x00f7", + "name": "aqara_attributes", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b'\\x03(\\x18\\x05!\\xb3\\x03\\t!\\x00\\x01\\n!\\x00\\x00\\x0b \\x00\\x0c \\x01\\r#\\x1f\\x0e\\x00\\x00\\x11#\\x01\\x00\\x00\\x00d \\x00e Of \\x80g li \\x02j!\\xa4\\x1ek \\x00'" + } + }, + { + "id": "0x0409", + "name": "charging", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0402", + "name": "positions_stored", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x0408", + "name": "speed", + "zcl_type": "uint8", + "value": 2 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 3615 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Charging", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-charging", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery_charging", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "XiaomiAqaraRollerE1", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "charging" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Calibrated", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-positions_stored", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "calibrated", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "XiaomiAqaraRollerE1", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "positions_stored" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": true + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "shade", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 0, + "current_tilt_position": null, + "state": "closed", + "is_opening": false, + "is_closing": false, + "is_closed": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Speed", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-speed", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "speed", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OppleRemoteClusterHandler", + "generic_id": "cluster_handler_0xfcc0", + "endpoint_id": 1, + "cluster": { + "id": 64704, + "name": "XiaomiAqaraRollerE1", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "AqaraRollerDriverSpeed", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "High" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 79.0, + "battery_size": "Unknown", + "battery_quantity": 1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 24.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-258-window_covering_type", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "WindowCoveringTypeSensor", + "translation_key": "window_covering_type", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Rollershade" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-258-inverted", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "WindowCoveringInversionSwitch", + "translation_key": "inverted", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "config_status", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "WindowCoveringInversionSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:6a:11:ac-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:dc:6a:11:ac:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:6a:11:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000e1f", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-magnet-agl02.json b/tests/data/devices/lumi-lumi-magnet-agl02.json new file mode 100644 index 00000000..fcf0eb6b --- /dev/null +++ b/tests/data/devices/lumi-lumi-magnet-agl02.json @@ -0,0 +1,423 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:52:70:f0:26", + "nwk": "0x6E4A", + "manufacturer": "LUMI", + "model": "lumi.magnet.agl02", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.magnet.agl02", + "name": "LUMI lumi.magnet.agl02", + "quirk_applied": true, + "quirk_class": "zhaquirks.xiaomi.aqara.magnet_agl02.MagnetT1", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -35, + "last_seen": "2025-10-03T03:42:59.801363+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 11 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 30 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "LUMI", + "lumi.magnet.agl02" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0402", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0500" + ], + "output_clusters": [ + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -35 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "CR1632", + "battery_quantity": 1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:70:f0:26-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:52:70:f0:26:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:70:f0:26", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-switch-l1aeu1.json b/tests/data/devices/lumi-lumi-switch-l1aeu1.json new file mode 100644 index 00000000..fe240dba --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-l1aeu1.json @@ -0,0 +1,474 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4f:81:48:a1", + "nwk": "0x9118", + "manufacturer": "LUMI", + "model": "lumi.switch.l1aeu1", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.l1aeu1", + "name": "LUMI lumi.switch.l1aeu1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 240, + "rssi": -40, + "last_seen": "2025-06-08T17:17:26.635880+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.l1aeu1" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 3595 + } + ] + } + ] + }, + "41": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 240 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -40 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.3 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:81:48:a1-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4f:81:48:a1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:81:48:a1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000e0b", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-switch-l2aeu1.json b/tests/data/devices/lumi-lumi-switch-l2aeu1.json new file mode 100644 index 00000000..5778ddc8 --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-l2aeu1.json @@ -0,0 +1,578 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:dd:16:89:b4", + "nwk": "0x3724", + "manufacturer": "LUMI", + "model": "lumi.switch.l2aeu1", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.l2aeu1", + "name": "LUMI lumi.switch.l2aeu1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 220, + "rssi": -45, + "last_seen": "2025-09-06T20:50:44.694743+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.l2aeu1" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 3595 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 220 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -45 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.3 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:16:89:b4-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:dd:16:89:b4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:16:89:b4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000e0b", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-switch-n0agl1.json b/tests/data/devices/lumi-lumi-switch-n0agl1.json new file mode 100644 index 00000000..33ced963 --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-n0agl1.json @@ -0,0 +1,1210 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e9:c7:8a:67", + "nwk": "0x8AF1", + "manufacturer": "LUMI", + "model": "lumi.switch.n0agl1", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.n0agl1", + "name": "LUMI lumi.switch.n0agl1", + "quirk_applied": true, + "quirk_class": "zhaquirks.xiaomi.aqara.switch_t1.SwitchT1Alt3", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 255, + "rssi": -64, + "last_seen": "2025-05-12T10:38:28.889996+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4447, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.n0agl1" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 18 + }, + { + "id": "0x0010", + "name": "dev_temp_alarm_mask", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x0012", + "name": "high_temp_thres", + "zcl_type": "int16", + "value": 70 + }, + { + "id": "0x0011", + "name": "low_temp_thres", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0002", + "name": "max_temp_experienced", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0001", + "name": "min_temp_experienced", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0003", + "name": "over_temp_total_dwell", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0019", + "name": "control_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 41150 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0017", + "name": "inlet_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0018", + "name": "outlet_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 35 + }, + { + "id": "0x030d", + "name": "temperature_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x030c", + "name": "temperature_unit_of_measure", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0803", + "name": "water_specific_alarm_mask", + "zcl_type": "map16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 8 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "value": 1 + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "value": 1 + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 229 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "value": 42380 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 30 + } + ] + } + ] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + } + ] + } + ], + "out_clusters": [] + }, + "31": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "41": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "LUMI", + "lumi.switch.n0agl1" + ], + [ + "LUMI", + "lumi.switch.n0acn2" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0002", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0009", + "0x000a", + "0x0702", + "0x0b04", + "0xfcc0" + ], + "output_clusters": [ + "0x0019" + ] + }, + "21": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x000c" + ], + "output_clusters": [] + }, + "31": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x000c" + ], + "output_clusters": [] + }, + "41": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0012" + ], + "output_clusters": [] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -64 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "MeteringCluster", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 41.15, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.18 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 229.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-2820-total_active_power", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementTotalActivePower", + "translation_key": "total_active_power", + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementTotalActivePower", + "available": true, + "state": 4238.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e9:c7:8a:67-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e9:c7:8a:67:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e9:c7:8a:67", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-vibration-agl01.json b/tests/data/devices/lumi-lumi-vibration-agl01.json new file mode 100644 index 00000000..422a6fd1 --- /dev/null +++ b/tests/data/devices/lumi-lumi-vibration-agl01.json @@ -0,0 +1,495 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7d:e2:f1:42", + "nwk": "0x6827", + "manufacturer": "LUMI", + "model": "lumi.vibration.agl01", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.vibration.agl01", + "name": "LUMI lumi.vibration.agl01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 108, + "rssi": -84, + "last_seen": "2025-10-27T14:31:15.191577+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4447, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 28 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.vibration.agl01" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "44:e2:f8:ff:fe:8c:98:35" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 28 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-2-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 2, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "2:0x0500", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:2:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 108 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -84 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:e2:f1:42-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:7d:e2:f1:42:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:e2:f1:42", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001c", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/mli-tint-extendedcolor.json b/tests/data/devices/mli-tint-extendedcolor.json new file mode 100644 index 00000000..8a2d89de --- /dev/null +++ b/tests/data/devices/mli-tint-extendedcolor.json @@ -0,0 +1,674 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:72:50:2b:f4", + "nwk": "0x5A8E", + "manufacturer": "MLI", + "model": "tint-ExtendedColor", + "friendly_manufacturer": "MLI", + "friendly_model": "tint-ExtendedColor", + "name": "MLI tint-ExtendedColor", + "quirk_applied": true, + "quirk_class": "zhaquirks.mli.tintE14rgbcct.TintRGBCCTLight", + "quirk_id": null, + "manufacturer_code": 4635, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.757582+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4635, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "MLI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "tint-ExtendedColor" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 30 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 555 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 370 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 65535 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0x100f", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 268509185 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "MLI", + "tint-ExtendedColor" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010d", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0300", + "0x1000", + "0x100f" + ], + "output_clusters": [ + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 153, + "max_mireds": 555 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": [ + 0, + 0 + ], + "color_temp": 370, + "effect_list": [ + "off", + "colorloop" + ], + "effect": "off", + "supported_features": 44, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 555, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:50:2b:f4-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:72:50:2b:f4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:50:2b:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x10012001", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/mli-zbt-remote-all-rgbw.json b/tests/data/devices/mli-zbt-remote-all-rgbw.json new file mode 100644 index 00000000..5aee4214 --- /dev/null +++ b/tests/data/devices/mli-zbt-remote-all-rgbw.json @@ -0,0 +1,698 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:2f:b5:32", + "nwk": "0xEE0B", + "manufacturer": "MLI", + "model": "ZBT-Remote-ALL-RGBW", + "friendly_manufacturer": "MLI", + "friendly_model": "ZBT-Remote-ALL-RGBW", + "name": "MLI ZBT-Remote-ALL-RGBW", + "quirk_applied": true, + "quirk_class": "zhaquirks.mli.tint.TintRemote", + "quirk_id": null, + "manufacturer_code": 4635, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -67, + "last_seen": "2025-08-28T13:53:54.455197+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4635, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_CONTROLLER", + "id": 2048 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20180605-17" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "MLI" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZBT-Remote-ALL-RGBW" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b'010200011'" + } + }, + { + "id": "0x000e", + "name": "product_label", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "value": "www.Leedarson.com" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "2.0" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 6 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x4000", + "name": "global_scene_control", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0004", + "name": "current_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0006", + "name": "max_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "max_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0005", + "name": "min_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "remaining_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 285278242 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x4004", + "name": "color_loop_time", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "MLI", + "ZBT-Remote-ALL-RGBW" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0800", + "input_clusters": [ + "0x0000", + "0x0003", + "0x1000" + ], + "output_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0006", + "0x0008", + "0x0019", + "0x0300", + "0x1000" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:2f:b5:32-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b1:2f:b5:32:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:2f:b5:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:2f:b5:32-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "TintRemoteBasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:2f:b5:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:2f:b5:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:2f:b5:32-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "TintRemoteBasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:2f:b5:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:2f:b5:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -67 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:2f:b5:32-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b1:2f:b5:32:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:2f:b5:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x11010022", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/nabu-casa-ha-connect-zbt-1.json b/tests/data/devices/nabu-casa-ha-connect-zbt-1.json new file mode 100644 index 00000000..1bf9b39d --- /dev/null +++ b/tests/data/devices/nabu-casa-ha-connect-zbt-1.json @@ -0,0 +1,125 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:49:9b:6e:bb", + "nwk": "0x0000", + "manufacturer": "Nabu Casa", + "model": "HA Connect ZBT-1", + "friendly_manufacturer": "Nabu Casa", + "friendly_model": "HA Connect ZBT-1", + "name": "HA Connect ZBT-1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 43981, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.166543+00:00", + "available": true, + "device_type": "Coordinator", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Coordinator", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 143, + "manufacturer_code": 43981, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 128, + "server_mask": 11329, + "maximum_outgoing_transfer_size": 128, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_CONTROL", + "id": 1024 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Silicon Labs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EZSP" + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0501", + "endpoint_attribute": "ias_ace", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [] + }, + { + "cluster_id": "0x0502", + "endpoint_attribute": "ias_wd", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 49246, + "device_type": { + "name": "CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": {}, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/namron-as-4512785.json b/tests/data/devices/namron-as-4512785.json new file mode 100644 index 00000000..8a125703 --- /dev/null +++ b/tests/data/devices/namron-as-4512785.json @@ -0,0 +1,1128 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4c:9e:2b:64", + "nwk": "0xE8F9", + "manufacturer": "Namron AS", + "model": "4512785", + "friendly_manufacturer": "Namron AS", + "friendly_model": "4512785", + "name": "Namron AS 4512785", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4714, + "power_source": "Mains", + "lqi": 255, + "rssi": -73, + "last_seen": "2025-09-16T13:27:03.315142+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4714, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_OUTPUT", + "id": 2 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Namron AS" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "4512785" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 352 + }, + { + "id": "0x0010", + "name": "dev_temp_alarm_mask", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0003", + "name": "over_temp_total_dwell", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "int16", + "value": 65 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "int16", + "value": -20 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x04e0", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 2502 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 3 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0803", + "name": "ac_active_power_overload", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0800", + "name": "ac_alarms_mask", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0301", + "name": "ac_frequency_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 2429 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 14 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -73 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 0.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 25.02, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "DeviceTemperature", + "translation_key": "device_temperature", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "DeviceTemperatureClusterHandler", + "generic_id": "cluster_handler_0x0002", + "endpoint_id": 1, + "cluster": { + "id": 2, + "name": "Device Temperature", + "type": "server" + }, + "id": "1:0x0002", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 3.52 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 242.9 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4c:9e:2b:64-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4c:9e:2b:64:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4c:9e:2b:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000000e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/neuhaus-lighting-group-nlg-remote.json b/tests/data/devices/neuhaus-lighting-group-nlg-remote.json new file mode 100644 index 00000000..30dded54 --- /dev/null +++ b/tests/data/devices/neuhaus-lighting-group-nlg-remote.json @@ -0,0 +1,254 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:90:e3:16:0a", + "nwk": "0xAE2B", + "manufacturer": "Neuhaus Lighting Group", + "model": "NLG-remote", + "friendly_manufacturer": "Neuhaus Lighting Group", + "friendly_model": "NLG-remote", + "name": "Neuhaus Lighting Group NLG-remote", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4151, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:38.981225+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4151, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_SCENE_CONTROLLER", + "id": 2064 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Neuhaus Lighting Group" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "NLG-remote" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:e3:16:0a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:90:e3:16:0a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:e3:16:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:e3:16:0a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:90:e3:16:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:e3:16:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:e3:16:0a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:90:e3:16:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:e3:16:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/nodon-sin-4-rs-20.json b/tests/data/devices/nodon-sin-4-rs-20.json new file mode 100644 index 00000000..340f9c6f --- /dev/null +++ b/tests/data/devices/nodon-sin-4-rs-20.json @@ -0,0 +1,772 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3c:52:ae:10", + "nwk": "0x6B6C", + "manufacturer": "NodOn", + "model": "SIN-4-RS-20", + "friendly_manufacturer": "NodOn", + "friendly_model": "SIN-4-RS-20", + "name": "NodOn SIN-4-RS-20", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4747, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.710550+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4747, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 500, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 500, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "NodOn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SIN-4-RS-20" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0004", + "name": "calibration_rotation_run_time_down", + "zcl_type": "uint16", + "value": 2000 + }, + { + "id": "0x0003", + "name": "calibration_rotation_run_time_up", + "zcl_type": "uint16", + "value": 2000 + }, + { + "id": "0x0002", + "name": "calibration_vertical_run_time_down", + "zcl_type": "uint16", + "value": 2130 + }, + { + "id": "0x0001", + "name": "calibration_vertical_run_time_up", + "zcl_type": "uint16", + "value": 2250 + }, + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 3 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 8 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 8 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 66304 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0003", + "name": "current_position_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_position_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "COMBO_BASIC", + "id": 102 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "blind", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 0, + "current_tilt_position": 100, + "state": "closed", + "is_opening": false, + "is_closing": false, + "is_closed": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Calibration rotation run time down", + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-calibration_rotation_run_time_down", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "calibration_rotation_run_time_down", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 2000 + } + }, + { + "info_object": { + "fallback_name": "Calibration rotation run time up", + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-calibration_rotation_run_time_up", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "calibration_rotation_run_time_up", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 2000 + } + }, + { + "info_object": { + "fallback_name": "Calibration vertical run time down", + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-calibration_vertical_run_time_down", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "calibration_vertical_run_time_down", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 2130 + } + }, + { + "info_object": { + "fallback_name": "Calibration vertical run time up", + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-calibration_vertical_run_time_up", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "calibration_vertical_run_time_up", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65535, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 2250 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-258-window_covering_type", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "WindowCoveringTypeSensor", + "translation_key": "window_covering_type", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Tilt_blind_tilt_and_lift" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-258-inverted", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "WindowCoveringInversionSwitch", + "translation_key": "inverted", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "config_status", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "WindowCoveringInversionSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:52:ae:10-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:3c:52:ae:10:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:52:ae:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00010300", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/ou-rui-bo-cf31218e11c547179c9c9ade6a492799.json b/tests/data/devices/ou-rui-bo-cf31218e11c547179c9c9ade6a492799.json new file mode 100644 index 00000000..cccba29f --- /dev/null +++ b/tests/data/devices/ou-rui-bo-cf31218e11c547179c9c9ade6a492799.json @@ -0,0 +1,370 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5f:2a:3c:30", + "nwk": "0xE8A0", + "manufacturer": "\u6b27\u745e\u535a", + "model": "cf31218e11c547179c9c9ade6a492799", + "friendly_manufacturer": "\u6b27\u745e\u535a", + "friendly_model": "cf31218e11c547179c9c9ade6a492799", + "name": "\u6b27\u745e\u535a cf31218e11c547179c9c9ade6a492799", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.907287+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 0, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "undefined_0x00fe", + "id": 254 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": "v2.2.13_20160907\fDOOR_LOCK_V1" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "\u6b27\u745e\u535a" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "cf31218e11c547179c9c9ade6a492799" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0101", + "endpoint_attribute": "door_lock", + "attributes": [ + { + "id": "0x0000", + "name": "lock_state", + "zcl_type": "enum8", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:2a:3c:30-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:5f:2a:3c:30:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:2a:3c:30", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "lock": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:2a:3c:30-1-257", + "migrate_unique_ids": [], + "platform": "lock", + "class_name": "DoorLock", + "translation_key": "door_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "DoorLockClusterHandler", + "generic_id": "cluster_handler_0x0101", + "endpoint_id": 1, + "cluster": { + "id": 257, + "name": "Door Lock", + "type": "server" + }, + "id": "1:0x0101", + "unique_id": "ab:cd:ef:12:5f:2a:3c:30:1:0x0101", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:2a:3c:30", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "DoorLock", + "available": true, + "is_locked": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:2a:3c:30-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5f:2a:3c:30:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:2a:3c:30", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:2a:3c:30-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5f:2a:3c:30:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5f:2a:3c:30", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5f:2a:3c:30-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:5f:2a:3c:30:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:5f:2a:3c:30", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/schneider-electric-evsckt-outlet-1.json b/tests/data/devices/schneider-electric-evsckt-outlet-1.json new file mode 100644 index 00000000..c13921ae --- /dev/null +++ b/tests/data/devices/schneider-electric-evsckt-outlet-1.json @@ -0,0 +1,878 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:47:77:a4:73", + "nwk": "0x5CE5", + "manufacturer": "Schneider Electric", + "model": "EVSCKT/OUTLET/1", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "EVSCKT/OUTLET/1", + "name": "Schneider Electric EVSCKT/OUTLET/1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.093348+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "6": { + "profile_id": 260, + "device_type": { + "name": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EVSCKT/OUTLET/1" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 144014000 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000000 + }, + { + "id": "0x0204", + "name": "extended_status", + "zcl_type": "map64", + "value": 0 + }, + { + "id": "0x0207", + "name": "iambient_consumption_indicator", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "value": 0 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 75 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0708", + "endpoint_attribute": "smartenergy_device_management", + "attributes": [] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 8 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 233 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc04", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 34210047 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 6, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "6:0x0003", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 6, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "6:0x0006", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 6, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "6:0x0000", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 6, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "6:0x0000", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-1794", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergyMetering", + "translation_key": "instantaneous_demand", + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 6, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 6, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 144.014, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 6, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "6:0x0b04", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 6, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "6:0x0b04", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 233.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 6, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "6:0x0006", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:77:a4:73-6-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 6, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "6:0x0019_client", + "unique_id": "ab:cd:ef:12:47:77:a4:73:6:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:77:a4:73", + "endpoint_id": 6, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x020a00ff", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/schneider-electric-puck-shutter-1.json b/tests/data/devices/schneider-electric-puck-shutter-1.json new file mode 100644 index 00000000..7a0c5086 --- /dev/null +++ b/tests/data/devices/schneider-electric-puck-shutter-1.json @@ -0,0 +1,894 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:81:34:28:65", + "nwk": "0x9634", + "manufacturer": "Schneider Electric", + "model": "PUCK/SHUTTER/1", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "PUCK/SHUTTER/1", + "name": "Schneider Electric PUCK/SHUTTER/1", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.764604+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "5": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "value": 225 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "PUCK/SHUTTER/1" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b''" + } + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "value": "http://www.schneider-electric.com" + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 6 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "002.012.002 R" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "count", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0002", + "name": "current_group", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 3 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 82 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 50 + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 8 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 8 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x011c", + "name": "last_message_lqi", + "zcl_type": "uint8", + "value": 88 + }, + { + "id": "0x011d", + "name": "last_message_rssi", + "zcl_type": "int8", + "value": -78 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 34341631 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0008", + "name": "image_type_id", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4190 + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": "44:e2:f8:ff:fe:8c:78:26" + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 5, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "5:0x0003", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "blind", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 18, + "current_tilt_position": 50, + "state": "open", + "is_opening": false, + "is_closing": false, + "is_closed": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Lift drive down time", + "unique_id": "ab:cd:ef:12:81:34:28:65-5-se_lift_drive_down_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "lift_drive_down_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0.0, + "native_step": 1.0, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Lift drive up time", + "unique_id": "ab:cd:ef:12:81:34:28:65-5-se_lift_drive_up_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "lift_drive_up_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0.0, + "native_step": 1.0, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Tilt open close and step time", + "unique_id": "ab:cd:ef:12:81:34:28:65-5-se_tilt_open_close_and_step_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "tilt_open_close_and_step_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0.0, + "native_step": 1.0, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Tilt position percentage after move to level", + "unique_id": "ab:cd:ef:12:81:34:28:65-5-se_tilt_position_percentage_after_move_to_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "tilt_position_percentage_after_move_to_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 5, + "cluster": { + "id": 0, + "name": "SEBasic", + "type": "server" + }, + "id": "5:0x0000", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 5, + "cluster": { + "id": 0, + "name": "SEBasic", + "type": "server" + }, + "id": "5:0x0000", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-258-window_covering_type", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "WindowCoveringTypeSensor", + "translation_key": "window_covering_type", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Tilt_blind_tilt_and_lift" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-258-inverted", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "WindowCoveringInversionSwitch", + "translation_key": "inverted", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 5, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "5:0x0102", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "attribute_name": "config_status", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "WindowCoveringInversionSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:34:28:65-5-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 5, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "5:0x0019_client", + "unique_id": "ab:cd:ef:12:81:34:28:65:5:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:34:28:65", + "endpoint_id": 5, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x020c02ff", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/schneider-electric-s520619.json b/tests/data/devices/schneider-electric-s520619.json new file mode 100644 index 00000000..db78b6c6 --- /dev/null +++ b/tests/data/devices/schneider-electric-s520619.json @@ -0,0 +1,1242 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "nwk": "0x9A73", + "manufacturer": "Schneider Electric", + "model": "S520619", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "S520619", + "name": "Schneider Electric S520619", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.031739+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "S520619" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1895 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1700 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2200 + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "value": 1600 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xff16", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xff23", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 16790784 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 1875 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "OCCUPANCY_SENSOR", + "id": 263 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "CONSUMPTION_AWARENESS_DEVICE", + "id": 13 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "value": 147 + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "value": 0 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 171 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-4-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 4, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "4:0x0406", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:4:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 4, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": true + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 4.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 18.95, + "outdoor_temperature": null, + "target_temperature": 17.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": 1, + "occupied_cooling_setpoint": 2000, + "occupied_heating_setpoint": 1700, + "pi_heating_demand": 0, + "pi_cooling_demand": 0, + "unoccupied_cooling_setpoint": 2200, + "unoccupied_heating_setpoint": 1600 + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 40.0, + "native_min_value": 4.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": 4.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 4.0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-2-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 2, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "2:0x0402", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:2:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 18.75 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-5-1794", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergyMetering", + "translation_key": "instantaneous_demand", + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 5, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "5:0x0702", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:5:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-5-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 5, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "5:0x0702", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:5:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a2:e6:bb:a6:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:e6:bb:a6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01003500", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/shelly-mini1pm.json b/tests/data/devices/shelly-mini1pm.json new file mode 100644 index 00000000..2786915f --- /dev/null +++ b/tests/data/devices/shelly-mini1pm.json @@ -0,0 +1,938 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "nwk": "0x04B4", + "manufacturer": "Shelly", + "model": "Mini1PM", + "friendly_manufacturer": "Shelly", + "friendly_model": "Mini1PM", + "name": "Shelly Mini1PM", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 5264, + "power_source": "Mains", + "lqi": 153, + "rssi": null, + "last_seen": "2025-06-13T08:09:54.667517+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 5264, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 1613, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 1613, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Shelly" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Mini1PM" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 970439 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 27 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "value": 4996 + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 220 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 23095 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "239": { + "profile_id": 49153, + "device_type": { + "name": "unknown", + "id": 8193 + }, + "in_clusters": [ + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 153 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.970439, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-1794-summation_received", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummationReceived", + "translation_key": "summation_received", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummationReceived", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 2.2, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-2820-ac_frequency", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementFrequency", + "translation_key": "ac_frequency", + "translation_placeholders": null, + "device_class": "frequency", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 49.96, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.01, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 230.95, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:6a:0d:2c:ef:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:6a:0d:2c:ef", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/signify-netherlands-b-v-sml003.json b/tests/data/devices/signify-netherlands-b-v-sml003.json new file mode 100644 index 00000000..0596e196 --- /dev/null +++ b/tests/data/devices/signify-netherlands-b-v-sml003.json @@ -0,0 +1,743 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d5:c9:be:9b", + "nwk": "0x0868", + "manufacturer": "Signify Netherlands B.V.", + "model": "SML003", + "friendly_manufacturer": "Signify Netherlands B.V.", + "friendly_model": "SML003", + "name": "Signify Netherlands B.V. SML003", + "quirk_applied": true, + "quirk_class": "zhaquirks.philips.motion.SignifyMotion", + "quirk_id": null, + "manufacturer_code": 4107, + "power_source": "Battery or Unknown", + "lqi": 61, + "rssi": null, + "last_seen": "2025-10-16T11:42:09.835709+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4107, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 128, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 128, + "descriptor_capability_field": 0 + }, + "endpoints": { + "2": { + "profile_id": 260, + "device_type": { + "name": "OCCUPANCY_SENSOR", + "id": 263 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Signify Netherlands B.V." + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SML003" + }, + { + "id": "0x0033", + "name": "trigger_indicator", + "zcl_type": "bool", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 139 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2081 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "philips_occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0030", + "name": "sensitivity", + "zcl_type": "uint8", + "value": 3 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 33568006 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "Signify Netherlands B.V.", + "SML003" + ], + [ + "Signify Netherlands B.V.", + "SML004" + ] + ], + "endpoints": { + "2": { + "profile_id": "0x0104", + "device_type": "0x0107", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0400", + "0x0402", + "0x0406" + ], + "output_clusters": [ + "0x0000", + "0x0003", + "0x0006", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "HueOccupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 2, + "cluster": { + "id": 1030, + "name": "PhilipsOccupancySensing", + "type": "server" + }, + "id": "2:0x0406", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "HueOccupancy", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 2, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "2:0x0003", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-1030-motion_sensitivity", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "HueV2MotionSensitivity", + "translation_key": "motion_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 2, + "cluster": { + "id": 1030, + "name": "PhilipsOccupancySensing", + "type": "server" + }, + "id": "2:0x0406", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "enum": "HueV2MotionSensitivities", + "options": [ + "Lowest", + "Low", + "Medium", + "High", + "Highest" + ] + }, + "state": { + "class_name": "HueV2MotionSensitivity", + "available": true, + "state": "High" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 2, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "2:0x0000", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 61 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 2, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "2:0x0000", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 2, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "2:0x0001", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 69.5, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 2, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "2:0x0400", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 2, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "2:0x0402", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 20.81 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-0-trigger_indicator", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "HueMotionTriggerIndicatorSwitch", + "translation_key": "trigger_indicator", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 2, + "cluster": { + "id": 0, + "name": "BasicCluster", + "type": "server" + }, + "id": "2:0x0000", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "trigger_indicator", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "HueMotionTriggerIndicatorSwitch", + "available": true, + "state": true, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:c9:be:9b-2-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 2, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "2:0x0019_client", + "unique_id": "ab:cd:ef:12:d5:c9:be:9b:2:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:c9:be:9b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x02003506", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-basiczbr3.json b/tests/data/devices/sonoff-basiczbr3.json new file mode 100644 index 00000000..2bbdac24 --- /dev/null +++ b/tests/data/devices/sonoff-basiczbr3.json @@ -0,0 +1,315 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:93:ca:86:ba", + "nwk": "0x1CDA", + "manufacturer": "SONOFF", + "model": "BASICZBR3", + "friendly_manufacturer": "SONOFF", + "friendly_model": "BASICZBR3", + "name": "SONOFF BASICZBR3", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": 172, + "rssi": -68, + "last_seen": "2025-07-04T14:13:04.242575+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 0, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "BASICZBR3" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:ca:86:ba-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:93:ca:86:ba:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:ca:86:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:ca:86:ba-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:93:ca:86:ba:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:93:ca:86:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:ca:86:ba-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:ca:86:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:ca:86:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 172 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:ca:86:ba-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:ca:86:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:ca:86:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -68 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-dongle-e-r.json b/tests/data/devices/sonoff-dongle-e-r.json new file mode 100644 index 00000000..14e297bc --- /dev/null +++ b/tests/data/devices/sonoff-dongle-e-r.json @@ -0,0 +1,893 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:33:57:93:05", + "nwk": "0xCD22", + "manufacturer": "SONOFF", + "model": "DONGLE-E_R", + "friendly_manufacturer": "SONOFF", + "friendly_model": "DONGLE-E_R", + "name": "SONOFF DONGLE-E_R", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 212, + "rssi": -47, + "last_seen": "2025-10-10T12:12:17.282357+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "DONGLE-E_R" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 51 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 51 + } + ] + } + ], + "out_clusters": [] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 51 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 51 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 65279 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 17476 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 24939 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 24701 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 17476 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 51, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 2, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "2:0x0300", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 65279 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 51, + "xy_color": null, + "color_temp": 17476, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 51 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-2-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 2, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "2:0x0300", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 2, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65279, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 17476 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-2-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 2, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 51 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-2-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:33:57:93:05:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 2, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 212 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:57:93:05-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:33:57:93:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:57:93:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -47 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-mini-zbrbs.json b/tests/data/devices/sonoff-mini-zbrbs.json new file mode 100644 index 00000000..b8555c2d --- /dev/null +++ b/tests/data/devices/sonoff-mini-zbrbs.json @@ -0,0 +1,568 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a2:24:57:22", + "nwk": "0x3839", + "manufacturer": "SONOFF", + "model": "MINI-ZBRBS", + "friendly_manufacturer": "SONOFF", + "friendly_model": "MINI-ZBRBS", + "name": "SONOFF MINI-ZBRBS", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-10-23T14:59:36.174366+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 2552, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 2552, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "MINI-ZBRBS" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [ + { + "id": "0x0000", + "name": "switch_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0015", + "name": "acceleration_time_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 11 + }, + { + "id": "0x0003", + "name": "current_position_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0005", + "name": "number_of_actuations_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0x0116", + "name": "aps_decrypt_failures", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4101 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "shade", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 100, + "current_tilt_position": null, + "state": "open", + "is_opening": false, + "is_closing": false, + "is_closed": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-258-window_covering_type", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "WindowCoveringTypeSensor", + "translation_key": "window_covering_type", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Rollershade" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-258-inverted", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "WindowCoveringInversionSwitch", + "translation_key": "inverted", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "config_status", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "WindowCoveringInversionSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:24:57:22-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a2:24:57:22:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:24:57:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001005", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-s26r2zb.json b/tests/data/devices/sonoff-s26r2zb.json new file mode 100644 index 00000000..b811f0fb --- /dev/null +++ b/tests/data/devices/sonoff-s26r2zb.json @@ -0,0 +1,390 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b4:e4:bd:45", + "nwk": "0xFF60", + "manufacturer": "SONOFF", + "model": "S26R2ZB", + "friendly_manufacturer": "SONOFF", + "friendly_model": "S26R2ZB", + "name": "SONOFF S26R2ZB", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 128, + "rssi": -79, + "last_seen": "2025-08-08T07:45:08.240250+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "S26R2ZB" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 8192 + } + ] + } + ] + }, + "13": { + "profile_id": 49246, + "device_type": { + "name": "undefined_0xe15e", + "id": 57694 + }, + "in_clusters": [ + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:e4:bd:45-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b4:e4:bd:45:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:e4:bd:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:e4:bd:45-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b4:e4:bd:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:e4:bd:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 128 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:e4:bd:45-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b4:e4:bd:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:e4:bd:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -79 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:e4:bd:45-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b4:e4:bd:45:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b4:e4:bd:45", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:e4:bd:45-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b4:e4:bd:45:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:e4:bd:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00002000", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-s60zbtpg.json b/tests/data/devices/sonoff-s60zbtpg.json new file mode 100644 index 00000000..a6f6af3e --- /dev/null +++ b/tests/data/devices/sonoff-s60zbtpg.json @@ -0,0 +1,958 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0b:76:b6:2c", + "nwk": "0xD301", + "manufacturer": "SONOFF", + "model": "S60ZBTPG", + "friendly_manufacturer": "SONOFF", + "friendly_model": "S60ZBTPG", + "name": "SONOFF S60ZBTPG", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 54, + "rssi": null, + "last_seen": "2025-09-21T16:44:23.406331+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 404, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 404, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "S60ZBTPG" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 70 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 11 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 8 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 23903 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4098 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.07, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 11.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.08, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 239.03, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:76:b6:2c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:0b:76:b6:2c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:76:b6:2c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001002", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-snzb-05p.json b/tests/data/devices/sonoff-snzb-05p.json new file mode 100644 index 00000000..8dc0729d --- /dev/null +++ b/tests/data/devices/sonoff-snzb-05p.json @@ -0,0 +1,463 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:94:50:f5:8b", + "nwk": "0xBA7E", + "manufacturer": "SONOFF", + "model": "SNZB-05P", + "friendly_manufacturer": "SONOFF", + "friendly_model": "SNZB-05P", + "name": "SONOFF SNZB-05P", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 212, + "rssi": -58, + "last_seen": "2025-07-26T17:35:42.143137+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SNZB-05P" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 31 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0003", + "name": "fast_poll_timeout", + "zcl_type": "uint16", + "value": 120 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 70, + 184, + 161, + 28, + 0, + 75, + 18, + 0 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 42 + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4098 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "moisture", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 212 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -58 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:50:f5:8b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:94:50:f5:8b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:50:f5:8b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001002", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-snzb-06p.json b/tests/data/devices/sonoff-snzb-06p.json new file mode 100644 index 00000000..ee251b89 --- /dev/null +++ b/tests/data/devices/sonoff-snzb-06p.json @@ -0,0 +1,537 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:dd:23:ca:15", + "nwk": "0xB334", + "manufacturer": "SONOFF", + "model": "SNZB-06P", + "friendly_manufacturer": "SONOFF", + "friendly_model": "SNZB-06P", + "name": "SONOFF SNZB-06P", + "quirk_applied": true, + "quirk_class": "zhaquirks.sonoff.snzb06p.SonoffPresenceSenorSNZB06P", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 240, + "rssi": -51, + "last_seen": "2025-09-18T10:27:28.172559+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "OCCUPANCY_SENSOR", + "id": 263 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SNZB-06P" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0020", + "name": "ultrasonic_o_to_u_delay", + "zcl_type": "uint16", + "value": 15 + }, + { + "id": "0x0022", + "name": "ultrasonic_u_to_o_threshold", + "zcl_type": "uint8", + "value": 1 + } + ] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": "sonoff_manufacturer", + "attributes": [ + { + "id": "0x2001", + "name": "last_illumination_state", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4102 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "SONOFF", + "SNZB-06P" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0107", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0406", + "0x0500", + "0xfc11", + "0xfc57" + ], + "output_clusters": [ + "0x0003", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-1030-presence_detection_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "SonoffPresenceSenorTimeout", + "translation_key": "presence_detection_timeout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 60, + "native_min_value": 15, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "SonoffPresenceSenorTimeout", + "available": true, + "state": 15 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-1030-detection_sensitivity", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "SonoffPresenceDetectionSensitivity", + "translation_key": "detection_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SonoffPresenceDetectionSensitivityEnum", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "SonoffPresenceDetectionSensitivity", + "available": true, + "state": "Low" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 240 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -51 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-64529-last_illumination", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SonoffPresenceSenorIlluminationStatus", + "translation_key": "last_illumination_state", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "SonoffFC11Cluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SonoffPresenceSenorIlluminationStatus", + "available": true, + "state": "Light" + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dd:23:ca:15-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:dd:23:ca:15:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dd:23:ca:15", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001006", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-trvzb.json b/tests/data/devices/sonoff-trvzb.json new file mode 100644 index 00000000..e4e4aab5 --- /dev/null +++ b/tests/data/devices/sonoff-trvzb.json @@ -0,0 +1,1310 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4d:04:9a:8f", + "nwk": "0x91D0", + "manufacturer": "SONOFF", + "model": "TRVZB", + "friendly_manufacturer": "SONOFF", + "friendly_model": "TRVZB", + "name": "SONOFF TRVZB", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.906814+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TRVZB" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1860 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 10 + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3500 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1950 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": null, + "attributes": [ + { + "id": "0x0000", + "name": "child_lock", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x6002", + "name": "frost_protection_temperature", + "zcl_type": "int16", + "value": 1000 + }, + { + "id": "0x6000", + "name": "open_window", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x600c", + "name": "valve_closing_degree", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x6007", + "name": "valve_motor_running_voltage", + "zcl_type": "uint16", + "value": 1414 + }, + { + "id": "0x600b", + "name": "valve_opening_degree", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4609 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 35.0, + "min_temp": 4.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 18.6, + "outdoor_temperature": null, + "target_temperature": 19.5, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "heating", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": 1, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 1950, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-513-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "SonoffThermostatLocalTempCalibration", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 12.7, + "native_min_value": -12.8, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "SonoffThermostatLocalTempCalibration", + "available": true, + "state": 1.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": 4.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 35.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": 4.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 4.0 + } + }, + { + "info_object": { + "fallback_name": "External temperature sensor value", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-external_temperature_sensor_value", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "external_temperature_sensor_value", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 99.9, + "native_min_value": 0.0, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Frost protection temperature", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-frost_protection_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "frost_protection_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35.0, + "native_min_value": 4.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 10.0 + } + }, + { + "info_object": { + "fallback_name": "Temperature control accuracy", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-temperature_control_accuracy", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "temperature_control_accuracy", + "translation_placeholders": null, + "device_class": "temperature", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": -0.2, + "native_min_value": -1.0, + "native_step": 0.2, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve closing degree", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-valve_closing_degree", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "valve_closing_degree", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0.0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve opening degree", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-valve_opening_degree", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "valve_opening_degree", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0.0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "heating" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "External temperature sensor", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-external_temperature_sensor_enable", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "external_temperature_sensor", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "external_temperature_sensor_enable", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-open_window", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "open_window", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "CustomSonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "open_window", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4d:04:9a:8f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4d:04:9a:8f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4d:04:9a:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001201", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-zbminil2.json b/tests/data/devices/sonoff-zbminil2.json new file mode 100644 index 00000000..3fe62f7f --- /dev/null +++ b/tests/data/devices/sonoff-zbminil2.json @@ -0,0 +1,484 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d4:86:60:40", + "nwk": "0x1FC6", + "manufacturer": "SONOFF", + "model": "ZBMINIL2", + "friendly_manufacturer": "SONOFF", + "friendly_model": "ZBMINIL2", + "name": "SONOFF ZBMINIL2", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 168, + "rssi": -58, + "last_seen": "2025-09-10T14:45:59.109004+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 1024, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 1024, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_OUTPUT", + "id": 2 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZBMINIL2" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4110 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Toggle" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 168 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -58 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:86:60:40-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d4:86:60:40:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:86:60:40", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000100e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sonoff-zbminir2.json b/tests/data/devices/sonoff-zbminir2.json new file mode 100644 index 00000000..36b5a39a --- /dev/null +++ b/tests/data/devices/sonoff-zbminir2.json @@ -0,0 +1,718 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f5:dc:76:8d", + "nwk": "0x553F", + "manufacturer": "SONOFF", + "model": "ZBMINIR2", + "friendly_manufacturer": "SONOFF", + "friendly_model": "ZBMINIR2", + "name": "SONOFF ZBMINIR2", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Mains", + "lqi": 43, + "rssi": null, + "last_seen": "2025-10-02T20:34:01.277948+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4742, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 255, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 255, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_OUTPUT", + "id": 2 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20241202" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "SONOFF" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZBMINIR2" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc11", + "endpoint_attribute": null, + "attributes": [ + { + "id": "0x0017", + "name": "detach_relay", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0016", + "name": "external_trigger_mode", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0012", + "name": "turbo_mode", + "zcl_type": "int16", + "value": 9 + } + ] + }, + { + "cluster_id": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x4000", + "name": "global_scene_control", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4100 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + }, + { + "info_object": { + "fallback_name": "External trigger mode", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-external_trigger_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "external_trigger_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "SonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SonoffExternalSwitchTriggerType", + "options": [ + "Edge trigger", + "Pulse trigger", + "Normally off follow trigger", + "Normally on follow trigger" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Edge trigger" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 43 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": "Detach relay", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-detach_relay", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "detach_relay", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "SonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "detach_relay", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Turbo mode", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-turbo_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "turbo_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SonoffPresenceSenorClusterHandler", + "generic_id": "cluster_handler_0xfc11", + "endpoint_id": 1, + "cluster": { + "id": 64529, + "name": "SonoffCluster", + "type": "server" + }, + "id": "1:0xfc11", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0xfc11", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "turbo_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 9, + "on_value": 20 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:dc:76:8d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f5:dc:76:8d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:dc:76:8d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001004", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/sunricher-on-off-2ch.json b/tests/data/devices/sunricher-on-off-2ch.json new file mode 100644 index 00000000..d853c986 --- /dev/null +++ b/tests/data/devices/sunricher-on-off-2ch.json @@ -0,0 +1,1247 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:98:6b:31:c6", + "nwk": "0x2ACF", + "manufacturer": "Sunricher", + "model": "ON/OFF(2CH)", + "friendly_manufacturer": "Sunricher", + "friendly_model": "ON/OFF(2CH)", + "name": "Sunricher ON/OFF(2CH)", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": 164, + "rssi": -59, + "last_seen": "2025-08-02T18:40:24.068172+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4107, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Sunricher" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ON/OFF(2CH)" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + } + ], + "out_clusters": [] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "11": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 13195425 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 3600000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 51 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0803", + "name": "ac_active_power_overload", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 65545 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "value": 10000 + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "value": 1 + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 2292 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 4 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x000a", + "name": "image_stamp", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": "0c:ef:f6:ff:fe:ce:47:0d" + }, + { + "id": "0x000c", + "name": "upgrade_timeout_policy", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "COMBO_BASIC", + "id": 102 + }, + "in_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-2-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 2, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 164 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -59 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 11, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "11:0x0702", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 3.665395833333333, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 11, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "11:0x0b04", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 11, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "11:0x0b04", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 11, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "11:0x0b04", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 229.2, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-2820-total_active_power", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementTotalActivePower", + "translation_key": "total_active_power", + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 11, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "11:0x0b04", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementTotalActivePower", + "available": true, + "state": 0.0, + "measurement_type": "ACTIVE_MEASUREMENT, PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:6b:31:c6-11-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 11, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "11:0x0019_client", + "unique_id": "ab:cd:ef:12:98:6b:31:c6:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:6b:31:c6", + "endpoint_id": 11, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000004", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/texas-instruments-cc2652.json b/tests/data/devices/texas-instruments-cc2652.json new file mode 100644 index 00000000..d13922f6 --- /dev/null +++ b/tests/data/devices/texas-instruments-cc2652.json @@ -0,0 +1,125 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6a:30:e1:65", + "nwk": "0xFF51", + "manufacturer": "Texas Instruments", + "model": "CC2652", + "friendly_manufacturer": "Texas Instruments", + "friendly_model": "CC2652", + "name": "Texas Instruments CC2652", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.379814+00:00", + "available": true, + "device_type": "Coordinator", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Coordinator", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 143, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 11265, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_CONTROL", + "id": 1024 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Texas Instruments" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Coordinator" + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0501", + "endpoint_attribute": "ias_ace", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [] + }, + { + "cluster_id": "0x0502", + "endpoint_attribute": "ias_wd", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 49246, + "device_type": { + "name": "CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": {}, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tyzb01-1xktopx6-ts0041a.json b/tests/data/devices/tyzb01-1xktopx6-ts0041a.json new file mode 100644 index 00000000..ca79bddf --- /dev/null +++ b/tests/data/devices/tyzb01-1xktopx6-ts0041a.json @@ -0,0 +1,382 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:76:87:d5", + "nwk": "0xD177", + "manufacturer": "_TYZB01_1xktopx6", + "model": "TS0041A", + "friendly_manufacturer": "_TYZB01_1xktopx6", + "friendly_model": "TS0041A", + "name": "_TYZB01_1xktopx6 TS0041A", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0041.TuyaSmartRemote0041_var04", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 204, + "rssi": -60, + "last_seen": "2025-08-12T22:24:52.592717+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TYZB01_1xktopx6" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0041A" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "TS004X_cluster", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "original_signature": { + "model": "TS0041A", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0000", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0006" + ], + "output_clusters": [ + "0x0006", + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:76:87:d5-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8d:76:87:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:76:87:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 204 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:76:87:d5-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8d:76:87:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:76:87:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:76:87:d5-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:8d:76:87:d5:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:76:87:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:76:87:d5-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:8d:76:87:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8d:76:87:d5", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:76:87:d5-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:8d:76:87:d5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:76:87:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-09gto2zn-ts0013.json b/tests/data/devices/tz3000-09gto2zn-ts0013.json new file mode 100644 index 00000000..a08fb1a7 --- /dev/null +++ b/tests/data/devices/tz3000-09gto2zn-ts0013.json @@ -0,0 +1,616 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:34:aa:29:f4", + "nwk": "0x8678", + "manufacturer": "_TZ3000_09gto2zn", + "model": "TS0013", + "friendly_manufacturer": "_TZ3000_09gto2zn", + "friendly_model": "TS0013", + "name": "_TZ3000_09gto2zn TS0013", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.561620+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_09gto2zn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0013" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-3", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:aa:29:f4-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:34:aa:29:f4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:aa:29:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-1dd0d5yi-ts130f.json b/tests/data/devices/tz3000-1dd0d5yi-ts130f.json new file mode 100644 index 00000000..595db924 --- /dev/null +++ b/tests/data/devices/tz3000-1dd0d5yi-ts130f.json @@ -0,0 +1,612 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:15:80:89:33", + "nwk": "0xB0E7", + "manufacturer": "_TZ3000_1dd0d5yi", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_1dd0d5yi", + "friendly_model": "TS130F", + "name": "_TZ3000_1dd0d5yi TS130F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130FTI2", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 255, + "rssi": -73, + "last_seen": "2025-07-08T17:00:04.111016+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 71 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_1dd0d5yi" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0015", + "name": "acceleration_time_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xf001", + "name": "calibration", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xf003", + "name": "calibration_time", + "zcl_type": "uint16", + "value": 300 + }, + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "current_position_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0010", + "name": "installed_open_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "installed_open_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x8000", + "name": "motor_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0xf002", + "name": "motor_reversal", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0005", + "name": "number_of_actuations_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xf000", + "name": "tuya_moving_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0002", + "name": "time_zone", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 71 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000a", + "name": "image_stamp", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ] + } + }, + "original_signature": { + "model": "TS130F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0203", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x0006", + "0x0102" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:80:89:33-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 1, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "1:0x0102", + "unique_id": "ab:cd:ef:12:15:80:89:33:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:15:80:89:33", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 0, + "current_tilt_position": null, + "state": "closed", + "is_opening": false, + "is_closing": false, + "is_closed": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:80:89:33-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:80:89:33:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:80:89:33", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:80:89:33-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:80:89:33:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:80:89:33", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -73 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:80:89:33-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:15:80:89:33:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:15:80:89:33", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:80:89:33-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:15:80:89:33:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:80:89:33", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000047", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-1o6x1bl0-ts0201.json b/tests/data/devices/tz3000-1o6x1bl0-ts0201.json new file mode 100644 index 00000000..b552e336 --- /dev/null +++ b/tests/data/devices/tz3000-1o6x1bl0-ts0201.json @@ -0,0 +1,434 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d0:74:74:bf", + "nwk": "0x6055", + "manufacturer": "_TZ3000_1o6x1bl0", + "model": "TS0201", + "friendly_manufacturer": "_TZ3000_1o6x1bl0", + "friendly_model": "TS0201", + "name": "_TZ3000_1o6x1bl0 TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 185, + "rssi": null, + "last_seen": "2025-10-11T14:21:48.020771+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_1o6x1bl0" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 21 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2228 + } + ] + }, + { + "cluster_id": "0xe002", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 65 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 185 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 2.1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.28 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d0:74:74:bf-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d0:74:74:bf:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d0:74:74:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000041", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-2xlvlnez-ts011f.json b/tests/data/devices/tz3000-2xlvlnez-ts011f.json new file mode 100644 index 00000000..c0edcf90 --- /dev/null +++ b/tests/data/devices/tz3000-2xlvlnez-ts011f.json @@ -0,0 +1,909 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7b:03:ef:df", + "nwk": "0x3503", + "manufacturer": "_TZ3000_2xlvlnez", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_2xlvlnez", + "friendly_model": "TS011F", + "name": "_TZ3000_2xlvlnez TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-08-19T14:53:03.677245+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_2xlvlnez" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledSmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": null + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 0.0, + "zcl_unit_of_measurement": null + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:03:ef:df-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:7b:03:ef:df:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:7b:03:ef:df", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-3ias4w4o-ts011f.json b/tests/data/devices/tz3000-3ias4w4o-ts011f.json new file mode 100644 index 00000000..aa609d17 --- /dev/null +++ b/tests/data/devices/tz3000-3ias4w4o-ts011f.json @@ -0,0 +1,914 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:17:45:af:eb", + "nwk": "0x1614", + "manufacturer": "_TZ3000_3ias4w4o", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_3ias4w4o", + "friendly_model": "TS011F", + "name": "_TZ3000_3ias4w4o TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.568594+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_3ias4w4o" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 29579 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 2231 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 9587 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 233 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledSmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 295.79, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 2231.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 9.587 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 233.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:45:af:eb-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:17:45:af:eb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:45:af:eb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-5ity3zyu-ts0121.json b/tests/data/devices/tz3000-5ity3zyu-ts0121.json new file mode 100644 index 00000000..378913a7 --- /dev/null +++ b/tests/data/devices/tz3000-5ity3zyu-ts0121.json @@ -0,0 +1,789 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:82:95:69", + "nwk": "0x531B", + "manufacturer": "_TZ3000_5ity3zyu", + "model": "TS0121", + "friendly_manufacturer": "_TZ3000_5ity3zyu", + "friendly_model": "TS0121", + "name": "_TZ3000_5ity3zyu TS0121", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.336702+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_5ity3zyu" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0121" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 233 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 233.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:82:95:69-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b1:82:95:69:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:82:95:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-8nkb7mof-ts0121.json b/tests/data/devices/tz3000-8nkb7mof-ts0121.json new file mode 100644 index 00000000..dcd0f08f --- /dev/null +++ b/tests/data/devices/tz3000-8nkb7mof-ts0121.json @@ -0,0 +1,1005 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2d:82:f3:92", + "nwk": "0x20AA", + "manufacturer": "_TZ3000_8nkb7mof", + "model": "TS0121", + "friendly_manufacturer": "_TZ3000_8nkb7mof", + "friendly_model": "TS0121", + "name": "_TZ3000_8nkb7mof TS0121", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0121_plug.TS0121B", + "quirk_id": "tuya.plug_on_off_attributes", + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.067347+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_8nkb7mof" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0121" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x8000", + "name": "child_lock", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 119695 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 152 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 709 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 249 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 66 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "model": "TS0121", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0702", + "0x0b04", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-6-backlight_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaBacklightModeSelectEntity", + "translation_key": "backlight_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBacklightMode", + "options": [ + "Off", + "LightWhenOn", + "LightWhenOff" + ] + }, + "state": { + "class_name": "TuyaBacklightModeSelectEntity", + "available": true, + "state": "LightWhenOn" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-6-power_on_state", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaPowerOnStateSelectEntity", + "translation_key": "power_on_state", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPowerOnState", + "options": [ + "Off", + "On", + "LastState" + ] + }, + "state": { + "class_name": "TuyaPowerOnStateSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "TuyaZBMeteringCluster", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 1196.95, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 152.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.709 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 249.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "TuyaChildLockSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "TuyaChildLockSwitch", + "available": true, + "state": true, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:82:f3:92-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:2d:82:f3:92:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:82:f3:92", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000042", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-gbm10jnj-ts0043.json b/tests/data/devices/tz3000-gbm10jnj-ts0043.json new file mode 100644 index 00000000..dd9260c7 --- /dev/null +++ b/tests/data/devices/tz3000-gbm10jnj-ts0043.json @@ -0,0 +1,638 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f1:51:0b:5a", + "nwk": "0x3F05", + "manufacturer": "_TZ3000_gbm10jnj", + "model": "TS0043", + "friendly_manufacturer": "_TZ3000_gbm10jnj", + "friendly_model": "TS0043", + "name": "_TZ3000_gbm10jnj TS0043", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.497500+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 66 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_gbm10jnj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0043" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 156 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 66 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 156 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 156 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 78.0, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-2-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 2, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "2:0x0001", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 78.0, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-3-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 3, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "3:0x0001", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:3:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 3, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 78.0, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-3-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:51:0b:5a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f1:51:0b:5a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:51:0b:5a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000042", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-gjpgagal-ts0049.json b/tests/data/devices/tz3000-gjpgagal-ts0049.json new file mode 100644 index 00000000..614a3cef --- /dev/null +++ b/tests/data/devices/tz3000-gjpgagal-ts0049.json @@ -0,0 +1,451 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:eb:a9:5b:37", + "nwk": "0xC30D", + "manufacturer": "_TZ3000_gjpgagal", + "model": "TS0049", + "friendly_manufacturer": "_TZ3000_gjpgagal", + "friendly_model": "TS0049", + "name": "_TZ3000_gjpgagal TS0049", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.910685+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_gjpgagal" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0049" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 73 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:a9:5b:37-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:eb:a9:5b:37:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:a9:5b:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000049", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-gwkzibhs-ts004f.json b/tests/data/devices/tz3000-gwkzibhs-ts004f.json new file mode 100644 index 00000000..68b7152c --- /dev/null +++ b/tests/data/devices/tz3000-gwkzibhs-ts004f.json @@ -0,0 +1,494 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e5:79:a6:00", + "nwk": "0x4108", + "manufacturer": "_TZ3000_gwkzibhs", + "model": "TS004F", + "friendly_manufacturer": "_TZ3000_gwkzibhs", + "friendly_model": "TS004F", + "name": "_TZ3000_gwkzibhs TS004F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts004f.TuyaSmartRemote004FROK", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 182, + "rssi": null, + "last_seen": "2025-08-31T18:03:30.560855+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 147 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_gwkzibhs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS004F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "TS004X_cluster", + "attributes": [ + { + "id": "0x8004", + "name": "switch_mode", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZ3000_4fjiwweb", + "TS004F" + ], + [ + "_TZ3000_uri7ongn", + "TS004F" + ], + [ + "_TZ3000_ixla93vd", + "TS004F" + ], + [ + "_TZ3000_qja6nq5z", + "TS004F" + ], + [ + "_TZ3000_csflgqj2", + "TS004F" + ], + [ + "_TZ3000_abrsvsou", + "TS004F" + ], + [ + "_TZ3000_gwkzibhs", + "TS004F" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0104", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0004", + "0x0006", + "0x1000" + ], + "output_clusters": [ + "0x0019", + "0x000a", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x1000" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:79:a6:00-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e5:79:a6:00:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:79:a6:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:79:a6:00-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e5:79:a6:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:79:a6:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 182 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:79:a6:00-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e5:79:a6:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:79:a6:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:79:a6:00-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:e5:79:a6:00:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:e5:79:a6:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:79:a6:00-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e5:79:a6:00:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:79:a6:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-hafsqare-ts0011.json b/tests/data/devices/tz3000-hafsqare-ts0011.json new file mode 100644 index 00000000..e8bd4548 --- /dev/null +++ b/tests/data/devices/tz3000-hafsqare-ts0011.json @@ -0,0 +1,385 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bd:23:09:5e", + "nwk": "0xDAA8", + "manufacturer": "_TZ3000_hafsqare", + "model": "TS0011", + "friendly_manufacturer": "_TZ3000_hafsqare", + "friendly_model": "TS0011", + "name": "_TZ3000_hafsqare TS0011", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.351005+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT_SWITCH", + "id": 259 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_hafsqare" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0011" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:23:09:5e-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:bd:23:09:5e:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:23:09:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:23:09:5e-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bd:23:09:5e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:23:09:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:23:09:5e-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bd:23:09:5e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:23:09:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:23:09:5e-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:bd:23:09:5e:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:bd:23:09:5e", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:23:09:5e-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:bd:23:09:5e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:23:09:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-idhkkbqj-ts0012.json b/tests/data/devices/tz3000-idhkkbqj-ts0012.json new file mode 100644 index 00000000..45e82fd6 --- /dev/null +++ b/tests/data/devices/tz3000-idhkkbqj-ts0012.json @@ -0,0 +1,513 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "nwk": "0x6A19", + "manufacturer": "_TZ3000_idhkkbqj", + "model": "TS0012", + "friendly_manufacturer": "_TZ3000_idhkkbqj", + "friendly_model": "TS0012", + "name": "_TZ3000_idhkkbqj TS0012", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts001x.TuyaDoubleNoNeutralSwitch", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 109, + "rssi": null, + "last_seen": "2025-10-22T05:47:46.595520+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 65 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_idhkkbqj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0012" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 65 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": { + "model": "TS0012", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x0006" + ], + "output_clusters": [ + "0x0019", + "0x000a" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006" + ], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 109 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b1:1b:a9:d3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:1b:a9:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000041", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-mugyhz0q-ts0207.json b/tests/data/devices/tz3000-mugyhz0q-ts0207.json new file mode 100644 index 00000000..9b4e88c1 --- /dev/null +++ b/tests/data/devices/tz3000-mugyhz0q-ts0207.json @@ -0,0 +1,446 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:22:d4:c0:9f", + "nwk": "0x8930", + "manufacturer": "_TZ3000_mugyhz0q", + "model": "TS0207", + "friendly_manufacturer": "_TZ3000_mugyhz0q", + "friendly_model": "TS0207", + "name": "_TZ3000_mugyhz0q TS0207", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.492498+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_mugyhz0q" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0207" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 206, + 199, + 239, + 254, + 255, + 219, + 180, + 132 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 42 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 65 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "moisture", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:d4:c0:9f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:22:d4:c0:9f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:d4:c0:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000041", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-o1jzcxou-ts011f.json b/tests/data/devices/tz3000-o1jzcxou-ts011f.json new file mode 100644 index 00000000..4e3be4e6 --- /dev/null +++ b/tests/data/devices/tz3000-o1jzcxou-ts011f.json @@ -0,0 +1,430 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8f:94:54:69", + "nwk": "0x6D2B", + "manufacturer": "_TZ3000_o1jzcxou", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_o1jzcxou", + "friendly_model": "TS011F", + "name": "_TZ3000_o1jzcxou TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_v7", + "quirk_id": "tuya.plug_on_off_attributes", + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 204, + "rssi": -49, + "last_seen": "2025-10-27T16:46:59.940659+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 67 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_o1jzcxou" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 67 + } + ] + } + ] + } + }, + "original_signature": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:94:54:69-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:8f:94:54:69:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:94:54:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:94:54:69-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8f:94:54:69:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:94:54:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 204 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:94:54:69-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8f:94:54:69:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:94:54:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -49 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:94:54:69-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:8f:94:54:69:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8f:94:54:69", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:94:54:69-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:8f:94:54:69:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:94:54:69", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000043", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-o4mkahkc-ts0202.json b/tests/data/devices/tz3000-o4mkahkc-ts0202.json new file mode 100644 index 00000000..97011354 --- /dev/null +++ b/tests/data/devices/tz3000-o4mkahkc-ts0202.json @@ -0,0 +1,505 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:33:39:10:3f", + "nwk": "0xE80A", + "manufacturer": "_TZ3000_o4mkahkc", + "model": "TS0202", + "friendly_manufacturer": "_TZ3000_o4mkahkc", + "friendly_model": "TS0202", + "name": "_TZ3000_o4mkahkc TS0202", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.562691+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 29 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 20, + 89, + 233, + 11, + 0, + 75, + 18, + 0 + ] + }, + { + "id": "0x0013", + "name": "current_zone_sensitivity_level", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 70 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 2.9 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:39:10:3f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:33:39:10:3f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:39:10:3f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000046", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-rbl8c85w-ts0012.json b/tests/data/devices/tz3000-rbl8c85w-ts0012.json new file mode 100644 index 00000000..6ab78dd2 --- /dev/null +++ b/tests/data/devices/tz3000-rbl8c85w-ts0012.json @@ -0,0 +1,518 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ea:31:66:45", + "nwk": "0xC257", + "manufacturer": "_TZ3000_rbl8c85w", + "model": "TS0012", + "friendly_manufacturer": "_TZ3000_rbl8c85w", + "friendly_model": "TS0012", + "name": "_TZ3000_rbl8c85w TS0012", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts001x.Tuya_Double_Var06", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 47, + "rssi": null, + "last_seen": "2025-06-03T10:08:29.848319+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_rbl8c85w" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0012" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": { + "model": "TS0012", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006" + ], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:ea:31:66:45:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ea:31:66:45:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:ea:31:66:45:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ea:31:66:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 47 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ea:31:66:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:31:66:45-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ea:31:66:45:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:31:66:45", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-sgb0xhwn-ts011f.json b/tests/data/devices/tz3000-sgb0xhwn-ts011f.json new file mode 100644 index 00000000..ad36a0bb --- /dev/null +++ b/tests/data/devices/tz3000-sgb0xhwn-ts011f.json @@ -0,0 +1,1233 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d4:a5:92:4b", + "nwk": "0x21D6", + "manufacturer": "_TZ3000_sgb0xhwn", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_sgb0xhwn", + "friendly_model": "TS011F", + "name": "_TZ3000_sgb0xhwn TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_2AC_var05", + "quirk_id": "tuya.plug_on_off_attributes", + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 208, + "rssi": -48, + "last_seen": "2025-09-01T13:58:24.757478+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_sgb0xhwn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x8000", + "name": "child_lock", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_PLUG_IN_UNIT", + "id": 266 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x8000", + "name": "child_lock", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0702", + "0x0b04", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-6-backlight_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaBacklightModeSelectEntity", + "translation_key": "backlight_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBacklightMode", + "options": [ + "Off", + "LightWhenOn", + "LightWhenOff" + ] + }, + "state": { + "class_name": "TuyaBacklightModeSelectEntity", + "available": true, + "state": "LightWhenOn" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-6-power_on_state", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaPowerOnStateSelectEntity", + "translation_key": "power_on_state", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPowerOnState", + "options": [ + "Off", + "On", + "LastState" + ] + }, + "state": { + "class_name": "TuyaPowerOnStateSelectEntity", + "available": true, + "state": "LastState" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 208 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -48 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledSmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "TuyaZBMeteringCluster", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "TuyaChildLockSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "TuyaChildLockSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-2", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:a5:92:4b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d4:a5:92:4b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:a5:92:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-tgddllx4-ts0001.json b/tests/data/devices/tz3000-tgddllx4-ts0001.json new file mode 100644 index 00000000..d2c99fd1 --- /dev/null +++ b/tests/data/devices/tz3000-tgddllx4-ts0001.json @@ -0,0 +1,744 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:02:1f:a7:43", + "nwk": "0x9F4A", + "manufacturer": "_TZ3000_tgddllx4", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_tgddllx4", + "friendly_model": "TS0001", + "name": "_TZ3000_tgddllx4 TS0001", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.320977+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_tgddllx4" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 237 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "CustomMetering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Electric Metering", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:1f:a7:43-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:02:1f:a7:43:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:02:1f:a7:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 237.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-typdpbpg-ts011f.json b/tests/data/devices/tz3000-typdpbpg-ts011f.json new file mode 100644 index 00000000..e1dee91d --- /dev/null +++ b/tests/data/devices/tz3000-typdpbpg-ts011f.json @@ -0,0 +1,1186 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fe:eb:bf:54", + "nwk": "0xF95D", + "manufacturer": "_TZ3000_typdpbpg", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_typdpbpg", + "friendly_model": "TS011F", + "name": "_TZ3000_typdpbpg TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_v3", + "quirk_id": "tuya.plug_on_off_attributes", + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": 132, + "rssi": -67, + "last_seen": "2025-09-20T08:17:00.913464+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4107, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 112 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_typdpbpg" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x8000", + "name": "child_lock", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 387 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 100 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 1 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 22 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 235 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0x1888", + "endpoint_attribute": "tuya_manufacturer_specific_6280", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 268514823 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x000a", + "0x0702", + "0x0b04", + "0x1000", + "0x1888", + "0xe000" + ], + "output_clusters": [ + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "On" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-6-backlight_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaBacklightModeSelectEntity", + "translation_key": "backlight_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBacklightMode", + "options": [ + "Off", + "LightWhenOn", + "LightWhenOff" + ] + }, + "state": { + "class_name": "TuyaBacklightModeSelectEntity", + "available": true, + "state": "LightWhenOn" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-6-power_on_state", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "TuyaPowerOnStateSelectEntity", + "translation_key": "power_on_state", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPowerOnState", + "options": [ + "Off", + "On", + "LastState" + ] + }, + "state": { + "class_name": "TuyaPowerOnStateSelectEntity", + "available": true, + "state": "On" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 132 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -67 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledSmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "TuyaZBMeteringClusterWithUnit", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 3.87, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 1.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.022 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 235.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "TuyaChildLockSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "TuyaChildLockSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fe:eb:bf:54-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:fe:eb:bf:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fe:eb:bf:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x10013607", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-u4kojtqz-ts0002.json b/tests/data/devices/tz3000-u4kojtqz-ts0002.json new file mode 100644 index 00000000..3be4f990 --- /dev/null +++ b/tests/data/devices/tz3000-u4kojtqz-ts0002.json @@ -0,0 +1,709 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:26:0c:99:7b", + "nwk": "0x89CD", + "manufacturer": "_TZ3000_u4kojtqz", + "model": "TS0002", + "friendly_manufacturer": "_TZ3000_u4kojtqz", + "friendly_model": "TS0002", + "name": "_TZ3000_u4kojtqz TS0002", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:53.284344+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4107, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_u4kojtqz" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0002" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 268514823 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-2-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x10013607", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:0c:99:7b-2-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 2, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "2:0x0019_client", + "unique_id": "ab:cd:ef:12:26:0c:99:7b:2:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:0c:99:7b", + "endpoint_id": 2, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-xa9g7rxs-ts1002.json b/tests/data/devices/tz3000-xa9g7rxs-ts1002.json new file mode 100644 index 00000000..508122cb --- /dev/null +++ b/tests/data/devices/tz3000-xa9g7rxs-ts1002.json @@ -0,0 +1,412 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:66:b9:e7:ff", + "nwk": "0xB0E5", + "manufacturer": "_TZ3000_xa9g7rxs", + "model": "TS1002", + "friendly_manufacturer": "_TZ3000_xa9g7rxs", + "friendly_model": "TS1002", + "name": "_TZ3000_xa9g7rxs TS1002", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.952749+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_DIMMER_SWITCH", + "id": 261 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_xa9g7rxs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS1002" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:b9:e7:ff-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:66:b9:e7:ff:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:b9:e7:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:b9:e7:ff-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:66:b9:e7:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:b9:e7:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:b9:e7:ff-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:66:b9:e7:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:b9:e7:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:b9:e7:ff-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:66:b9:e7:ff:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:66:b9:e7:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:b9:e7:ff-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:66:b9:e7:ff:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:b9:e7:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-zl1kmjqx.json b/tests/data/devices/tz3000-zl1kmjqx.json new file mode 100644 index 00000000..fee37c37 --- /dev/null +++ b/tests/data/devices/tz3000-zl1kmjqx.json @@ -0,0 +1,478 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bd:22:a3:f8", + "nwk": "0xB22D", + "manufacturer": "_TZ3000_zl1kmjqx", + "model": "", + "friendly_manufacturer": "_TZ3000_zl1kmjqx", + "friendly_model": "", + "name": "_TZ3000_zl1kmjqx ", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.452861+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_zl1kmjqx" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 144 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2062 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 4662 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 268513281 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 72.0, + "battery_size": "AA", + "battery_quantity": 2, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 20.62 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 46.62 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bd:22:a3:f8-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:bd:22:a3:f8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bd:22:a3:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x10013001", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3002-vaq2bfcu-ts0726.json b/tests/data/devices/tz3002-vaq2bfcu-ts0726.json new file mode 100644 index 00000000..cf43ebbe --- /dev/null +++ b/tests/data/devices/tz3002-vaq2bfcu-ts0726.json @@ -0,0 +1,816 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f0:bb:38:d7", + "nwk": "0xE49C", + "manufacturer": "_TZ3002_vaq2bfcu", + "model": "TS0726", + "friendly_manufacturer": "_TZ3002_vaq2bfcu", + "friendly_model": "TS0726", + "name": "_TZ3002_vaq2bfcu TS0726", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.437930+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3002_vaq2bfcu" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0726" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 81 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "6": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-3-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-4-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 4, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "4:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 4, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-5-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 5, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-6-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 6, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "6:0x0006", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 6, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:bb:38:d7-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f0:bb:38:d7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:bb:38:d7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000051", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3040-bb6xaihh-ts0202.json b/tests/data/devices/tz3040-bb6xaihh-ts0202.json new file mode 100644 index 00000000..17b2b80f --- /dev/null +++ b/tests/data/devices/tz3040-bb6xaihh-ts0202.json @@ -0,0 +1,522 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d3:a3:07:1f", + "nwk": "0xFC90", + "manufacturer": "_TZ3040_bb6xaihh", + "model": "TS0202", + "friendly_manufacturer": "_TZ3040_bb6xaihh", + "friendly_model": "TS0202", + "name": "_TZ3040_bb6xaihh TS0202", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 136, + "rssi": -66, + "last_seen": "2025-09-05T07:21:46.951697+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3040_bb6xaihh" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0202" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 172, + 101, + 33, + 254, + 255, + 191, + 6, + 228 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 136 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -66 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d3:a3:07:1f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d3:a3:07:1f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d3:a3:07:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000048", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-0jxeoadc-ts0049.json b/tests/data/devices/tz3210-0jxeoadc-ts0049.json new file mode 100644 index 00000000..0c1193d5 --- /dev/null +++ b/tests/data/devices/tz3210-0jxeoadc-ts0049.json @@ -0,0 +1,489 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f1:08:7a:54", + "nwk": "0x0517", + "manufacturer": "_TZ3210_0jxeoadc", + "model": "TS0049", + "friendly_manufacturer": "_TZ3210_0jxeoadc", + "friendly_model": "TS0049", + "name": "_TZ3210_0jxeoadc TS0049", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.276688+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_0jxeoadc" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0049" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": false + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef6f", + "name": "valve_duration", + "zcl_type": "uint32", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Irrigation duration", + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-valve_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "valve_duration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 1 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 0.0, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": "Error status", + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-error_status", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "error_status", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:08:7a:54-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f1:08:7a:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:08:7a:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-3mpwqzuu-ts110e.json b/tests/data/devices/tz3210-3mpwqzuu-ts110e.json new file mode 100644 index 00000000..416ae6e6 --- /dev/null +++ b/tests/data/devices/tz3210-3mpwqzuu-ts110e.json @@ -0,0 +1,680 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:01:e4:a9:87", + "nwk": "0x68A5", + "manufacturer": "_TZ3210_3mpwqzuu", + "model": "TS110E", + "friendly_manufacturer": "_TZ3210_3mpwqzuu", + "friendly_model": "TS110E", + "name": "_TZ3210_3mpwqzuu TS110E", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 176, + "rssi": -67, + "last_seen": "2025-07-29T11:39:42.554072+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_3mpwqzuu" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS110E" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "max_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "min_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 64 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 176 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -67 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:01:e4:a9:87-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:01:e4:a9:87:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:a9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000040", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-bfwvfyx1-ts0505b.json b/tests/data/devices/tz3210-bfwvfyx1-ts0505b.json new file mode 100644 index 00000000..ec2922f9 --- /dev/null +++ b/tests/data/devices/tz3210-bfwvfyx1-ts0505b.json @@ -0,0 +1,698 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:98:c5:5e:60", + "nwk": "0x0427", + "manufacturer": "_TZ3210_bfwvfyx1", + "model": "TS0505B", + "friendly_manufacturer": "_TZ3210_bfwvfyx1", + "friendly_model": "TS0505B", + "name": "_TZ3210_bfwvfyx1 TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 160, + "rssi": -60, + "last_seen": "2025-05-10T19:20:20.718254+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_bfwvfyx1" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0505B" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 270 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 1000 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 1000 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": [ + 0.0, + 0.0 + ], + "color_temp": 270, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1000, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 1000 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 255 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 160 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:c5:5e:60-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:98:c5:5e:60:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:c5:5e:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-comkuwws-ts0502b.json b/tests/data/devices/tz3210-comkuwws-ts0502b.json new file mode 100644 index 00000000..bdf9a052 --- /dev/null +++ b/tests/data/devices/tz3210-comkuwws-ts0502b.json @@ -0,0 +1,547 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:03:2c:f4:f0", + "nwk": "0x7BD6", + "manufacturer": "_TZ3210_comkuwws", + "model": "TS0502B", + "friendly_manufacturer": "_TZ3210_comkuwws", + "friendly_model": "TS0502B", + "name": "_TZ3210_comkuwws TS0502B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.293937+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_comkuwws" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0502B" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 64 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 16 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 101 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:2c:f4:f0-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:2c:f4:f0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:2c:f4:f0-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:03:2c:f4:f0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 64, + "xy_color": null, + "color_temp": 500, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:2c:f4:f0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:2c:f4:f0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:2c:f4:f0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:2c:f4:f0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:2c:f4:f0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:03:2c:f4:f0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:2c:f4:f0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000065", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-ehcanwyc-ts0502b.json b/tests/data/devices/tz3210-ehcanwyc-ts0502b.json new file mode 100644 index 00000000..231468d6 --- /dev/null +++ b/tests/data/devices/tz3210-ehcanwyc-ts0502b.json @@ -0,0 +1,571 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d1:e8:f3:62", + "nwk": "0xBF7B", + "manufacturer": "_TZ3210_ehcanwyc", + "model": "TS0502B", + "friendly_manufacturer": "_TZ3210_ehcanwyc", + "friendly_model": "TS0502B", + "name": "_TZ3210_ehcanwyc TS0502B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 160, + "rssi": -60, + "last_seen": "2025-09-07T17:18:50.336569+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 101 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_ehcanwyc" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0502B" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 16 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 101 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:e8:f3:62-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:e8:f3:62", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:e8:f3:62-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:d1:e8:f3:62", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": 153, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:e8:f3:62-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:e8:f3:62", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 160 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:e8:f3:62-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:e8:f3:62", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:e8:f3:62-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d1:e8:f3:62:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:e8:f3:62", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000065", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-ekjc2rzh-ts0225.json b/tests/data/devices/tz3210-ekjc2rzh-ts0225.json new file mode 100644 index 00000000..6b1abeb6 --- /dev/null +++ b/tests/data/devices/tz3210-ekjc2rzh-ts0225.json @@ -0,0 +1,323 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b6:44:52:d2", + "nwk": "0x7CC4", + "manufacturer": "_TZ3210_ekjc2rzh", + "model": "TS0225", + "friendly_manufacturer": "_TZ3210_ekjc2rzh", + "friendly_model": "TS0225", + "name": "_TZ3210_ekjc2rzh TS0225", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.237573+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_ekjc2rzh" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0225" + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 190, + 10, + 19, + 254, + 255, + 141, + 121, + 224 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 32771 + } + ] + }, + { + "cluster_id": "0xe002", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:44:52:d2-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:b6:44:52:d2:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:44:52:d2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:44:52:d2-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b6:44:52:d2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:44:52:d2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:44:52:d2-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b6:44:52:d2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:44:52:d2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b6:44:52:d2-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b6:44:52:d2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b6:44:52:d2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-k1msuvg6-ts110e.json b/tests/data/devices/tz3210-k1msuvg6-ts110e.json new file mode 100644 index 00000000..ea8edca6 --- /dev/null +++ b/tests/data/devices/tz3210-k1msuvg6-ts110e.json @@ -0,0 +1,563 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:31:4b:13:3c", + "nwk": "0x4475", + "manufacturer": "_TZ3210_k1msuvg6", + "model": "TS110E", + "friendly_manufacturer": "_TZ3210_k1msuvg6", + "friendly_model": "TS110E", + "name": "_TZ3210_k1msuvg6 TS110E", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 176, + "rssi": -67, + "last_seen": "2025-07-29T11:28:08.683251+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_k1msuvg6" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS110E" + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000e", + "name": "product_label", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_frequency", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 64 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x000b", + "name": "upgrade_activation_policy", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": "ff:ff:ff:ff:ff:ff:ff:ff" + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:4b:13:3c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:4b:13:3c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:4b:13:3c-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:31:4b:13:3c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:4b:13:3c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:4b:13:3c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 176 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:4b:13:3c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:4b:13:3c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -67 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:4b:13:3c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:31:4b:13:3c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:4b:13:3c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000040", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-kjafhwd2-ts0210.json b/tests/data/devices/tz3210-kjafhwd2-ts0210.json new file mode 100644 index 00000000..acf5648f --- /dev/null +++ b/tests/data/devices/tz3210-kjafhwd2-ts0210.json @@ -0,0 +1,484 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3b:15:29:1f", + "nwk": "0xBA4D", + "manufacturer": "_TZ3210_kjafhwd2", + "model": "TS0210", + "friendly_manufacturer": "_TZ3210_kjafhwd2", + "friendly_model": "TS0210", + "name": "_TZ3210_kjafhwd2 TS0210", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 224, + "rssi": -44, + "last_seen": "2025-05-12T23:16:29.906368+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_kjafhwd2" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0210" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 32 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 175, + 154, + 199, + 254, + 255, + 219, + 180, + 132 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 68 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 224 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -44 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 16.0, + "battery_voltage": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:15:29:1f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:3b:15:29:1f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:15:29:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000044", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-r5afgmkl-ts0505b.json b/tests/data/devices/tz3210-r5afgmkl-ts0505b.json new file mode 100644 index 00000000..34c77533 --- /dev/null +++ b/tests/data/devices/tz3210-r5afgmkl-ts0505b.json @@ -0,0 +1,829 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "nwk": "0x62A8", + "manufacturer": "_TZ3210_r5afgmkl", + "model": "TS0505B", + "friendly_manufacturer": "_TZ3210_r5afgmkl", + "friendly_model": "TS0505B", + "name": "_TZ3210_r5afgmkl TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.220408+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4107, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_r5afgmkl" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0505B" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 126 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 25 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 35848 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 26214 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 65535 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 268514823 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 254, + "xy_color": [ + 0.5470054169527734, + 0.4 + ], + "color_temp": 153, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 500, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 65535 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 10 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 10 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 126 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ef:1c:e4:bc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:1c:e4:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x10013607", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-ru41azca-ts0049.json b/tests/data/devices/tz3210-ru41azca-ts0049.json new file mode 100644 index 00000000..0db9fab8 --- /dev/null +++ b/tests/data/devices/tz3210-ru41azca-ts0049.json @@ -0,0 +1,401 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ff:97:55:6f", + "nwk": "0x2377", + "manufacturer": "_TZ3210_ru41azca", + "model": "TS0049", + "friendly_manufacturer": "_TZ3210_ru41azca", + "friendly_model": "TS0049", + "name": "_TZ3210_ru41azca TS0049", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.593533+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 64 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_ru41azca" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0049" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 4 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 64 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:97:55:6f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ff:97:55:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:97:55:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:97:55:6f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ff:97:55:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:97:55:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:97:55:6f-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:ff:97:55:6f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:ff:97:55:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 50.0, + "battery_size": "AAA", + "battery_quantity": 4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:97:55:6f-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ff:97:55:6f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ff:97:55:6f", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": true, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:97:55:6f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ff:97:55:6f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:97:55:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000040", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-sb8x2xci-ts0001.json b/tests/data/devices/tz3210-sb8x2xci-ts0001.json new file mode 100644 index 00000000..936ae2ee --- /dev/null +++ b/tests/data/devices/tz3210-sb8x2xci-ts0001.json @@ -0,0 +1,381 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d2:fd:33:7c", + "nwk": "0xE2E2", + "manufacturer": "_TZ3210_sb8x2xci", + "model": "TS0001", + "friendly_manufacturer": "_TZ3210_sb8x2xci", + "friendly_model": "TS0001", + "name": "_TZ3210_sb8x2xci TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.650446+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_sb8x2xci" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 71 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:fd:33:7c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:d2:fd:33:7c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:fd:33:7c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:fd:33:7c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:fd:33:7c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:fd:33:7c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:fd:33:7c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:fd:33:7c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:fd:33:7c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:fd:33:7c-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:d2:fd:33:7c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:fd:33:7c", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:fd:33:7c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d2:fd:33:7c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:fd:33:7c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000047", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3210-u1dreag7-ts0502b.json b/tests/data/devices/tz3210-u1dreag7-ts0502b.json new file mode 100644 index 00000000..06372967 --- /dev/null +++ b/tests/data/devices/tz3210-u1dreag7-ts0502b.json @@ -0,0 +1,565 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "nwk": "0x4159", + "manufacturer": "_TZ3210_u1dreag7", + "model": "TS0502B", + "friendly_manufacturer": "_TZ3210_u1dreag7", + "friendly_model": "TS0502B", + "name": "_TZ3210_u1dreag7 TS0502B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 160, + "rssi": -60, + "last_seen": "2025-08-28T07:07:58.073414+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_u1dreag7" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0502B" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 16 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 284 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 101 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": null, + "color_temp": 284, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 160 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ec:f3:8b:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:f3:8b:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000065", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3218-7fiyo3kv-ts000f.json b/tests/data/devices/tz3218-7fiyo3kv-ts000f.json new file mode 100644 index 00000000..7432b360 --- /dev/null +++ b/tests/data/devices/tz3218-7fiyo3kv-ts000f.json @@ -0,0 +1,408 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6d:c3:60:d3", + "nwk": "0x6671", + "manufacturer": "_TZ3218_7fiyo3kv", + "model": "TS000F", + "friendly_manufacturer": "_TZ3218_7fiyo3kv", + "friendly_model": "TS000F", + "name": "_TZ3218_7fiyo3kv TS000F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.648553+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3218_7fiyo3kv" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS000F" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 81 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6d:c3:60:d3-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:6d:c3:60:d3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:c3:60:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6d:c3:60:d3-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:6d:c3:60:d3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:6d:c3:60:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6d:c3:60:d3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6d:c3:60:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:c3:60:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6d:c3:60:d3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6d:c3:60:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:c3:60:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6d:c3:60:d3-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6d:c3:60:d3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:c3:60:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000051", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3218-t9ynfz4x-ts0225.json b/tests/data/devices/tz3218-t9ynfz4x-ts0225.json new file mode 100644 index 00000000..74da7516 --- /dev/null +++ b/tests/data/devices/tz3218-t9ynfz4x-ts0225.json @@ -0,0 +1,382 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "nwk": "0x40CF", + "manufacturer": "_TZ3218_t9ynfz4x", + "model": "TS0225", + "friendly_manufacturer": "_TZ3218_t9ynfz4x", + "friendly_model": "TS0225", + "name": "_TZ3218_t9ynfz4x TS0225", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.754584+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3218_t9ynfz4x" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0225" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "e4:06:bf:ff:fe:34:fd:64" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 32771 + } + ] + }, + { + "cluster_id": "0x4000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe002", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 69 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": true + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e5:ee:a6:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:ee:a6:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000045", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3218-ya5d6wth-ts000f.json b/tests/data/devices/tz3218-ya5d6wth-ts000f.json new file mode 100644 index 00000000..69fda26c --- /dev/null +++ b/tests/data/devices/tz3218-ya5d6wth-ts000f.json @@ -0,0 +1,750 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "nwk": "0x7D97", + "manufacturer": "_TZ3218_ya5d6wth", + "model": "TS000F", + "friendly_manufacturer": "_TZ3218_ya5d6wth", + "friendly_model": "TS000F", + "name": "_TZ3218_ya5d6wth TS000F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.983130+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3218_ya5d6wth" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS000F" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 100 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-3", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-4", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 4, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "4:0x0006", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 4, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e0:ea:fe:6c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:ea:fe:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000064", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3290-ot6ewjvmejq5ekhl-ts1201.json b/tests/data/devices/tz3290-ot6ewjvmejq5ekhl-ts1201.json new file mode 100644 index 00000000..727d7124 --- /dev/null +++ b/tests/data/devices/tz3290-ot6ewjvmejq5ekhl-ts1201.json @@ -0,0 +1,486 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:15:61:a8:f8", + "nwk": "0x8AD7", + "manufacturer": "_TZ3290_ot6ewjvmejq5ekhl", + "model": "TS1201", + "friendly_manufacturer": "_TZ3290_ot6ewjvmejq5ekhl", + "friendly_model": "TS1201", + "name": "_TZ3290_ot6ewjvmejq5ekhl TS1201", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts1201.ZosungIRBlaster", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 120, + "rssi": null, + "last_seen": "2025-08-05T14:08:34.872297+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xf000", + "id": 61440 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3290_ot6ewjvmejq5ekhl" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS1201" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 122 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 13 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe004", + "endpoint_attribute": "zosung_ircontrol", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": "zosung_irtransmit", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 67 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZ3290_ot6ewjvmejq5ekhl", + "TS1201" + ], + [ + "_TZ3290_j37rooaxrcdcqo5n", + "TS1201" + ], + [ + "_TZ3290_u9xac5rv", + "TS1201" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0xf000", + "input_clusters": [ + "0x0000", + "0xed00", + "0xe004", + "0x0004", + "0x0003", + "0x0006", + "0x0001", + "0x0005" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 120 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 61.0, + "battery_voltage": 1.3 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:61:a8:f8-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:15:61:a8:f8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:61:a8:f8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000043", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-3towulqd-ts0601.json b/tests/data/devices/tze200-3towulqd-ts0601.json new file mode 100644 index 00000000..3955d5b2 --- /dev/null +++ b/tests/data/devices/tze200-3towulqd-ts0601.json @@ -0,0 +1,650 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:02:44:6a:44", + "nwk": "0x4571", + "manufacturer": "_TZE200_3towulqd", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_3towulqd", + "friendly_model": "TS0601", + "name": "_TZE200_3towulqd TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.172976+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_3towulqd" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 20 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 25315.789170422548 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": true + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef0a", + "name": "fading_time", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xef09", + "name": "presence_sensitivity", + "zcl_type": "enum8", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 70 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": "ias_zone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Illuminance interval", + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-illuminance_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "illuminance_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 720, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-fading_time", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotionFadeTime", + "options": [ + " 10 seconds", + " 30 seconds", + " 60 seconds", + " 120 seconds" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": " 10 seconds" + } + }, + { + "info_object": { + "fallback_name": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-presence_sensitivity", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "presence_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotionPresenceSensitivity", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Medium" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 10.0, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 340 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:02:44:6a:44-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:02:44:6a:44:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:02:44:6a:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000046", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-3ylew7b4-ts0601.json b/tests/data/devices/tze200-3ylew7b4-ts0601.json new file mode 100644 index 00000000..cdbdc01c --- /dev/null +++ b/tests/data/devices/tze200-3ylew7b4-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d2:40:50:25", + "nwk": "0x46C0", + "manufacturer": "_TZE200_3ylew7b4", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_3ylew7b4", + "friendly_model": "TS0601", + "name": "_TZE200_3ylew7b4 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 128, + "rssi": -79, + "last_seen": "2025-08-26T12:05:24.614059+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_3ylew7b4" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:40:50:25-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:40:50:25:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:40:50:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 128 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:40:50:25-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:40:50:25:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:40:50:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -79 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:40:50:25-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d2:40:50:25:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:40:50:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-8whfphjv-ts0601.json b/tests/data/devices/tze200-8whfphjv-ts0601.json new file mode 100644 index 00000000..89ece61b --- /dev/null +++ b/tests/data/devices/tze200-8whfphjv-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f9:05:90:9e", + "nwk": "0xD7FA", + "manufacturer": "_TZE200_8whfphjv", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_8whfphjv", + "friendly_model": "TS0601", + "name": "_TZE200_8whfphjv TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.630585+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_8whfphjv" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:05:90:9e-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f9:05:90:9e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:05:90:9e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:05:90:9e-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f9:05:90:9e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:05:90:9e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:05:90:9e-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f9:05:90:9e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:05:90:9e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000048", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-9xfjixap-ts0601.json b/tests/data/devices/tze200-9xfjixap-ts0601.json new file mode 100644 index 00000000..36bb60cb --- /dev/null +++ b/tests/data/devices/tze200-9xfjixap-ts0601.json @@ -0,0 +1,668 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "nwk": "0x4D03", + "manufacturer": "_TZE200_9xfjixap", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_9xfjixap", + "friendly_model": "TS0601", + "name": "_TZE200_9xfjixap TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.217361+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_9xfjixap" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 67 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ec:e3:cc:ac:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:e3:cc:ac", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000043", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-b6wax7g0-ts0601.json b/tests/data/devices/tze200-b6wax7g0-ts0601.json new file mode 100644 index 00000000..a2922a9e --- /dev/null +++ b/tests/data/devices/tze200-b6wax7g0-ts0601.json @@ -0,0 +1,754 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6b:27:4c:e0", + "nwk": "0x6725", + "manufacturer": "_TZE200_b6wax7g0", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_b6wax7g0", + "friendly_model": "TS0601", + "name": "_TZE200_b6wax7g0 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_trv.MoesHY368_Type1new", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 0, + "rssi": null, + "last_seen": "2025-10-21T06:01:42.878986+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_b6wax7g0" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x4001", + "name": "eco_heating_setpoint", + "zcl_type": "int16", + "value": 4500 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1600 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1400 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x4004", + "name": "valve_open_percentage", + "zcl_type": "uint8", + "value": 5 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0x026c", + "name": "eco_mode_temperature", + "zcl_type": "uint32", + "value": 45 + }, + { + "id": "0x0267", + "name": "max_temperature", + "zcl_type": "uint32", + "value": 30 + }, + { + "id": "0x0202", + "name": "target_temperature", + "zcl_type": "uint32", + "value": 14 + }, + { + "id": "0x0203", + "name": "temperature", + "zcl_type": "uint32", + "value": 160 + }, + { + "id": "0x026d", + "name": "valve_state", + "zcl_type": "uint32", + "value": 5 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 67 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_b6wax7g0", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "BecaThermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "MoesThermostatNew", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 401, + "fan_modes": null, + "preset_modes": [ + "none", + "away", + "Schedule", + "eco", + "boost", + "Temporary manual" + ], + "hvac_modes": [ + "heat" + ] + }, + "state": { + "class_name": "BecaThermostat", + "available": true, + "current_temperature": 16.0, + "outdoor_temperature": null, + "target_temperature": 14.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "heating", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 1400, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "MoesThermostatNew", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "MoesThermostatNew", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "MoesThermostatNew", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "MoesThermostatNew", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:27:4c:e0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6b:27:4c:e0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:27:4c:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000043", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-bkkmqmyo-ts0601.json b/tests/data/devices/tze200-bkkmqmyo-ts0601.json new file mode 100644 index 00000000..5a979a22 --- /dev/null +++ b/tests/data/devices/tze200-bkkmqmyo-ts0601.json @@ -0,0 +1,986 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ab:88:33:32", + "nwk": "0x37E6", + "manufacturer": "_TZE200_bkkmqmyo", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_bkkmqmyo", + "friendly_model": "TS0601", + "name": "_TZE200_bkkmqmyo TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_din_power.HikingPowerMeter", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 160, + "rssi": -60, + "last_seen": "2025-08-11T23:22:01.680726+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 65 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_bkkmqmyo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 1396.8 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "value": 1253.2 + }, + { + "id": "0x0100", + "name": "current_tier1_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0102", + "name": "current_tier2_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0104", + "name": "current_tier3_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0106", + "name": "current_tier4_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0108", + "name": "current_tier5_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x010a", + "name": "current_tier6_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0200", + "name": "status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0303", + "name": "summation_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "value": 5000 + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 8 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090d", + "name": "active_power_max_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0d", + "name": "active_power_max_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "unsupported": true + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "value": 7 + }, + { + "id": "0x0910", + "name": "power_factor_ph_b", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0a10", + "name": "power_factor_ph_c", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x050e", + "name": "reactive_power", + "zcl_type": "int16", + "value": 102 + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x090a", + "name": "rms_current_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a0a", + "name": "rms_current_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0907", + "name": "rms_voltage_max_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a07", + "name": "rms_voltage_max_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + }, + { + "id": "0x0305", + "name": "total_reactive_power", + "zcl_type": "int32", + "value": 50147 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0x0201", + "name": "energy_delivered", + "zcl_type": "uint32", + "value": 139680 + }, + { + "id": "0x0266", + "name": "energy_received", + "zcl_type": "uint32", + "value": 125320 + }, + { + "id": "0x0269", + "name": "frequency", + "zcl_type": "uint16", + "value": 5000 + }, + { + "id": "0x0267", + "name": "power", + "zcl_type": "int32", + "value": 8 + }, + { + "id": "0x026f", + "name": "power_factor", + "zcl_type": "uint16", + "value": 77 + }, + { + "id": "0x026e", + "name": "reactive_power", + "zcl_type": "int16", + "value": 102 + }, + { + "id": "0x0110", + "name": "switch", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x026d", + "name": "total_reactive_energy", + "zcl_type": "int32", + "value": 50147 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 65 + } + ] + } + ] + }, + "16": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_bkkmqmyo", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 160 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -60 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "TuyaElectricalMeasurement", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 1396.8, + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-1794-summation_received", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummationReceived", + "translation_key": "summation_received", + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "TuyaElectricalMeasurement", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummationReceived", + "available": true, + "state": 1253.2, + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 8.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-2820-ac_frequency", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementFrequency", + "translation_key": "ac_frequency", + "translation_placeholders": null, + "device_class": "frequency", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 50.0 + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-2820-power_factor", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementPowerFactor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power_factor", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": 7 + }, + "extra_state_attributes": [ + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-16", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 16, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "16:0x0006", + "unique_id": "ab:cd:ef:12:ab:88:33:32:16:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 16, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:88:33:32-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ab:88:33:32:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:88:33:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000041", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-c88teujp-ts0601.json b/tests/data/devices/tze200-c88teujp-ts0601.json new file mode 100644 index 00000000..16b44ae3 --- /dev/null +++ b/tests/data/devices/tze200-c88teujp-ts0601.json @@ -0,0 +1,923 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f0:e2:89:82", + "nwk": "0xDF16", + "manufacturer": "_TZE200_c88teujp", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_c88teujp", + "friendly_model": "TS0601", + "name": "_TZE200_c88teujp TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.528419+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_c88teujp" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1900 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 20 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef6a", + "name": "away_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef69", + "name": "battery_low", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef28", + "name": "child_lock", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef0a", + "name": "frost_protection", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef82", + "name": "scale_protection", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef6c", + "name": "schedule_enable", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef08", + "name": "window_detection", + "zcl_type": "bool", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 85 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Battery low", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 19.0, + "outdoor_temperature": null, + "target_temperature": 20.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve position", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-valve_position", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "valve_position", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Away mode", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-away_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "away_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "away_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Schedule enable", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-schedule_enable", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "schedule_enable", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "schedule_enable", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:e2:89:82-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f0:e2:89:82:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:e2:89:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000055", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-crq3r3la-ck-bl702-mws-01-7016.json b/tests/data/devices/tze200-crq3r3la-ck-bl702-mws-01-7016.json new file mode 100644 index 00000000..6b5799a1 --- /dev/null +++ b/tests/data/devices/tze200-crq3r3la-ck-bl702-mws-01-7016.json @@ -0,0 +1,498 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:36:6f:df:00", + "nwk": "0xA02D", + "manufacturer": "_TZE200_crq3r3la", + "model": "CK-BL702-MWS-01(7016)", + "friendly_manufacturer": "_TZE200_crq3r3la", + "friendly_model": "CK-BL702-MWS-01(7016)", + "name": "_TZE200_crq3r3la CK-BL702-MWS-01(7016)", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 255, + "rssi": -39, + "last_seen": "2025-07-15T19:10:22.468130+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_crq3r3la" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "CK-BL702-MWS-01(7016)" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 30986 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:21:2e:ff:ff:07:e4:46" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe002", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xee00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": true + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -39 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 1255 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:6f:df:00-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:36:6f:df:00:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-e5hpkc6d-ts0601.json b/tests/data/devices/tze200-e5hpkc6d-ts0601.json new file mode 100644 index 00000000..9991be1c --- /dev/null +++ b/tests/data/devices/tze200-e5hpkc6d-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0f:8f:90:d6", + "nwk": "0xDA91", + "manufacturer": "_TZE200_e5hpkc6d", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_e5hpkc6d", + "friendly_model": "TS0601", + "name": "_TZE200_e5hpkc6d TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.870742+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 65 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_e5hpkc6d" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0f:8f:90:d6-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0f:8f:90:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0f:8f:90:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0f:8f:90:d6-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0f:8f:90:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0f:8f:90:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0f:8f:90:d6-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:0f:8f:90:d6:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0f:8f:90:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-gjldowol-ts0601.json b/tests/data/devices/tze200-gjldowol-ts0601.json new file mode 100644 index 00000000..bd66f599 --- /dev/null +++ b/tests/data/devices/tze200-gjldowol-ts0601.json @@ -0,0 +1,562 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c3:87:c2:4d", + "nwk": "0x594E", + "manufacturer": "_TZE200_gjldowol", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_gjldowol", + "friendly_model": "TS0601", + "name": "_TZE200_gjldowol TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.366133+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SIMPLE_SENSOR", + "id": 12 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_gjldowol" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-fading_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 3600, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Illuminance interval", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-illuminance_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "illuminance_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 720, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-motion_sensitivity", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "motion_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaSensitivityMode", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:87:c2:4d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c3:87:c2:4d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:87:c2:4d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-gkfbdvyx-ts0601.json b/tests/data/devices/tze200-gkfbdvyx-ts0601.json new file mode 100644 index 00000000..8d6e7612 --- /dev/null +++ b/tests/data/devices/tze200-gkfbdvyx-ts0601.json @@ -0,0 +1,613 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "nwk": "0x7E1C", + "manufacturer": "_TZE200_gkfbdvyx", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_gkfbdvyx", + "friendly_model": "TS0601", + "name": "_TZE200_gkfbdvyx TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": 172, + "rssi": -68, + "last_seen": "2025-05-18T09:12:25.753501+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_gkfbdvyx" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.0, + "native_min_value": 0.75, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 8.25, + "native_min_value": 0, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-move_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "move_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-presence_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "presence_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-presence_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15000, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 172 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -68 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Distance tracking", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3-1-distance_tracking", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "distance_tracking", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:5a:b5:b3:b3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:b5:b3:b3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "distance_tracking", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-guvc7pdy-ts0601.json b/tests/data/devices/tze200-guvc7pdy-ts0601.json new file mode 100644 index 00000000..4e4e9cfd --- /dev/null +++ b/tests/data/devices/tze200-guvc7pdy-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:93:c9:f7:0f", + "nwk": "0x88D1", + "manufacturer": "_TZE200_guvc7pdy", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_guvc7pdy", + "friendly_model": "TS0601", + "name": "_TZE200_guvc7pdy TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 104, + "rssi": -74, + "last_seen": "2025-07-07T08:43:28.750808+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_guvc7pdy" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 70 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:c9:f7:0f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:c9:f7:0f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:c9:f7:0f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 104 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:c9:f7:0f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:c9:f7:0f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:c9:f7:0f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -74 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:c9:f7:0f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:93:c9:f7:0f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:c9:f7:0f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000046", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-h4cgnbzg-ts0601.json b/tests/data/devices/tze200-h4cgnbzg-ts0601.json new file mode 100644 index 00000000..be46db05 --- /dev/null +++ b/tests/data/devices/tze200-h4cgnbzg-ts0601.json @@ -0,0 +1,750 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d1:91:b1:8f", + "nwk": "0xC179", + "manufacturer": "_TZE200_h4cgnbzg", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_h4cgnbzg", + "friendly_model": "TS0601", + "name": "_TZE200_h4cgnbzg TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.267090+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2670 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": -4 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef6a", + "name": "away_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef69", + "name": "battery_low", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef28", + "name": "child_lock", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef0a", + "name": "frost_protection", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef1b", + "name": "local_temperature_calibration", + "zcl_type": "int32", + "value": -4 + }, + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + }, + { + "id": "0xef82", + "name": "scale_protection", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef6c", + "name": "schedule_enable", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef08", + "name": "window_detection", + "zcl_type": "bool", + "value": 1 + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Battery low", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 26.7, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "off", + "hvac_mode": "off", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[0]/off", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": -4 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "off" + } + }, + { + "info_object": { + "fallback_name": "Valve position", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-valve_position", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "valve_position", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Away mode", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-away_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "away_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "away_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Schedule enable", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-schedule_enable", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "schedule_enable", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "schedule_enable", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d1:91:b1:8f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:91:b1:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-hhrtiq0x-ts0601.json b/tests/data/devices/tze200-hhrtiq0x-ts0601.json new file mode 100644 index 00000000..2b6f21ca --- /dev/null +++ b/tests/data/devices/tze200-hhrtiq0x-ts0601.json @@ -0,0 +1,698 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9a:53:ef:5b", + "nwk": "0x9F96", + "manufacturer": "_TZE200_hhrtiq0x", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_hhrtiq0x", + "friendly_model": "TS0601", + "name": "_TZE200_hhrtiq0x TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.865308+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 85 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_hhrtiq0x" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 10 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2370 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 700 + }, + { + "id": "0x0025", + "name": "programing_oper_mode", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 85 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 23.7, + "outdoor_temperature": null, + "target_temperature": 7.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "heating", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 700, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 5.0, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "heating" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-513-pi_heating_demand", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PiHeatingDemand", + "translation_key": "pi_heating_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-513-setpoint_change_source", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSource", + "translation_key": "setpoint_change_source", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSource", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9a:53:ef:5b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:9a:53:ef:5b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9a:53:ef:5b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000055", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-hr0tdd47-ts0601.json b/tests/data/devices/tze200-hr0tdd47-ts0601.json new file mode 100644 index 00000000..669e6f7b --- /dev/null +++ b/tests/data/devices/tze200-hr0tdd47-ts0601.json @@ -0,0 +1,521 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:22:50:2b:09", + "nwk": "0x38BA", + "manufacturer": "_TZE200_hr0tdd47", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_hr0tdd47", + "friendly_model": "TS0601", + "name": "_TZE200_hr0tdd47 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.457179+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_hr0tdd47" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 43 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "gas", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": "CO concentration", + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-co", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "carbon_monoxide", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "ppm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-self_test_result", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test_result", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Mute siren", + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-mute_siren", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "mute_siren", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "mute_siren", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:50:2b:09-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:22:50:2b:09:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:50:2b:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000048", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-iba1ckek-ts0601.json b/tests/data/devices/tze200-iba1ckek-ts0601.json new file mode 100644 index 00000000..d02d6b0e --- /dev/null +++ b/tests/data/devices/tze200-iba1ckek-ts0601.json @@ -0,0 +1,377 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7c:6f:df:00", + "nwk": "0x9EA5", + "manufacturer": "_TZE200_iba1ckek", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_iba1ckek", + "friendly_model": "TS0601", + "name": "_TZE200_iba1ckek TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.774665+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_iba1ckek" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 184, + 233, + 225, + 37, + 0, + 75, + 18, + 0 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 45 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:6f:df:00-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "vibration", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:7c:6f:df:00:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:6f:df:00-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:7c:6f:df:00:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:6f:df:00-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7c:6f:df:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:6f:df:00-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:7c:6f:df:00:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:6f:df:00-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:7c:6f:df:00:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:7c:6f:df:00", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-kb5noeto-ts0601.json b/tests/data/devices/tze200-kb5noeto-ts0601.json new file mode 100644 index 00000000..1387a1f9 --- /dev/null +++ b/tests/data/devices/tze200-kb5noeto-ts0601.json @@ -0,0 +1,835 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:79:e4:8f:e2", + "nwk": "0x5DEA", + "manufacturer": "_TZE200_kb5noeto", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_kb5noeto", + "friendly_model": "TS0601", + "name": "_TZE200_kb5noeto TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.199867+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_kb5noeto" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 10 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 17 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 31572 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 177, + 81, + 90, + 23, + 0, + 111, + 13, + 0 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Motion detection sensitivity", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-motion_detection_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "motion_detection_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-presence_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 28800, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Static detection distance", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-static_detection_distance", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "static_detection_distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Static detection sensitivity", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-static_detection_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "static_detection_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Motion detection mode", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-motion_detection_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "motion_detection_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotionDetectionMode", + "options": [ + "Only PIR", + "PIR and radar", + "Only radar" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 5.0, + "battery_size": "AA", + "battery_quantity": 2, + "battery_voltage": 1.7 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 1436 + } + }, + { + "info_object": { + "fallback_name": "Human motion state", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-human_motion_state", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "human_motion_state", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "LED indicator", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2-1-find_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "led_indicator", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:79:e4:8f:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:79:e4:8f:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "find_switch", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-moycceze-ts0601.json b/tests/data/devices/tze200-moycceze-ts0601.json new file mode 100644 index 00000000..fafa31c9 --- /dev/null +++ b/tests/data/devices/tze200-moycceze-ts0601.json @@ -0,0 +1,244 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d8:e7:36:48", + "nwk": "0x633C", + "manufacturer": "_TZE200_moycceze", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_moycceze", + "friendly_model": "TS0601", + "name": "_TZE200_moycceze TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.222812+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_moycceze" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 67 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d8:e7:36:48-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d8:e7:36:48:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d8:e7:36:48", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d8:e7:36:48-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d8:e7:36:48:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d8:e7:36:48", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d8:e7:36:48-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d8:e7:36:48:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d8:e7:36:48", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000043", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-mzik0ov2-ts0601.json b/tests/data/devices/tze200-mzik0ov2-ts0601.json new file mode 100644 index 00000000..b5a66e85 --- /dev/null +++ b/tests/data/devices/tze200-mzik0ov2-ts0601.json @@ -0,0 +1,244 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cb:9b:c1:59", + "nwk": "0x4102", + "manufacturer": "_TZE200_mzik0ov2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_mzik0ov2", + "friendly_model": "TS0601", + "name": "_TZE200_mzik0ov2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.289177+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_mzik0ov2" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cb:9b:c1:59-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cb:9b:c1:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:9b:c1:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cb:9b:c1:59-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cb:9b:c1:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:9b:c1:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cb:9b:c1:59-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:cb:9b:c1:59:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:9b:c1:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-npj9bug3-ts0601.json b/tests/data/devices/tze200-npj9bug3-ts0601.json new file mode 100644 index 00000000..08ea2428 --- /dev/null +++ b/tests/data/devices/tze200-npj9bug3-ts0601.json @@ -0,0 +1,411 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e1:11:1c:cf", + "nwk": "0xE47C", + "manufacturer": "_TZE200_npj9bug3", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_npj9bug3", + "friendly_model": "TS0601", + "name": "_TZE200_npj9bug3 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 180, + "rssi": -55, + "last_seen": "2025-06-23T20:13:10.253196+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_npj9bug3" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2490 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 180 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -55 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 24.9 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:11:1c:cf-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:e1:11:1c:cf:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:11:1c:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 0.0 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-ntcy3xu1-ts0601.json b/tests/data/devices/tze200-ntcy3xu1-ts0601.json new file mode 100644 index 00000000..0894848b --- /dev/null +++ b/tests/data/devices/tze200-ntcy3xu1-ts0601.json @@ -0,0 +1,432 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3c:49:18:ca", + "nwk": "0x30D5", + "manufacturer": "_TZE200_ntcy3xu1", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_ntcy3xu1", + "friendly_model": "TS0601", + "name": "_TZE200_ntcy3xu1 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.617078+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_ntcy3xu1" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 40 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "smoke", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Tamper", + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-tamper", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "tamper", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "tamper" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AAA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3c:49:18:ca-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:3c:49:18:ca:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3c:49:18:ca", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-qrztc3ev-ts0601.json b/tests/data/devices/tze200-qrztc3ev-ts0601.json new file mode 100644 index 00000000..9b457727 --- /dev/null +++ b/tests/data/devices/tze200-qrztc3ev-ts0601.json @@ -0,0 +1,926 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a9:de:c2:da", + "nwk": "0xBE33", + "manufacturer": "_TZE200_qrztc3ev", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_qrztc3ev", + "friendly_model": "TS0601", + "name": "_TZE200_qrztc3ev TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.633693+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 404, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 404, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_qrztc3ev" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Alarm humidity max", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-alarm_humidity_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_humidity_max", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm humidity min", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-alarm_humidity_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_humidity_min", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm temperature max", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-alarm_temperature_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_temperature_max", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 60, + "native_min_value": -20, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm temperature min", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-alarm_temperature_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_temperature_min", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 60, + "native_min_value": -20, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity report interval", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-humidity_report_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "humidity_report_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 120, + "native_min_value": 5, + "native_step": 5, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity sensitivity", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-humidity_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "humidity_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature report interval", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-temperature_report_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "temperature_report_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 120, + "native_min_value": 5, + "native_step": 5, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature sensitivity", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-temperature_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "temperature_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 50, + "native_min_value": 0.1, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-display_unit", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_unit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaTempUnitConvert", + "options": [ + "Celsius", + "Fahrenheit" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity alarm", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-humidity_alarm", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "humidity_alarm", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature alarm", + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-temperature_alarm", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "temperature_alarm", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:de:c2:da-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a9:de:c2:da:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:de:c2:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-qyflbnbj-ts0601.json b/tests/data/devices/tze200-qyflbnbj-ts0601.json new file mode 100644 index 00000000..7a3f29ab --- /dev/null +++ b/tests/data/devices/tze200-qyflbnbj-ts0601.json @@ -0,0 +1,470 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5d:8a:7c:64", + "nwk": "0x9AA2", + "manufacturer": "_TZE200_qyflbnbj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_qyflbnbj", + "friendly_model": "TS0601", + "name": "_TZE200_qyflbnbj TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.893291+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_qyflbnbj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 655030 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 8400 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 70 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 6550.3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 84.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5d:8a:7c:64-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:5d:8a:7c:64:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5d:8a:7c:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000046", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-udank5zs-ts0601.json b/tests/data/devices/tze200-udank5zs-ts0601.json new file mode 100644 index 00000000..c74ffa01 --- /dev/null +++ b/tests/data/devices/tze200-udank5zs-ts0601.json @@ -0,0 +1,244 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e7:7f:df:74", + "nwk": "0xC63F", + "manufacturer": "_TZE200_udank5zs", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_udank5zs", + "friendly_model": "TS0601", + "name": "_TZE200_udank5zs TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.385921+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_udank5zs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e7:7f:df:74-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e7:7f:df:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7f:df:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e7:7f:df:74-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e7:7f:df:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7f:df:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e7:7f:df:74-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e7:7f:df:74:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7f:df:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-uf1qujxj-ts0601.json b/tests/data/devices/tze200-uf1qujxj-ts0601.json new file mode 100644 index 00000000..8275b3c6 --- /dev/null +++ b/tests/data/devices/tze200-uf1qujxj-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1c:ee:a6:97", + "nwk": "0x6A32", + "manufacturer": "_TZE200_uf1qujxj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_uf1qujxj", + "friendly_model": "TS0601", + "name": "_TZE200_uf1qujxj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:53.255356+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_uf1qujxj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:ee:a6:97-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:ee:a6:97:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:ee:a6:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:ee:a6:97-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:ee:a6:97:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:ee:a6:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:ee:a6:97-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:1c:ee:a6:97:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:ee:a6:97", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000048", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-vvmbj46n-ts0601.json b/tests/data/devices/tze200-vvmbj46n-ts0601.json new file mode 100644 index 00000000..6bcb888c --- /dev/null +++ b/tests/data/devices/tze200-vvmbj46n-ts0601.json @@ -0,0 +1,945 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:85:68:2c:96", + "nwk": "0x68BF", + "manufacturer": "_TZE200_vvmbj46n", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_vvmbj46n", + "friendly_model": "TS0601", + "name": "_TZE200_vvmbj46n TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.385308+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_vvmbj46n" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Alarm humidity max", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-alarm_humidity_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_humidity_max", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm humidity min", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-alarm_humidity_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_humidity_min", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm temperature max", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-alarm_temperature_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_temperature_max", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 60, + "native_min_value": -20, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm temperature min", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-alarm_temperature_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_temperature_min", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 60, + "native_min_value": -20, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity report interval", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-humidity_report_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "humidity_report_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 120, + "native_min_value": 5, + "native_step": 5, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity sensitivity", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-humidity_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "humidity_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature report interval", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-temperature_report_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "temperature_report_interval", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 120, + "native_min_value": 5, + "native_step": 5, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature sensitivity", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-temperature_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "temperature_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 50, + "native_min_value": 0.1, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-display_unit", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_unit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaTempUnitConvert", + "options": [ + "Celsius", + "Fahrenheit" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Humidity alarm", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-humidity_alarm", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "humidity_alarm", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature alarm", + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-temperature_alarm", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "temperature_alarm", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:68:2c:96-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:85:68:2c:96:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:68:2c:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000048", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-wdfurkoa-ts0601.json b/tests/data/devices/tze200-wdfurkoa-ts0601.json new file mode 100644 index 00000000..2eba959d --- /dev/null +++ b/tests/data/devices/tze200-wdfurkoa-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ba:51:0f:39", + "nwk": "0xCD99", + "manufacturer": "_TZE200_wdfurkoa", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_wdfurkoa", + "friendly_model": "TS0601", + "name": "_TZE200_wdfurkoa TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 40, + "rssi": null, + "last_seen": "2025-10-13T16:50:44.371958+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 65 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_wdfurkoa" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 65 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:51:0f:39-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ba:51:0f:39:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:51:0f:39", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 40 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:51:0f:39-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ba:51:0f:39:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:51:0f:39", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:51:0f:39-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ba:51:0f:39:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:51:0f:39", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000041", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-wfxuhoea-ts0601.json b/tests/data/devices/tze200-wfxuhoea-ts0601.json new file mode 100644 index 00000000..a95157d7 --- /dev/null +++ b/tests/data/devices/tze200-wfxuhoea-ts0601.json @@ -0,0 +1,253 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:51:42:d4:41", + "nwk": "0x34E5", + "manufacturer": "_TZE200_wfxuhoea", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_wfxuhoea", + "friendly_model": "TS0601", + "name": "_TZE200_wfxuhoea TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.174198+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 70 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:42:d4:41-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:51:42:d4:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:42:d4:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:42:d4:41-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:51:42:d4:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:42:d4:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:42:d4:41-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:51:42:d4:41:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:42:d4:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000046", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-wqashyqo-ts0601.json b/tests/data/devices/tze200-wqashyqo-ts0601.json new file mode 100644 index 00000000..8b1be6fb --- /dev/null +++ b/tests/data/devices/tze200-wqashyqo-ts0601.json @@ -0,0 +1,411 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b9:21:9e:2d", + "nwk": "0x4436", + "manufacturer": "_TZE200_wqashyqo", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_wqashyqo", + "friendly_model": "TS0601", + "name": "_TZE200_wqashyqo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 96, + "rssi": -76, + "last_seen": "2025-06-11T12:13:46.344978+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4742, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_wqashyqo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2210 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 300 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 96 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -76 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b9:21:9e:2d-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:b9:21:9e:2d:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:b9:21:9e:2d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 3.0 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-ya4ft0w4-ts0601.json b/tests/data/devices/tze200-ya4ft0w4-ts0601.json new file mode 100644 index 00000000..792572b1 --- /dev/null +++ b/tests/data/devices/tze200-ya4ft0w4-ts0601.json @@ -0,0 +1,669 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:82:14:a9:c3", + "nwk": "0x7E88", + "manufacturer": "_TZE200_ya4ft0w4", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_ya4ft0w4", + "friendly_model": "TS0601", + "name": "_TZE200_ya4ft0w4 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.571166+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_ya4ft0w4" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": false + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef04", + "name": "detection_distance_max", + "zcl_type": "uint16", + "value": 900 + }, + { + "id": "0xef03", + "name": "detection_distance_min", + "zcl_type": "uint16", + "value": 75 + }, + { + "id": "0xef09", + "name": "distance", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xef65", + "name": "distance_tracking", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef02", + "name": "move_sensitivity", + "zcl_type": "uint16", + "value": 7 + }, + { + "id": "0xef66", + "name": "presence_sensitivity", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xef69", + "name": "presence_timeout", + "zcl_type": "uint16", + "value": 2 + } + ] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.0, + "native_min_value": 0.75, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 9.0 + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 8.25, + "native_min_value": 0, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0.75 + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-move_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "move_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 7 + } + }, + { + "info_object": { + "fallback_name": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-presence_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "presence_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-presence_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15000, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 2 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": 0.0 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Distance tracking", + "unique_id": "ab:cd:ef:12:82:14:a9:c3-1-distance_tracking", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "distance_tracking", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:82:14:a9:c3:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:82:14:a9:c3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "distance_tracking", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": true, + "inverted": false + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-yw7cahqs-ts0601.json b/tests/data/devices/tze200-yw7cahqs-ts0601.json new file mode 100644 index 00000000..d2ea7b12 --- /dev/null +++ b/tests/data/devices/tze200-yw7cahqs-ts0601.json @@ -0,0 +1,923 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:54:17:e4", + "nwk": "0xE20B", + "manufacturer": "_TZE200_yw7cahqs", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_yw7cahqs", + "friendly_model": "TS0601", + "name": "_TZE200_yw7cahqs TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.596920+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_yw7cahqs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2320 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "value": 0 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef6a", + "name": "away_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef69", + "name": "battery_low", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef28", + "name": "child_lock", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef0a", + "name": "frost_protection", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + }, + { + "id": "0xef82", + "name": "scale_protection", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef6c", + "name": "schedule_enable", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef08", + "name": "window_detection", + "zcl_type": "bool", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 85 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Battery low", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:54:17:e4-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 23.2, + "outdoor_temperature": null, + "target_temperature": 30.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 3000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2NoSchedule", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve position", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-valve_position", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "valve_position", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Away mode", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-away_mode", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "away_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "away_mode", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Schedule enable", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-schedule_enable", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "schedule_enable", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "schedule_enable", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:54:17:e4-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:39:54:17:e4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:54:17:e4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000055", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-1v1dxkck-ts0601.json b/tests/data/devices/tze204-1v1dxkck-ts0601.json new file mode 100644 index 00000000..4ae0df5b --- /dev/null +++ b/tests/data/devices/tze204-1v1dxkck-ts0601.json @@ -0,0 +1,635 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c0:71:6b:96", + "nwk": "0x546A", + "manufacturer": "_TZE204_1v1dxkck", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_1v1dxkck", + "friendly_model": "TS0601", + "name": "_TZE204_1v1dxkck TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaTripleSwitchDimmerGP", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.049469+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_1v1dxkck" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_vm1gyrso", + "TS0601" + ], + [ + "_TZE204_1v1dxkck", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 32, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 32, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 2, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "2:0x0008", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 32, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 32, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-3", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 32, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 32, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:71:6b:96-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c0:71:6b:96:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:71:6b:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-1youk3hj-ts0601.json b/tests/data/devices/tze204-1youk3hj-ts0601.json new file mode 100644 index 00000000..18c99a20 --- /dev/null +++ b/tests/data/devices/tze204-1youk3hj-ts0601.json @@ -0,0 +1,857 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "nwk": "0xC1A5", + "manufacturer": "_TZE204_1youk3hj", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_1youk3hj", + "friendly_model": "TS0601", + "name": "_TZE204_1youk3hj TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.504414+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_1youk3hj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 150, + "native_step": 75, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-fading_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 3, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motionless detection sensitivity", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-motionless_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "motionless_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 7, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Output time", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-output_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "output_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1800, + "native_min_value": 10, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Radar sensitivity", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-radar_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "radar_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 7, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Work mode", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-work_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "work_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotionWorkMode", + "options": [ + "Manual", + "Auto" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Human motion state", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-human_motion_state", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "human_motion_state", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-target_distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "target_distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "LED indicator", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-find_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "led_indicator", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "find_switch", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Output switch", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-output_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "output_switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "output_switch", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f5:c6:9a:7d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c6:9a:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-58of2pfn-ts0601.json b/tests/data/devices/tze204-58of2pfn-ts0601.json new file mode 100644 index 00000000..45087bf6 --- /dev/null +++ b/tests/data/devices/tze204-58of2pfn-ts0601.json @@ -0,0 +1,673 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "nwk": "0xDA1B", + "manufacturer": "_TZE204_58of2pfn", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_58of2pfn", + "friendly_model": "TS0601", + "name": "_TZE204_58of2pfn TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaQuadrupleSwitchGP", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 164, + "rssi": -59, + "last_seen": "2025-10-25T17:49:40.375188+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_58of2pfn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_1n2kyphz", + "TS0601" + ], + [ + "_TZE200_mexisfik", + "TS0601" + ], + [ + "_TZE204_58of2pfn", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-2", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 2, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-3", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-4", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 4, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "4:0x0006", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 4, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 0, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 0, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 164 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -59 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:1c:a6:1f:fb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1c:a6:1f:fb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-5slehgeo-ts0601.json b/tests/data/devices/tze204-5slehgeo-ts0601.json new file mode 100644 index 00000000..d375510e --- /dev/null +++ b/tests/data/devices/tze204-5slehgeo-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c2:dc:68:99", + "nwk": "0x38DB", + "manufacturer": "_TZE204_5slehgeo", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_5slehgeo", + "friendly_model": "TS0601", + "name": "_TZE204_5slehgeo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 136, + "rssi": -77, + "last_seen": "2025-08-01T19:43:04.019176+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_5slehgeo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c2:dc:68:99-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c2:dc:68:99:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:dc:68:99", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 136 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c2:dc:68:99-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c2:dc:68:99:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:dc:68:99", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -77 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c2:dc:68:99-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c2:dc:68:99:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:dc:68:99", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-a2jcoyuk-ts0601.json b/tests/data/devices/tze204-a2jcoyuk-ts0601.json new file mode 100644 index 00000000..9be76217 --- /dev/null +++ b/tests/data/devices/tze204-a2jcoyuk-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5a:34:d8:e0", + "nwk": "0x91C0", + "manufacturer": "_TZE204_a2jcoyuk", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_a2jcoyuk", + "friendly_model": "TS0601", + "name": "_TZE204_a2jcoyuk TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.263864+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_a2jcoyuk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:34:d8:e0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5a:34:d8:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:34:d8:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:34:d8:e0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:5a:34:d8:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:34:d8:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:34:d8:e0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:5a:34:d8:e0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:34:d8:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-aoclfnxz-ts0601.json b/tests/data/devices/tze204-aoclfnxz-ts0601.json new file mode 100644 index 00000000..2b6609b8 --- /dev/null +++ b/tests/data/devices/tze204-aoclfnxz-ts0601.json @@ -0,0 +1,301 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2d:91:c5:14", + "nwk": "0x12A4", + "manufacturer": "_TZE204_aoclfnxz", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_aoclfnxz", + "friendly_model": "TS0601", + "name": "_TZE204_aoclfnxz TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.129591+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_aoclfnxz" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:91:c5:14-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2d:91:c5:14:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:91:c5:14", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:91:c5:14-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2d:91:c5:14:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:91:c5:14", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2d:91:c5:14-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:2d:91:c5:14:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2d:91:c5:14", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-c2fmom5z-ts0601.json b/tests/data/devices/tze204-c2fmom5z-ts0601.json new file mode 100644 index 00000000..5fae24a4 --- /dev/null +++ b/tests/data/devices/tze204-c2fmom5z-ts0601.json @@ -0,0 +1,723 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e1:f5:c9:be", + "nwk": "0x3F2F", + "manufacturer": "_TZE204_c2fmom5z", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_c2fmom5z", + "friendly_model": "TS0601", + "name": "_TZE204_c2fmom5z TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.844134+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_c2fmom5z" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0000", + "name": "count", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0002", + "name": "current_group", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 1850 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 7180 + } + ] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 0.00048699999999999997 + } + ] + }, + { + "cluster_id": "0x042a", + "endpoint_attribute": "pm25", + "attributes": [] + }, + { + "cluster_id": "0x042b", + "endpoint_attribute": "formaldehyde_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 3.4e-05 + } + ] + }, + { + "cluster_id": "0x042e", + "endpoint_attribute": "voc_level", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 1.2e-05 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4417 + }, + { + "id": "0x0009", + "name": "minimum_block_req_delay", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 18.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 71.8 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1037", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "CarbonDioxideConcentration", + "translation_key": null, + "translation_placeholders": null, + "device_class": "carbon_dioxide", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "CarbonDioxideConcentrationClusterHandler", + "generic_id": "cluster_handler_0x040d", + "endpoint_id": 1, + "cluster": { + "id": 1037, + "name": "Carbon Dioxide (CO\u2082) Concentration", + "type": "server" + }, + "id": "1:0x040d", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "CarbonDioxideConcentration", + "available": true, + "state": 486.99999999999994 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1066", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PM25", + "translation_key": null, + "translation_placeholders": null, + "device_class": "pm25", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PM25ClusterHandler", + "generic_id": "cluster_handler_0x042a", + "endpoint_id": 1, + "cluster": { + "id": 1066, + "name": "PM2.5", + "type": "server" + }, + "id": "1:0x042a", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "PM25", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1067", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "FormaldehydeConcentration", + "translation_key": "formaldehyde", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "FormaldehydeConcentrationClusterHandler", + "generic_id": "cluster_handler_0x042b", + "endpoint_id": 1, + "cluster": { + "id": 1067, + "name": "Formaldehyde Concentration", + "type": "server" + }, + "id": "1:0x042b", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "FormaldehydeConcentration", + "available": true, + "state": 34.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-1070", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "VOCLevel", + "translation_key": null, + "translation_placeholders": null, + "device_class": "volatile_organic_compounds", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ClusterHandler", + "generic_id": "cluster_handler_0x042e", + "endpoint_id": 1, + "cluster": { + "id": 1070, + "name": "VOC Level", + "type": "server" + }, + "id": "1:0x042e", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "VOCLevel", + "available": true, + "state": 12.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e1:f5:c9:be-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:e1:f5:c9:be:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e1:f5:c9:be", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-dwcarsat-ts0601.json b/tests/data/devices/tze204-dwcarsat-ts0601.json new file mode 100644 index 00000000..79f282fd --- /dev/null +++ b/tests/data/devices/tze204-dwcarsat-ts0601.json @@ -0,0 +1,602 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:09:0a:75:a0", + "nwk": "0x1397", + "manufacturer": "_TZE204_dwcarsat", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_dwcarsat", + "friendly_model": "TS0601", + "name": "_TZE204_dwcarsat TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.013263+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_dwcarsat" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2350 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 4700 + } + ] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 3e-06 + } + ] + }, + { + "cluster_id": "0x042a", + "endpoint_attribute": "pm25", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 26 + } + ] + }, + { + "cluster_id": "0x042b", + "endpoint_attribute": "formaldehyde_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 0.000477 + } + ] + }, + { + "cluster_id": "0x042e", + "endpoint_attribute": "voc_level", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 0.000126 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 47.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1037", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "CarbonDioxideConcentration", + "translation_key": null, + "translation_placeholders": null, + "device_class": "carbon_dioxide", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "CarbonDioxideConcentrationClusterHandler", + "generic_id": "cluster_handler_0x040d", + "endpoint_id": 1, + "cluster": { + "id": 1037, + "name": "Carbon Dioxide (CO\u2082) Concentration", + "type": "server" + }, + "id": "1:0x040d", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "CarbonDioxideConcentration", + "available": true, + "state": 3.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1066", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PM25", + "translation_key": null, + "translation_placeholders": null, + "device_class": "pm25", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PM25ClusterHandler", + "generic_id": "cluster_handler_0x042a", + "endpoint_id": 1, + "cluster": { + "id": 1066, + "name": "PM2.5", + "type": "server" + }, + "id": "1:0x042a", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "PM25", + "available": true, + "state": 26 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1067", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "FormaldehydeConcentration", + "translation_key": "formaldehyde", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "FormaldehydeConcentrationClusterHandler", + "generic_id": "cluster_handler_0x042b", + "endpoint_id": 1, + "cluster": { + "id": 1067, + "name": "Formaldehyde Concentration", + "type": "server" + }, + "id": "1:0x042b", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "FormaldehydeConcentration", + "available": true, + "state": 477.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-1070", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "VOCLevel", + "translation_key": null, + "translation_placeholders": null, + "device_class": "volatile_organic_compounds", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ClusterHandler", + "generic_id": "cluster_handler_0x042e", + "endpoint_id": 1, + "cluster": { + "id": 1070, + "name": "VOC Level", + "type": "server" + }, + "id": "1:0x042e", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "VOCLevel", + "available": true, + "state": 126.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:09:0a:75:a0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:09:0a:75:a0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:09:0a:75:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-ex3rcdha-ts0601.json b/tests/data/devices/tze204-ex3rcdha-ts0601.json new file mode 100644 index 00000000..62a24cf5 --- /dev/null +++ b/tests/data/devices/tze204-ex3rcdha-ts0601.json @@ -0,0 +1,1196 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d9:08:34:09", + "nwk": "0x244A", + "manufacturer": "_TZE204_ex3rcdha", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ex3rcdha", + "friendly_model": "TS0601", + "name": "_TZE204_ex3rcdha TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.158391+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "OCCUPANCY_SENSOR", + "id": 263 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_ex3rcdha" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Target distance" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 31 + } + ] + }, + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Sensitivity" + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 9 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 1 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.2" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Min range" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 118 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 950 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 10 + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Max range" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 118 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 950 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 10 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 10 + } + ] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Detection delay" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 159 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 20000 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 100 + } + ] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "COMBINED_INTERFACE", + "id": 7 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Fading time" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 159 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 200000 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 2000 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1000 + } + ] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Sensitivity", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 1, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "1:0x000d", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Breath detection max", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-breath_detection_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "breath_detection_max", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Breath detection min", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-breath_detection_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "breath_detection_min", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Breath sensitivity", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-breath_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "breath_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-move_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "move_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-presence_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 180, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Min range", + "unique_id": "ab:cd:ef:12:d9:08:34:09-2-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 2, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "2:0x000d", + "unique_id": "ab:cd:ef:12:d9:08:34:09:2:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 2, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 950, + "native_min_value": 0, + "native_step": 10, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Max range", + "unique_id": "ab:cd:ef:12:d9:08:34:09-3-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 3, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "3:0x000d", + "unique_id": "ab:cd:ef:12:d9:08:34:09:3:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 3, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 950, + "native_min_value": 10, + "native_step": 10, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Detection delay", + "unique_id": "ab:cd:ef:12:d9:08:34:09-4-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 4, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "4:0x000d", + "unique_id": "ab:cd:ef:12:d9:08:34:09:4:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 4, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 20000, + "native_min_value": 0, + "native_step": 100, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:d9:08:34:09-5-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 5, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "5:0x000d", + "unique_id": "ab:cd:ef:12:d9:08:34:09:5:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 200000, + "native_min_value": 2000, + "native_step": 1000, + "native_unit_of_measurement": "ms" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-12-analog_input", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "AnalogInputSensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogInputClusterHandler", + "generic_id": "cluster_handler_0x000c", + "endpoint_id": 1, + "cluster": { + "id": 12, + "name": "AnalogInput", + "type": "server" + }, + "id": "1:0x000c", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x000c", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "AnalogInputSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:08:34:09-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d9:08:34:09:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:08:34:09", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-fhvdgeuh-ts0601.json b/tests/data/devices/tze204-fhvdgeuh-ts0601.json new file mode 100644 index 00000000..d51f2779 --- /dev/null +++ b/tests/data/devices/tze204-fhvdgeuh-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:93:4b:fc:2f", + "nwk": "0xA181", + "manufacturer": "_TZE204_fhvdgeuh", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_fhvdgeuh", + "friendly_model": "TS0601", + "name": "_TZE204_fhvdgeuh TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.656496+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_fhvdgeuh" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:4b:fc:2f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:4b:fc:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:4b:fc:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:4b:fc:2f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:93:4b:fc:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:4b:fc:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:93:4b:fc:2f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:93:4b:fc:2f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:93:4b:fc:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-goecjd1t-ts0601.json b/tests/data/devices/tze204-goecjd1t-ts0601.json new file mode 100644 index 00000000..11b6922c --- /dev/null +++ b/tests/data/devices/tze204-goecjd1t-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:87:3c:45:da", + "nwk": "0x912E", + "manufacturer": "_TZE204_goecjd1t", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_goecjd1t", + "friendly_model": "TS0601", + "name": "_TZE204_goecjd1t TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.467780+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_goecjd1t" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:87:3c:45:da-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:87:3c:45:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:87:3c:45:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:87:3c:45:da-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:87:3c:45:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:87:3c:45:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:87:3c:45:da-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:87:3c:45:da:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:87:3c:45:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-gops3slb-ts0601.json b/tests/data/devices/tze204-gops3slb-ts0601.json new file mode 100644 index 00000000..a8f1299c --- /dev/null +++ b/tests/data/devices/tze204-gops3slb-ts0601.json @@ -0,0 +1,985 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:72:cf:0d:25", + "nwk": "0xC569", + "manufacturer": "_TZE204_gops3slb", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_gops3slb", + "friendly_model": "TS0601", + "name": "_TZE204_gops3slb TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 224, + "rssi": -55, + "last_seen": "2025-07-18T08:18:43.940564+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_gops3slb" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2530 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2250 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Fault alarm", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-fault_alarm", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "fault_alarm", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "fault_alarm" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 40.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 25.3, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "off", + "hvac_mode": "off", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[0]/off", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2250, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 40.0 + } + }, + { + "info_object": { + "fallback_name": "Deadzone temperature", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-deadzone_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "deadzone_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0.5, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.9, + "native_min_value": -9.9, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Backlight mode", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-backlight_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "backlight_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BacklightMode", + "options": [ + "Off", + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Preset mode", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-preset_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "preset_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "PresetModeV02", + "options": [ + "Manual", + "Auto", + "Temporary Manual" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Sensor mode", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-temperature_sensor_select", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "sensor_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SensorMode", + "options": [ + "Air", + "Floor", + "Both" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Working day", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-working_day", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "working_day", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "WorkingDayV02", + "options": [ + "Disabled", + "Five Two", + "Six One", + "Seven" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 224 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -55 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "off" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Factory reset", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-factory_reset", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "factory_reset", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "factory_reset", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:72:cf:0d:25-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:72:cf:0d:25:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:72:cf:0d:25", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-jrcfsaa3-ts0601.json b/tests/data/devices/tze204-jrcfsaa3-ts0601.json new file mode 100644 index 00000000..19673a65 --- /dev/null +++ b/tests/data/devices/tze204-jrcfsaa3-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:92:85:7f:ad", + "nwk": "0xEA6C", + "manufacturer": "_TZE204_jrcfsaa3", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_jrcfsaa3", + "friendly_model": "TS0601", + "name": "_TZE204_jrcfsaa3 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.701759+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_jrcfsaa3" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:92:85:7f:ad-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:92:85:7f:ad:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:85:7f:ad", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:92:85:7f:ad-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:92:85:7f:ad:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:85:7f:ad", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:92:85:7f:ad-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:92:85:7f:ad:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:85:7f:ad", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-l8xiyymq-ts0601.json b/tests/data/devices/tze204-l8xiyymq-ts0601.json new file mode 100644 index 00000000..654565c7 --- /dev/null +++ b/tests/data/devices/tze204-l8xiyymq-ts0601.json @@ -0,0 +1,275 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1e:f8:60:0e", + "nwk": "0xD8D5", + "manufacturer": "_TZE204_l8xiyymq", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_l8xiyymq", + "friendly_model": "TS0601", + "name": "_TZE204_l8xiyymq TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.884742+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_l8xiyymq" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0002", + "name": "current_group", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:f8:60:0e-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1e:f8:60:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:f8:60:0e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:f8:60:0e-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1e:f8:60:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:f8:60:0e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:f8:60:0e-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:1e:f8:60:0e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:f8:60:0e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-lb0fsvba-ts0601.json b/tests/data/devices/tze204-lb0fsvba-ts0601.json new file mode 100644 index 00000000..f5fdf45a --- /dev/null +++ b/tests/data/devices/tze204-lb0fsvba-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a6:30:4a:e7", + "nwk": "0xD20C", + "manufacturer": "_TZE204_lb0fsvba", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_lb0fsvba", + "friendly_model": "TS0601", + "name": "_TZE204_lb0fsvba TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 188, + "rssi": -53, + "last_seen": "2025-10-18T17:23:04.220785+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_lb0fsvba" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:30:4a:e7-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a6:30:4a:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:30:4a:e7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 188 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:30:4a:e7-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a6:30:4a:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:30:4a:e7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -53 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:30:4a:e7-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a6:30:4a:e7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:30:4a:e7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-lbbg34rj-ts0601.json b/tests/data/devices/tze204-lbbg34rj-ts0601.json new file mode 100644 index 00000000..3f97482b --- /dev/null +++ b/tests/data/devices/tze204-lbbg34rj-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4e:2f:91:65", + "nwk": "0xF0EE", + "manufacturer": "_TZE204_lbbg34rj", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_lbbg34rj", + "friendly_model": "TS0601", + "name": "_TZE204_lbbg34rj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.505469+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_lbbg34rj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:2f:91:65-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4e:2f:91:65:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:2f:91:65", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:2f:91:65-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4e:2f:91:65:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:2f:91:65", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:2f:91:65-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4e:2f:91:65:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:2f:91:65", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-lpedvtvr-ts0601.json b/tests/data/devices/tze204-lpedvtvr-ts0601.json new file mode 100644 index 00000000..76cbbc2d --- /dev/null +++ b/tests/data/devices/tze204-lpedvtvr-ts0601.json @@ -0,0 +1,640 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3b:28:22:86", + "nwk": "0xA88C", + "manufacturer": "_TZE204_lpedvtvr", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_lpedvtvr", + "friendly_model": "TS0601", + "name": "_TZE204_lpedvtvr TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.482185+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_lpedvtvr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2150 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0025", + "name": "programing_oper_mode", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 21.5, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": 20.0, + "hvac_action": "idle", + "hvac_mode": "heat_cool", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[1]/heat_cool", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3b:28:22:86-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:3b:28:22:86:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3b:28:22:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-ltwbm23f-ts0601.json b/tests/data/devices/tze204-ltwbm23f-ts0601.json new file mode 100644 index 00000000..a700e96d --- /dev/null +++ b/tests/data/devices/tze204-ltwbm23f-ts0601.json @@ -0,0 +1,1264 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1b:1e:95:0a", + "nwk": "0x616B", + "manufacturer": "_TZE204_ltwbm23f", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ltwbm23f", + "friendly_model": "TS0601", + "name": "_TZE204_ltwbm23f TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.596767+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_ltwbm23f" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1970 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1800 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 1 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef77", + "name": "comfort_temperature", + "zcl_type": "uint16", + "value": 170 + }, + { + "id": "0xef78", + "name": "eco_temperature", + "zcl_type": "uint16", + "value": 200 + }, + { + "id": "0xef2f", + "name": "local_temperature_calibration", + "zcl_type": "int32", + "value": 0 + }, + { + "id": "0xef72", + "name": "valve_position", + "zcl_type": "int16", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-window_open", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "window", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 19.7, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "heating", + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 1800, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Comfort temperature", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-comfort_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "comfort_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 17.0 + } + }, + { + "info_object": { + "fallback_name": "Eco temperature", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-eco_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "eco_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 20.0 + } + }, + { + "info_object": { + "fallback_name": "Holiday temperature", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-holiday_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "holiday_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Max temperature", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-max_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "max_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 15, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Min temperature", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-min_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "min_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-display_brightness", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_brightness", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaDisplayBrightness", + "options": [ + "High", + "Medium", + "Low" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Display orientation", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-display_orientation", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_orientation", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaDisplayOrientation", + "options": [ + "Up", + "Down" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Hysteresis mode", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-hysteresis_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "hysteresis_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaHysteresis", + "options": [ + "Comfort", + "Eco" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motor thrust", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-motor_thrust", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "motor_thrust", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotorThrust", + "options": [ + "Strong", + "Middle", + "Weak" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Preset mode", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-preset_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "preset_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPresetMode", + "options": [ + "Eco", + "Auto", + "Off", + "Heat" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "heating" + } + }, + { + "info_object": { + "fallback_name": "Valve position", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-valve_position", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "valve_position", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": 0.0 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:1e:95:0a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:1b:1e:95:0a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:1e:95:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-m64smti7-ts0601.json b/tests/data/devices/tze204-m64smti7-ts0601.json new file mode 100644 index 00000000..2ef1e8d4 --- /dev/null +++ b/tests/data/devices/tze204-m64smti7-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:34:4e:33:23", + "nwk": "0x4CBF", + "manufacturer": "_TZE204_m64smti7", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_m64smti7", + "friendly_model": "TS0601", + "name": "_TZE204_m64smti7 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.592015+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_m64smti7" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4e:33:23-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:4e:33:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4e:33:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4e:33:23-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:4e:33:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4e:33:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4e:33:23-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:34:4e:33:23:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4e:33:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-m9dzckna-ts0601.json b/tests/data/devices/tze204-m9dzckna-ts0601.json new file mode 100644 index 00000000..1ae559ad --- /dev/null +++ b/tests/data/devices/tze204-m9dzckna-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:69:e0:45:b0", + "nwk": "0x3990", + "manufacturer": "_TZE204_m9dzckna", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_m9dzckna", + "friendly_model": "TS0601", + "name": "_TZE204_m9dzckna TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 216, + "rssi": -57, + "last_seen": "2025-10-01T15:15:47.089702+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_m9dzckna" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:e0:45:b0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:69:e0:45:b0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:e0:45:b0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 216 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:e0:45:b0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:69:e0:45:b0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:e0:45:b0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -57 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:e0:45:b0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:69:e0:45:b0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:e0:45:b0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-mtoaryre-ts0601.json b/tests/data/devices/tze204-mtoaryre-ts0601.json new file mode 100644 index 00000000..f366f344 --- /dev/null +++ b/tests/data/devices/tze204-mtoaryre-ts0601.json @@ -0,0 +1,1080 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:de:e2:3f:ea", + "nwk": "0xD473", + "manufacturer": "_TZE204_mtoaryre", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_mtoaryre", + "friendly_model": "TS0601", + "name": "_TZE204_mtoaryre TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:52.591249+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_mtoaryre" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Block time", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-block_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "block_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 0.1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Detection delay", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-detection_delay", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_delay", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 1, + "native_step": 0.1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.0, + "native_min_value": 0.75, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 8.25, + "native_min_value": 0, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Entry distance indentation", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-entry_distance_indentation", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "entry_distance_indentation", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": 0, + "native_step": 0.1, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Entry sensitivity", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-entry_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "entry_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-fading_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Illuminance threshold", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-illuminance_threshold", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "illuminance_threshold", + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 420, + "native_min_value": 0, + "native_step": 0.1, + "native_unit_of_measurement": "lx" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-move_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "move_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Breaker mode", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-breaker_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "breaker_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBreakerMode", + "options": [ + "Standard", + "Local" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Breaker polarity", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-breaker_polarity", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "breaker_polarity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBreakerPolarity", + "options": [ + "NC", + "NO" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Breaker status", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-breaker_status", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "breaker_status", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaBreakerStatus", + "options": [ + "Off", + "On" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Sensor mode", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-sensor_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "sensor_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotionSensorMode", + "options": [ + "On", + "Off", + "Occupied", + "Unoccupied" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Status indication", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-status_indication", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "status_indication", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaStatusIndication", + "options": [ + "Off", + "On" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:de:e2:3f:ea-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:de:e2:3f:ea:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:de:e2:3f:ea", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-mwomyz5n-ts0601.json b/tests/data/devices/tze204-mwomyz5n-ts0601.json new file mode 100644 index 00000000..8473ef17 --- /dev/null +++ b/tests/data/devices/tze204-mwomyz5n-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a2:f0:cd:10", + "nwk": "0xE2FD", + "manufacturer": "_TZE204_mwomyz5n", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_mwomyz5n", + "friendly_model": "TS0601", + "name": "_TZE204_mwomyz5n TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.263721+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_mwomyz5n" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:f0:cd:10-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:f0:cd:10:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:f0:cd:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:f0:cd:10-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:f0:cd:10:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:f0:cd:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:f0:cd:10-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a2:f0:cd:10:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:f0:cd:10", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-nbkshs6k-ts0601.json b/tests/data/devices/tze204-nbkshs6k-ts0601.json new file mode 100644 index 00000000..0f651a4c --- /dev/null +++ b/tests/data/devices/tze204-nbkshs6k-ts0601.json @@ -0,0 +1,259 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:05:55:11:88", + "nwk": "0xA139", + "manufacturer": "_TZE204_nbkshs6k", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_nbkshs6k", + "friendly_model": "TS0601", + "name": "_TZE204_nbkshs6k TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.414054+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_nbkshs6k" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:05:55:11:88-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:05:55:11:88:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:05:55:11:88", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:05:55:11:88-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:05:55:11:88:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:05:55:11:88", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:05:55:11:88-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:05:55:11:88:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:05:55:11:88", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-nqqylykc-ts0601.json b/tests/data/devices/tze204-nqqylykc-ts0601.json new file mode 100644 index 00000000..9a684bc1 --- /dev/null +++ b/tests/data/devices/tze204-nqqylykc-ts0601.json @@ -0,0 +1,431 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:11:27:8d:66", + "nwk": "0x9574", + "manufacturer": "_TZE204_nqqylykc", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_nqqylykc", + "friendly_model": "TS0601", + "name": "_TZE204_nqqylykc TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaSingleSwitchDimmerGP", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.222797+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_nqqylykc" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_3p5ydos3", + "TS0601" + ], + [ + "_TZE200_ip2akl4w", + "TS0601" + ], + [ + "_TZE200_vucankjx", + "TS0601" + ], + [ + "_TZE200_y8yjulon", + "TS0601" + ], + [ + "_TZE204_n9ctkb6j", + "TS0601" + ], + [ + "_TZE204_vevc4c6g", + "TS0601" + ], + [ + "_TZE204_5cuocqty", + "TS0601" + ], + [ + "_TZE204_nqqylykc", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:27:8d:66-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:11:27:8d:66:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:11:27:8d:66:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:11:27:8d:66", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 32, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 32, + "color_mode": "brightness", + "supported_color_modes": [ + "brightness", + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:27:8d:66-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:11:27:8d:66:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:27:8d:66", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:27:8d:66-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:11:27:8d:66:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:27:8d:66", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:27:8d:66-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:11:27:8d:66:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:27:8d:66", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-nvxorhcj-ts0601.json b/tests/data/devices/tze204-nvxorhcj-ts0601.json new file mode 100644 index 00000000..2e9b6473 --- /dev/null +++ b/tests/data/devices/tze204-nvxorhcj-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:86:22:d1:17", + "nwk": "0x8960", + "manufacturer": "_TZE204_nvxorhcj", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_nvxorhcj", + "friendly_model": "TS0601", + "name": "_TZE204_nvxorhcj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 58, + "rssi": null, + "last_seen": "2025-10-15T00:36:54.046982+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_nvxorhcj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:22:d1:17-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:86:22:d1:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:22:d1:17", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 58 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:22:d1:17-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:86:22:d1:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:22:d1:17", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:22:d1:17-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:86:22:d1:17:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:22:d1:17", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-ogx8u5z6-ts0601.json b/tests/data/devices/tze204-ogx8u5z6-ts0601.json new file mode 100644 index 00000000..65457563 --- /dev/null +++ b/tests/data/devices/tze204-ogx8u5z6-ts0601.json @@ -0,0 +1,674 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "nwk": "0x36A6", + "manufacturer": "_TZE204_ogx8u5z6", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ogx8u5z6", + "friendly_model": "TS0601", + "name": "_TZE204_ogx8u5z6 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.328533+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_ogx8u5z6" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:0a:e8:8b:9f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:e8:8b:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-pcdmj88b-ts0601.json b/tests/data/devices/tze204-pcdmj88b-ts0601.json new file mode 100644 index 00000000..01b87b25 --- /dev/null +++ b/tests/data/devices/tze204-pcdmj88b-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9d:ba:f4:54", + "nwk": "0xAA62", + "manufacturer": "_TZE204_pcdmj88b", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_pcdmj88b", + "friendly_model": "TS0601", + "name": "_TZE204_pcdmj88b TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.935366+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_pcdmj88b" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 73 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:ba:f4:54-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9d:ba:f4:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:ba:f4:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:ba:f4:54-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9d:ba:f4:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:ba:f4:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:ba:f4:54-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:9d:ba:f4:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:ba:f4:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000049", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-pxbjch8m-ts0601.json b/tests/data/devices/tze204-pxbjch8m-ts0601.json new file mode 100644 index 00000000..1b286fc2 --- /dev/null +++ b/tests/data/devices/tze204-pxbjch8m-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f5:71:53:6a", + "nwk": "0xFDB9", + "manufacturer": "_TZE204_pxbjch8m", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_pxbjch8m", + "friendly_model": "TS0601", + "name": "_TZE204_pxbjch8m TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.916770+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_pxbjch8m" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:71:53:6a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:71:53:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:71:53:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:71:53:6a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:71:53:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:71:53:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:71:53:6a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f5:71:53:6a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:71:53:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-qvxrkeif-ts0601.json b/tests/data/devices/tze204-qvxrkeif-ts0601.json new file mode 100644 index 00000000..9664922d --- /dev/null +++ b/tests/data/devices/tze204-qvxrkeif-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:64:8d:3f:7f", + "nwk": "0x83CF", + "manufacturer": "_TZE204_qvxrkeif", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_qvxrkeif", + "friendly_model": "TS0601", + "name": "_TZE204_qvxrkeif TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 255, + "rssi": -26, + "last_seen": "2025-09-28T12:29:47.294061+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_qvxrkeif" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:64:8d:3f:7f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:64:8d:3f:7f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:8d:3f:7f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:64:8d:3f:7f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:64:8d:3f:7f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:8d:3f:7f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -26 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:64:8d:3f:7f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:64:8d:3f:7f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:8d:3f:7f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-qyr2m29i-ts0601.json b/tests/data/devices/tze204-qyr2m29i-ts0601.json new file mode 100644 index 00000000..cdc7690d --- /dev/null +++ b/tests/data/devices/tze204-qyr2m29i-ts0601.json @@ -0,0 +1,1221 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8c:9e:5f:db", + "nwk": "0xAFEE", + "manufacturer": "_TZE204_qyr2m29i", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_qyr2m29i", + "friendly_model": "TS0601", + "name": "_TZE204_qyr2m29i TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.168832+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_qyr2m29i" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-window_open", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "window", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Comfort temperature", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-comfort_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "comfort_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Eco temperature", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-eco_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "eco_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Holiday temperature", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-holiday_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "holiday_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 30, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Max temperature", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-max_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "max_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 15, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Min temperature", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-min_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "min_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-display_brightness", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_brightness", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaDisplayBrightness", + "options": [ + "High", + "Medium", + "Low" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Display orientation", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-display_orientation", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_orientation", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaDisplayOrientation", + "options": [ + "Up", + "Down" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Hysteresis mode", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-hysteresis_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "hysteresis_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaHysteresis", + "options": [ + "Comfort", + "Eco" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motor thrust", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-motor_thrust", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "motor_thrust", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaMotorThrust", + "options": [ + "Strong", + "Middle", + "Weak" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Preset mode", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-preset_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "preset_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPresetMode", + "options": [ + "Eco", + "Auto", + "Off", + "Heat" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve position", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-valve_position", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "valve_position", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:9e:5f:db-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:8c:9e:5f:db:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:9e:5f:db", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-r32ctezx-ts0601.json b/tests/data/devices/tze204-r32ctezx-ts0601.json new file mode 100644 index 00000000..87d34e42 --- /dev/null +++ b/tests/data/devices/tze204-r32ctezx-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:aa:3a:96:23", + "nwk": "0xC0F2", + "manufacturer": "_TZE204_r32ctezx", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_r32ctezx", + "friendly_model": "TS0601", + "name": "_TZE204_r32ctezx TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.539197+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_r32ctezx" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:aa:3a:96:23-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:aa:3a:96:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:aa:3a:96:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:aa:3a:96:23-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:aa:3a:96:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:aa:3a:96:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:aa:3a:96:23-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:aa:3a:96:23:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:aa:3a:96:23", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-rtrmfadk-ts0601.json b/tests/data/devices/tze204-rtrmfadk-ts0601.json new file mode 100644 index 00000000..6e57cca7 --- /dev/null +++ b/tests/data/devices/tze204-rtrmfadk-ts0601.json @@ -0,0 +1,923 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9f:cb:25:01", + "nwk": "0x85FF", + "manufacturer": "_TZE204_rtrmfadk", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_rtrmfadk", + "friendly_model": "TS0601", + "name": "_TZE204_rtrmfadk TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.066015+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_rtrmfadk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 73 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Window open", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-window_open", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "window", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_open" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Max temperature", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-max_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "max_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 15, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Min temperature", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-min_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "min_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Eco mode", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-eco_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "eco_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaThermostatEcoMode", + "options": [ + "Comfort", + "Eco" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-window_detection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "window_detection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9f:cb:25:01-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:9f:cb:25:01:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9f:cb:25:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000049", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-tdhnhhiy-ts0601.json b/tests/data/devices/tze204-tdhnhhiy-ts0601.json new file mode 100644 index 00000000..d6e3d468 --- /dev/null +++ b/tests/data/devices/tze204-tdhnhhiy-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8b:bc:e1:ff", + "nwk": "0x1F4A", + "manufacturer": "_TZE204_tdhnhhiy", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_tdhnhhiy", + "friendly_model": "TS0601", + "name": "_TZE204_tdhnhhiy TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 25, + "rssi": null, + "last_seen": "2025-10-14T23:58:12.316108+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_tdhnhhiy" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:bc:e1:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 25 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:bc:e1:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:8b:bc:e1:ff:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:bc:e1:ff", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-upagmta9-ts0601.json b/tests/data/devices/tze204-upagmta9-ts0601.json new file mode 100644 index 00000000..0c6fde9a --- /dev/null +++ b/tests/data/devices/tze204-upagmta9-ts0601.json @@ -0,0 +1,497 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a2:99:74:4c", + "nwk": "0x833E", + "manufacturer": "_TZE204_upagmta9", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_upagmta9", + "friendly_model": "TS0601", + "name": "_TZE204_upagmta9 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:40.719560+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_upagmta9" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef09", + "name": "display_unit", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-display_unit", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_unit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaTempUnitConvert", + "options": [ + "Celsius", + "Fahrenheit" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Celsius" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AAA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:99:74:4c-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:a2:99:74:4c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:99:74:4c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-uxllnywp-ts0601.json b/tests/data/devices/tze204-uxllnywp-ts0601.json new file mode 100644 index 00000000..b3877c7e --- /dev/null +++ b/tests/data/devices/tze204-uxllnywp-ts0601.json @@ -0,0 +1,656 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6f:d4:0b:68", + "nwk": "0x9FA1", + "manufacturer": "_TZE204_uxllnywp", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_uxllnywp", + "friendly_model": "TS0601", + "name": "_TZE204_uxllnywp TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.808109+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_uxllnywp" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 840, + "native_min_value": 0.75, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 840, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-fading_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 59, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-presence_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "presence_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-target_distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "target_distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "LED indicator", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-find_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "led_indicator", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "find_switch", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:d4:0b:68-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6f:d4:0b:68:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:d4:0b:68", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-w1wwxoja-ts0601.json b/tests/data/devices/tze204-w1wwxoja-ts0601.json new file mode 100644 index 00000000..5debc408 --- /dev/null +++ b/tests/data/devices/tze204-w1wwxoja-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b2:ef:fc:86", + "nwk": "0xDCD7", + "manufacturer": "_TZE204_w1wwxoja", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_w1wwxoja", + "friendly_model": "TS0601", + "name": "_TZE204_w1wwxoja TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.182232+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_w1wwxoja" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b2:ef:fc:86-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b2:ef:fc:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:ef:fc:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b2:ef:fc:86-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:b2:ef:fc:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:ef:fc:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b2:ef:fc:86-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:b2:ef:fc:86:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:ef:fc:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-wbhaespm-ts0601.json b/tests/data/devices/tze204-wbhaespm-ts0601.json new file mode 100644 index 00000000..3615cb8a --- /dev/null +++ b/tests/data/devices/tze204-wbhaespm-ts0601.json @@ -0,0 +1,373 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4f:d5:67:94", + "nwk": "0xB19C", + "manufacturer": "_TZE204_wbhaespm", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_wbhaespm", + "friendly_model": "TS0601", + "name": "_TZE204_wbhaespm TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:53.503525+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_wbhaespm" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000e", + "name": "product_label", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:d5:67:94-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:d5:67:94:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:d5:67:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:d5:67:94-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4f:d5:67:94:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:d5:67:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:d5:67:94-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4f:d5:67:94:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:d5:67:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-xalsoe3m-ts0601.json b/tests/data/devices/tze204-xalsoe3m-ts0601.json new file mode 100644 index 00000000..029752d0 --- /dev/null +++ b/tests/data/devices/tze204-xalsoe3m-ts0601.json @@ -0,0 +1,1060 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:19:d9:fb:05", + "nwk": "0xF42C", + "manufacturer": "_TZE204_xalsoe3m", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_xalsoe3m", + "friendly_model": "TS0601", + "name": "_TZE204_xalsoe3m TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.385181+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_xalsoe3m" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0017", + "name": "min_cool_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 23500 + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0025", + "name": "programing_oper_mode", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0204", + "endpoint_attribute": "thermostat_ui", + "attributes": [ + { + "id": "0x0001", + "name": "keypad_lockout", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "CONSUMPTION_AWARENESS_DEVICE", + "id": 13 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "value": 851968 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Temperature Calibration" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 10 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": -10 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0068", + "name": "relinquish_default", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 0.1 + } + ] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "CONSUMPTION_AWARENESS_DEVICE", + "id": 13 + }, + "in_clusters": [ + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "value": 851968 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Deadzone Temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 5 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0068", + "name": "relinquish_default", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1 + } + ] + } + ], + "out_clusters": [] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": 235.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": 1, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 23500, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-513-max_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MaxHeatSetpointLimit", + "translation_key": "max_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 5.0, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MaxHeatSetpointLimit", + "available": true, + "state": 30.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-513-min_heat_setpoint_limit", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "MinHeatSetpointLimit", + "translation_key": "min_heat_setpoint_limit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 5.0 + } + }, + { + "info_object": { + "fallback_name": "Temperature Calibration", + "unique_id": "ab:cd:ef:12:19:d9:fb:05-3-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 3, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "3:0x000d", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:3:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 3, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": -10, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Deadzone Temperature", + "unique_id": "ab:cd:ef:12:19:d9:fb:05-4-13", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "AnalogOutputNumber", + "translation_key": null, + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "AnalogOutputClusterHandler", + "generic_id": "cluster_handler_0x000d", + "endpoint_id": 4, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "4:0x000d", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:4:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 4, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 5, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-516-keypad_lockout", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "KeypadLockout", + "translation_key": "keypad_lockout", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "UserInterfaceClusterHandler", + "generic_id": "cluster_handler_0x0204", + "endpoint_id": 1, + "cluster": { + "id": 516, + "name": "Thermostat User Interface Configuration", + "type": "server" + }, + "id": "1:0x0204", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "KeypadLockoutEnum", + "options": [ + "Unlock", + "Lock1", + "Lock2", + "Lock3", + "Lock4" + ] + }, + "state": { + "class_name": "KeypadLockout", + "available": true, + "state": "Unlock" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-513-setpoint_change_source_timestamp", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SetpointChangeSourceTimestamp", + "translation_key": "setpoint_change_source_timestamp", + "translation_placeholders": null, + "device_class": "timestamp", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-2-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 2, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "2:0x0006", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:d9:fb:05-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:19:d9:fb:05:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:d9:fb:05", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-xlppj4f5-ts0601.json b/tests/data/devices/tze204-xlppj4f5-ts0601.json new file mode 100644 index 00000000..9f164caa --- /dev/null +++ b/tests/data/devices/tze204-xlppj4f5-ts0601.json @@ -0,0 +1,472 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fd:0b:2a:61", + "nwk": "0x10B7", + "manufacturer": "_TZE204_xlppj4f5", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_xlppj4f5", + "friendly_model": "TS0601", + "name": "_TZE204_xlppj4f5 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.884175+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_xlppj4f5" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": false + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 7 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-1794", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergyMetering", + "translation_key": "instantaneous_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "l/h" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": null, + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": "volume", + "state_class": "total_increasing", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "L" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": null, + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fd:0b:2a:61-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:fd:0b:2a:61:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:0b:2a:61", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-xnbkhhdr-ts0601.json b/tests/data/devices/tze204-xnbkhhdr-ts0601.json new file mode 100644 index 00000000..a5487270 --- /dev/null +++ b/tests/data/devices/tze204-xnbkhhdr-ts0601.json @@ -0,0 +1,893 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:13:86:96:cf", + "nwk": "0xDF46", + "manufacturer": "_TZE204_xnbkhhdr", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_xnbkhhdr", + "friendly_model": "TS0601", + "name": "_TZE204_xnbkhhdr TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:39.564663+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_xnbkhhdr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Fault alarm", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-fault_alarm", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "fault_alarm", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "fault_alarm" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Deadzone temperature", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-deadzone_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "deadzone_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0.5, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.9, + "native_min_value": -9.9, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Backlight mode", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-backlight_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "backlight_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "BacklightMode", + "options": [ + "Off", + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Preset mode", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-preset_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "preset_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "PresetModeV03", + "options": [ + "Auto", + "Manual", + "Temporary Manual" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Sensor mode", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-temperature_sensor_select", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "sensor_mode", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SensorMode", + "options": [ + "Air", + "Floor", + "Both" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Working day", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-working_day", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "working_day", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "WorkingDayV02", + "options": [ + "Disabled", + "Five Two", + "Six One", + "Seven" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Factory reset", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-factory_reset", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "factory_reset", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "factory_reset", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:86:96:cf-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:13:86:96:cf:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:86:96:cf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-ya4ft0w4-ts0601.json b/tests/data/devices/tze204-ya4ft0w4-ts0601.json new file mode 100644 index 00000000..1dca6860 --- /dev/null +++ b/tests/data/devices/tze204-ya4ft0w4-ts0601.json @@ -0,0 +1,703 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:eb:7f:3e:96", + "nwk": "0x3B9E", + "manufacturer": "_TZE204_ya4ft0w4", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ya4ft0w4", + "friendly_model": "TS0601", + "name": "_TZE204_ya4ft0w4 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:41.188817+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_ya4ft0w4" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-1030", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Occupancy", + "translation_key": null, + "translation_placeholders": null, + "device_class": "occupancy", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OccupancySensingClusterHandler", + "generic_id": "cluster_handler_0x0406", + "endpoint_id": 1, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "1:0x0406", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-detection_distance_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9.0, + "native_min_value": 0.75, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-detection_distance_min", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "detection_distance_min", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 8.25, + "native_min_value": 0, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-move_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "move_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-presence_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "presence_sensitivity", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-presence_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fading_time", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15000, + "native_min_value": 1, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-1024", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Illuminance", + "translation_key": null, + "translation_placeholders": null, + "device_class": "illuminance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IlluminanceMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0400", + "endpoint_id": 1, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "1:0x0400", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "distance", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Distance tracking", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-distance_tracking", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "distance_tracking", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "distance_tracking", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:eb:7f:3e:96-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:eb:7f:3e:96:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:eb:7f:3e:96", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-yvx5lh6k-ts0601.json b/tests/data/devices/tze204-yvx5lh6k-ts0601.json new file mode 100644 index 00000000..f1bd27cc --- /dev/null +++ b/tests/data/devices/tze204-yvx5lh6k-ts0601.json @@ -0,0 +1,560 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:59:bb:bf:32", + "nwk": "0x90F3", + "manufacturer": "_TZE204_yvx5lh6k", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_yvx5lh6k", + "friendly_model": "TS0601", + "name": "_TZE204_yvx5lh6k TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.563387+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_yvx5lh6k" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [] + }, + { + "cluster_id": "0x042a", + "endpoint_attribute": "pm25", + "attributes": [] + }, + { + "cluster_id": "0x042b", + "endpoint_attribute": "formaldehyde_concentration", + "attributes": [] + }, + { + "cluster_id": "0x042e", + "endpoint_attribute": "voc_level", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1037", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "CarbonDioxideConcentration", + "translation_key": null, + "translation_placeholders": null, + "device_class": "carbon_dioxide", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "CarbonDioxideConcentrationClusterHandler", + "generic_id": "cluster_handler_0x040d", + "endpoint_id": 1, + "cluster": { + "id": 1037, + "name": "Carbon Dioxide (CO\u2082) Concentration", + "type": "server" + }, + "id": "1:0x040d", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "CarbonDioxideConcentration", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1066", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PM25", + "translation_key": null, + "translation_placeholders": null, + "device_class": "pm25", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PM25ClusterHandler", + "generic_id": "cluster_handler_0x042a", + "endpoint_id": 1, + "cluster": { + "id": 1066, + "name": "PM2.5", + "type": "server" + }, + "id": "1:0x042a", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "PM25", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1067", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "FormaldehydeConcentration", + "translation_key": "formaldehyde", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "FormaldehydeConcentrationClusterHandler", + "generic_id": "cluster_handler_0x042b", + "endpoint_id": 1, + "cluster": { + "id": 1067, + "name": "Formaldehyde Concentration", + "type": "server" + }, + "id": "1:0x042b", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "FormaldehydeConcentration", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-1070", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "VOCLevel", + "translation_key": null, + "translation_placeholders": null, + "device_class": "volatile_organic_compounds", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ClusterHandler", + "generic_id": "cluster_handler_0x042e", + "endpoint_id": 1, + "cluster": { + "id": 1070, + "name": "VOC Level", + "type": "server" + }, + "id": "1:0x042e", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "VOCLevel", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:bb:bf:32-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:59:bb:bf:32:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:bb:bf:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze204-zxkwaztm-ts0601.json b/tests/data/devices/tze204-zxkwaztm-ts0601.json new file mode 100644 index 00000000..6509101a --- /dev/null +++ b/tests/data/devices/tze204-zxkwaztm-ts0601.json @@ -0,0 +1,426 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:90:34:fa:13", + "nwk": "0x75F7", + "manufacturer": "_TZE204_zxkwaztm", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_zxkwaztm", + "friendly_model": "TS0601", + "name": "_TZE204_zxkwaztm TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 180, + "rssi": -55, + "last_seen": "2025-10-13T13:09:55.974816+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_zxkwaztm" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2020 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2000 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:34:fa:13-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:90:34:fa:13:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:90:34:fa:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 20.2, + "outdoor_temperature": null, + "target_temperature": 20.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[4]/heat", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 2000, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:34:fa:13-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:90:34:fa:13:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:34:fa:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 180 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:34:fa:13-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:90:34:fa:13:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:34:fa:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -55 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:34:fa:13-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:90:34:fa:13:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:90:34:fa:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": "idle" + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:34:fa:13-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:90:34:fa:13:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:34:fa:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze20c-zka46xbw-ts0601.json b/tests/data/devices/tze20c-zka46xbw-ts0601.json new file mode 100644 index 00000000..fe166b08 --- /dev/null +++ b/tests/data/devices/tze20c-zka46xbw-ts0601.json @@ -0,0 +1,577 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:46:1c:4f:d5", + "nwk": "0xE084", + "manufacturer": "_TZE20C_zka46xbw", + "model": "TS0601", + "friendly_manufacturer": "_TZE20C_zka46xbw", + "friendly_model": "TS0601", + "name": "_TZE20C_zka46xbw TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.615668+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE20C_zka46xbw" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 82, + 172, + 199, + 254, + 255, + 219, + 180, + 132 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 0 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 81 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "motion", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-6", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "Switch", + "translation_key": "switch", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 0, + "available": true + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:46:1c:4f:d5-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:46:1c:4f:d5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:1c:4f:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000051", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-2gi1hy8s-ts0601.json b/tests/data/devices/tze284-2gi1hy8s-ts0601.json new file mode 100644 index 00000000..2b39078e --- /dev/null +++ b/tests/data/devices/tze284-2gi1hy8s-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:19:ac:4b:2f", + "nwk": "0x9FEF", + "manufacturer": "_TZE284_2gi1hy8s", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_2gi1hy8s", + "friendly_model": "TS0601", + "name": "_TZE284_2gi1hy8s TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.518094+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_2gi1hy8s" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:ac:4b:2f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:ac:4b:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:ac:4b:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:ac:4b:2f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:19:ac:4b:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:ac:4b:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:19:ac:4b:2f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:19:ac:4b:2f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:19:ac:4b:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-7zazvlyn-ts0601.json b/tests/data/devices/tze284-7zazvlyn-ts0601.json new file mode 100644 index 00000000..ad2dedc5 --- /dev/null +++ b/tests/data/devices/tze284-7zazvlyn-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:42:87:b0:e0", + "nwk": "0x1A74", + "manufacturer": "_TZE284_7zazvlyn", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_7zazvlyn", + "friendly_model": "TS0601", + "name": "_TZE284_7zazvlyn TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:53.109742+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 69 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_7zazvlyn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 69 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:87:b0:e0-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:42:87:b0:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:87:b0:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:87:b0:e0-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:42:87:b0:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:87:b0:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:87:b0:e0-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:42:87:b0:e0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:87:b0:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000045", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-81yrt3lo-ts0601.json b/tests/data/devices/tze284-81yrt3lo-ts0601.json new file mode 100644 index 00000000..03933d8b --- /dev/null +++ b/tests/data/devices/tze284-81yrt3lo-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:71:30:aa:82", + "nwk": "0x3102", + "manufacturer": "_TZE284_81yrt3lo", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_81yrt3lo", + "friendly_model": "TS0601", + "name": "_TZE284_81yrt3lo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:51.717094+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_81yrt3lo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:30:aa:82-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:71:30:aa:82:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:30:aa:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:30:aa:82-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:71:30:aa:82:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:30:aa:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:71:30:aa:82-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:71:30:aa:82:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:30:aa:82", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-a2xewxoo-ts0601.json b/tests/data/devices/tze284-a2xewxoo-ts0601.json new file mode 100644 index 00000000..3cd2fee9 --- /dev/null +++ b/tests/data/devices/tze284-a2xewxoo-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ee:07:7f:41", + "nwk": "0x685B", + "manufacturer": "_TZE284_a2xewxoo", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_a2xewxoo", + "friendly_model": "TS0601", + "name": "_TZE284_a2xewxoo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 255, + "rssi": -70, + "last_seen": "2025-05-13T12:25:45.649875+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_a2xewxoo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ee:07:7f:41-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ee:07:7f:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:07:7f:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ee:07:7f:41-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ee:07:7f:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:07:7f:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -70 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ee:07:7f:41-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ee:07:7f:41:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:07:7f:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-aao3yzhs-ts0601.json b/tests/data/devices/tze284-aao3yzhs-ts0601.json new file mode 100644 index 00000000..4ec3e5b4 --- /dev/null +++ b/tests/data/devices/tze284-aao3yzhs-ts0601.json @@ -0,0 +1,416 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:53:b5:37:5e", + "nwk": "0x44FE", + "manufacturer": "_TZE284_aao3yzhs", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_aao3yzhs", + "friendly_model": "TS0601", + "name": "_TZE284_aao3yzhs TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:45.399585+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_aao3yzhs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0408", + "endpoint_attribute": "soil_moisture", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-1032", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SoilMoisture", + "translation_key": "soil_moisture", + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SoilMoistureClusterHandler", + "generic_id": "cluster_handler_0x0408", + "endpoint_id": 1, + "cluster": { + "id": 1032, + "name": "Soil Moisture Measurement", + "type": "server" + }, + "id": "1:0x0408", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "SoilMoisture", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b5:37:5e-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:53:b5:37:5e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b5:37:5e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-c6wv4xyo-ts0601.json b/tests/data/devices/tze284-c6wv4xyo-ts0601.json new file mode 100644 index 00000000..efa150a8 --- /dev/null +++ b/tests/data/devices/tze284-c6wv4xyo-ts0601.json @@ -0,0 +1,679 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cf:73:e2:71", + "nwk": "0x53E7", + "manufacturer": "_TZE284_c6wv4xyo", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_c6wv4xyo", + "friendly_model": "TS0601", + "name": "_TZE284_c6wv4xyo TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:46.225433+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_c6wv4xyo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:73:e2:71-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:cf:73:e2:71:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:73:e2:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-cjbofhxw-ts0601.json b/tests/data/devices/tze284-cjbofhxw-ts0601.json new file mode 100644 index 00000000..c6a45454 --- /dev/null +++ b/tests/data/devices/tze284-cjbofhxw-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c7:6f:d7:98", + "nwk": "0x5DE4", + "manufacturer": "_TZE284_cjbofhxw", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_cjbofhxw", + "friendly_model": "TS0601", + "name": "_TZE284_cjbofhxw TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.359562+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_cjbofhxw" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c7:6f:d7:98-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c7:6f:d7:98:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c7:6f:d7:98", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c7:6f:d7:98-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c7:6f:d7:98:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c7:6f:d7:98", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c7:6f:d7:98-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c7:6f:d7:98:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c7:6f:d7:98", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-dmckrsxg-ts0601.json b/tests/data/devices/tze284-dmckrsxg-ts0601.json new file mode 100644 index 00000000..b5693708 --- /dev/null +++ b/tests/data/devices/tze284-dmckrsxg-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2f:17:8f:32", + "nwk": "0x1895", + "manufacturer": "_TZE284_dmckrsxg", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_dmckrsxg", + "friendly_model": "TS0601", + "name": "_TZE284_dmckrsxg TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 132, + "rssi": -78, + "last_seen": "2025-09-19T08:39:03.899500+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_dmckrsxg" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2f:17:8f:32-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2f:17:8f:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:17:8f:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 132 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2f:17:8f:32-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:2f:17:8f:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:17:8f:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -78 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2f:17:8f:32-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:2f:17:8f:32:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:17:8f:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-f5efvtbv-ts0601.json b/tests/data/devices/tze284-f5efvtbv-ts0601.json new file mode 100644 index 00000000..3ac70987 --- /dev/null +++ b/tests/data/devices/tze284-f5efvtbv-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d6:b2:68:6b", + "nwk": "0xB88F", + "manufacturer": "_TZE284_f5efvtbv", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_f5efvtbv", + "friendly_model": "TS0601", + "name": "_TZE284_f5efvtbv TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 200, + "rssi": -50, + "last_seen": "2025-09-07T03:42:38.939311+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_f5efvtbv" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:b2:68:6b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d6:b2:68:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:b2:68:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 200 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:b2:68:6b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d6:b2:68:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:b2:68:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -50 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:b2:68:6b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d6:b2:68:6b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:b2:68:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-fhvpaltk-ts0601.json b/tests/data/devices/tze284-fhvpaltk-ts0601.json new file mode 100644 index 00000000..5da7244e --- /dev/null +++ b/tests/data/devices/tze284-fhvpaltk-ts0601.json @@ -0,0 +1,695 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:56:b9:75:cd", + "nwk": "0x179B", + "manufacturer": "_TZE284_fhvpaltk", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_fhvpaltk", + "friendly_model": "TS0601", + "name": "_TZE284_fhvpaltk TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 196, + "rssi": -62, + "last_seen": "2025-07-12T12:07:21.491341+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_fhvpaltk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 4 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Irrigation time 1", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_countdown_1", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "valve_countdown_1", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1440, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Irrigation time 2", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_countdown_2", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "valve_countdown_2", + "translation_placeholders": null, + "device_class": "duration", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1440, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "min" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 196 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -62 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": "Irrigation duration 1", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_duration_1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_duration_1", + "translation_placeholders": null, + "device_class": "duration", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "s" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Irrigation duration 2", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_duration_2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irriation_duration_2", + "translation_placeholders": null, + "device_class": "duration", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "s" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Status 1", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_status_1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "valve_status_1", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Status 2", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_status_2", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "valve_status_2", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Valve 1", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_on_off_1", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "valve_on_off_1", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "valve_on_off_1", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Valve 2", + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-valve_on_off_2", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "valve_on_off_2", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "valve_on_off_2", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:56:b9:75:cd-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:56:b9:75:cd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:56:b9:75:cd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-iadro9bf-ts0601.json b/tests/data/devices/tze284-iadro9bf-ts0601.json new file mode 100644 index 00000000..46f317c5 --- /dev/null +++ b/tests/data/devices/tze284-iadro9bf-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6b:c5:77:0a", + "nwk": "0x3C41", + "manufacturer": "_TZE284_iadro9bf", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_iadro9bf", + "friendly_model": "TS0601", + "name": "_TZE284_iadro9bf TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.649939+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_iadro9bf" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:c5:77:0a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:c5:77:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:c5:77:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:c5:77:0a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6b:c5:77:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:c5:77:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:c5:77:0a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6b:c5:77:0a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:c5:77:0a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-kyyu8rbj-ts0601.json b/tests/data/devices/tze284-kyyu8rbj-ts0601.json new file mode 100644 index 00000000..74b95449 --- /dev/null +++ b/tests/data/devices/tze284-kyyu8rbj-ts0601.json @@ -0,0 +1,749 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bf:44:a9:0b", + "nwk": "0x41A3", + "manufacturer": "_TZE284_kyyu8rbj", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_kyyu8rbj", + "friendly_model": "TS0601", + "name": "_TZE284_kyyu8rbj TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:44.114251+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_kyyu8rbj" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000e", + "name": "product_label", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0006", + "name": "standard_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0001", + "name": "time_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "time_zone", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Height from sensor to tank bottom", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-installation_height", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "installation_height", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 400, + "native_min_value": 10, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Height from sensor to liquid level", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-liquid_depth_max", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "liquid_depth_max", + "translation_placeholders": null, + "device_class": "distance", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 400, + "native_min_value": 10, + "native_step": 1, + "native_unit_of_measurement": "cm" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Liquid max percentage", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-max_set", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "max_set", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Liquid minimal percentage", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-mini_set", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "mini_set", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "%" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Liquid state", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-liquid_state", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "liquid_state", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaLiquidState", + "options": [ + "Normal", + "Low", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Liquid depth", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-liquid_depth", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "liquid_depth", + "translation_placeholders": null, + "device_class": "distance", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Liquid level ratio", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-liquid_level_percent", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "liquid_level_percent", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bf:44:a9:0b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:bf:44:a9:0b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:44:a9:0b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-l8xiyymq-ts0601.json b/tests/data/devices/tze284-l8xiyymq-ts0601.json new file mode 100644 index 00000000..e5e970e2 --- /dev/null +++ b/tests/data/devices/tze284-l8xiyymq-ts0601.json @@ -0,0 +1,267 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ff:0c:11:d3", + "nwk": "0xEBB8", + "manufacturer": "_TZE284_l8xiyymq", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_l8xiyymq", + "friendly_model": "TS0601", + "name": "_TZE284_l8xiyymq TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 58, + "rssi": null, + "last_seen": "2025-10-07T20:04:42.268970+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_l8xiyymq" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:0c:11:d3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ff:0c:11:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:0c:11:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 58 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:0c:11:d3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ff:0c:11:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:0c:11:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ff:0c:11:d3-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:ff:0c:11:d3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ff:0c:11:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-ltwbm23f-ts0601.json b/tests/data/devices/tze284-ltwbm23f-ts0601.json new file mode 100644 index 00000000..f71e5f6a --- /dev/null +++ b/tests/data/devices/tze284-ltwbm23f-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f0:2d:69:de", + "nwk": "0x7395", + "manufacturer": "_TZE284_ltwbm23f", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_ltwbm23f", + "friendly_model": "TS0601", + "name": "_TZE284_ltwbm23f TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.240255+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_ltwbm23f" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:2d:69:de-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:2d:69:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:2d:69:de", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:2d:69:de-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f0:2d:69:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:2d:69:de", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:2d:69:de-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f0:2d:69:de:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:2d:69:de", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-myd45weu-ts0601.json b/tests/data/devices/tze284-myd45weu-ts0601.json new file mode 100644 index 00000000..8a37d93b --- /dev/null +++ b/tests/data/devices/tze284-myd45weu-ts0601.json @@ -0,0 +1,453 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:59:b1:e9:9a", + "nwk": "0x4D46", + "manufacturer": "_TZE284_myd45weu", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_myd45weu", + "friendly_model": "TS0601", + "name": "_TZE284_myd45weu TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.062834+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_myd45weu" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0408", + "endpoint_attribute": "soil_moisture", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-1032", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SoilMoisture", + "translation_key": "soil_moisture", + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SoilMoistureClusterHandler", + "generic_id": "cluster_handler_0x0408", + "endpoint_id": 1, + "cluster": { + "id": 1032, + "name": "Soil Moisture Measurement", + "type": "server" + }, + "id": "1:0x0408", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "SoilMoisture", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:59:b1:e9:9a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:59:b1:e9:9a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:b1:e9:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-nklqjk62-ts0601.json b/tests/data/devices/tze284-nklqjk62-ts0601.json new file mode 100644 index 00000000..6cce631f --- /dev/null +++ b/tests/data/devices/tze284-nklqjk62-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:76:83:38:bb", + "nwk": "0x2F7C", + "manufacturer": "_TZE284_nklqjk62", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_nklqjk62", + "friendly_model": "TS0601", + "name": "_TZE284_nklqjk62 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 148, + "rssi": -74, + "last_seen": "2025-10-27T20:25:29.823235+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 78 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_nklqjk62" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 78 + } + ] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY_BASIC", + "id": 97 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0021", + "endpoint_attribute": "green_power", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:83:38:bb-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:76:83:38:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:83:38:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 148 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:83:38:bb-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:76:83:38:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:83:38:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -74 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:83:38:bb-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:76:83:38:bb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:83:38:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004e", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-nnhwcvbk-ts0601.json b/tests/data/devices/tze284-nnhwcvbk-ts0601.json new file mode 100644 index 00000000..cebd9384 --- /dev/null +++ b/tests/data/devices/tze284-nnhwcvbk-ts0601.json @@ -0,0 +1,249 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:15:ef:b2:34", + "nwk": "0xBD12", + "manufacturer": "_TZE284_nnhwcvbk", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_nnhwcvbk", + "friendly_model": "TS0601", + "name": "_TZE284_nnhwcvbk TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 88, + "rssi": -78, + "last_seen": "2025-09-03T11:25:56.681630+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_nnhwcvbk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:ef:b2:34-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:ef:b2:34:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:ef:b2:34", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 88 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:ef:b2:34-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:15:ef:b2:34:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:ef:b2:34", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -78 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:ef:b2:34-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:15:ef:b2:34:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:ef:b2:34", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-o3x45p96-ts0601.json b/tests/data/devices/tze284-o3x45p96-ts0601.json new file mode 100644 index 00000000..0357bb14 --- /dev/null +++ b/tests/data/devices/tze284-o3x45p96-ts0601.json @@ -0,0 +1,679 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4e:95:64:6b", + "nwk": "0x64FC", + "manufacturer": "_TZE284_o3x45p96", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_o3x45p96", + "friendly_model": "TS0601", + "name": "_TZE284_o3x45p96 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.977747+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_o3x45p96" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:95:64:6b-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:4e:95:64:6b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:95:64:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-ogx8u5z6-ts0601.json b/tests/data/devices/tze284-ogx8u5z6-ts0601.json new file mode 100644 index 00000000..aed17ebf --- /dev/null +++ b/tests/data/devices/tze284-ogx8u5z6-ts0601.json @@ -0,0 +1,679 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c0:04:1b:41", + "nwk": "0x5C98", + "manufacturer": "_TZE284_ogx8u5z6", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_ogx8u5z6", + "friendly_model": "TS0601", + "name": "_TZE284_ogx8u5z6 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.806751+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_ogx8u5z6" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 500 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0015", + "name": "min_heat_setpoint_limit", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-error_or_battery_low", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "error_or_battery_low", + "translation_placeholders": null, + "device_class": "problem", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "error_or_battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-513", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "Thermostat", + "translation_key": "thermostat", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 5.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": null, + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": null, + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": null, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": null + }, + "extra_state_attributes": [ + "occupancy", + "occupied_cooling_setpoint", + "occupied_heating_setpoint", + "pi_cooling_demand", + "pi_heating_demand", + "system_mode", + "unoccupied_cooling_setpoint", + "unoccupied_heating_setpoint" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-local_temperature_calibration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "local_temperature_calibration", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": -6, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-513-hvac_action", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ThermostatHVACAction", + "translation_key": "hvac_action", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "ThermostatHVACAction", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-child_lock", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "child_lock", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "child_lock", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Frost protection", + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-frost_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "frost_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "frost_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + }, + { + "info_object": { + "fallback_name": "Scale protection", + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-scale_protection", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "scale_protection", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "scale_protection", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c0:04:1b:41-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:c0:04:1b:41:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c0:04:1b:41", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-oitavov2-ts0601.json b/tests/data/devices/tze284-oitavov2-ts0601.json new file mode 100644 index 00000000..44d42e31 --- /dev/null +++ b/tests/data/devices/tze284-oitavov2-ts0601.json @@ -0,0 +1,485 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:62:26:55:a3", + "nwk": "0xBE49", + "manufacturer": "_TZE284_oitavov2", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_oitavov2", + "friendly_model": "TS0601", + "name": "_TZE284_oitavov2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 184, + "rssi": -54, + "last_seen": "2025-08-22T20:47:43.540827+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_oitavov2" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2700 + } + ] + }, + { + "cluster_id": "0x0408", + "endpoint_attribute": "soil_moisture", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 184 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -54 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 27.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-1032", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SoilMoisture", + "translation_key": "soil_moisture", + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SoilMoistureClusterHandler", + "generic_id": "cluster_handler_0x0408", + "endpoint_id": 1, + "cluster": { + "id": 1032, + "name": "Soil Moisture Measurement", + "type": "server" + }, + "id": "1:0x0408", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "SoilMoisture", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:62:26:55:a3-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:62:26:55:a3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:62:26:55:a3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-rjxqso4a-ts0601.json b/tests/data/devices/tze284-rjxqso4a-ts0601.json new file mode 100644 index 00000000..f80fddbb --- /dev/null +++ b/tests/data/devices/tze284-rjxqso4a-ts0601.json @@ -0,0 +1,526 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6a:91:4e:bb", + "nwk": "0xDFB7", + "manufacturer": "_TZE284_rjxqso4a", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_rjxqso4a", + "friendly_model": "TS0601", + "name": "_TZE284_rjxqso4a TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:54.683023+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_rjxqso4a" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 43 + } + ] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-1280", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "IASZone", + "translation_key": null, + "translation_placeholders": null, + "device_class": "gas", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "IASZoneClusterHandler", + "generic_id": "cluster_handler_0x0500", + "endpoint_id": 1, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "1:0x0500", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": "CO concentration", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-co", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "carbon_monoxide", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "ppm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-self_test_result", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test_result", + "translation_placeholders": null, + "device_class": "enum", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Mute siren", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-mute_siren", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "mute_siren", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "mute_siren", + "invert_attribute_name": null, + "force_inverted": false, + "off_value": 0, + "on_value": 1 + }, + "state": { + "class_name": "ConfigurableAttributeSwitch", + "available": true, + "state": false, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:91:4e:bb-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:6a:91:4e:bb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:91:4e:bb", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-rqcuwlsa-ts0601.json b/tests/data/devices/tze284-rqcuwlsa-ts0601.json new file mode 100644 index 00000000..f4395b0c --- /dev/null +++ b/tests/data/devices/tze284-rqcuwlsa-ts0601.json @@ -0,0 +1,479 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d2:7a:53:32", + "nwk": "0x2151", + "manufacturer": "_TZE284_rqcuwlsa", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_rqcuwlsa", + "friendly_model": "TS0601", + "name": "_TZE284_rqcuwlsa TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:08:50.671321+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_rqcuwlsa" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 1480 + } + ] + }, + { + "cluster_id": "0x0408", + "endpoint_attribute": "soil_moisture", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 2200 + } + ] + }, + { + "cluster_id": "0x040a", + "endpoint_attribute": "electrical_conductivity", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 14.8 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-1032", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SoilMoisture", + "translation_key": "soil_moisture", + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SoilMoistureClusterHandler", + "generic_id": "cluster_handler_0x0408", + "endpoint_id": 1, + "cluster": { + "id": 1032, + "name": "Soil Moisture Measurement", + "type": "server" + }, + "id": "1:0x0408", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "SoilMoisture", + "available": true, + "state": 22.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-1034", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalConductivity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "conductivity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalConductivityClusterHandler", + "generic_id": "cluster_handler_0x040a", + "endpoint_id": 1, + "cluster": { + "id": 1034, + "name": "Electrical Conductivity", + "type": "server" + }, + "id": "1:0x040a", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x040a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b5S/cm" + }, + "state": { + "class_name": "ElectricalConductivity", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:7a:53:32-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:d2:7a:53:32:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:7a:53:32", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": null, + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-upagmta9-ts0601.json b/tests/data/devices/tze284-upagmta9-ts0601.json new file mode 100644 index 00000000..b806de9c --- /dev/null +++ b/tests/data/devices/tze284-upagmta9-ts0601.json @@ -0,0 +1,478 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:10:4c:9a:94", + "nwk": "0x38F1", + "manufacturer": "_TZE284_upagmta9", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_upagmta9", + "friendly_model": "TS0601", + "name": "_TZE284_upagmta9 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -34, + "last_seen": "2025-07-04T19:55:07.619600+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_upagmta9" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 15 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 4 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-display_unit", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "display_unit", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TuyaClusterHandler", + "generic_id": "cluster_handler_0xef00", + "endpoint_id": 1, + "cluster": { + "id": 61184, + "name": "Tuya Manufacturer Specific", + "type": "server" + }, + "id": "1:0xef00", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaTempUnitConvert", + "options": [ + "Celsius", + "Fahrenheit" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -34 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-1", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Battery", + "translation_key": null, + "translation_placeholders": null, + "device_class": "battery", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PowerConfigurationClusterHandler", + "generic_id": "cluster_handler_0x0001", + "endpoint_id": 1, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "1:0x0001", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "AAA", + "battery_quantity": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-1026", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Temperature", + "translation_key": null, + "translation_placeholders": null, + "device_class": "temperature", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 1, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "1:0x0402", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-1029", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Humidity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "humidity", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "RelativeHumidityClusterHandler", + "generic_id": "cluster_handler_0x0405", + "endpoint_id": 1, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "1:0x0405", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:10:4c:9a:94-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:10:4c:9a:94:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:10:4c:9a:94", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-vawy74yh-ts0601.json b/tests/data/devices/tze284-vawy74yh-ts0601.json new file mode 100644 index 00000000..71789a31 --- /dev/null +++ b/tests/data/devices/tze284-vawy74yh-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:6f:28:8a", + "nwk": "0x527A", + "manufacturer": "_TZE284_vawy74yh", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_vawy74yh", + "friendly_model": "TS0601", + "name": "_TZE284_vawy74yh TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -40, + "last_seen": "2025-07-23T10:15:08.248768+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_vawy74yh" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:6f:28:8a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:6f:28:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:28:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:6f:28:8a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:39:6f:28:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:28:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -40 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:6f:28:8a-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:39:6f:28:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:28:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-vuwtqx0t-ts0601.json b/tests/data/devices/tze284-vuwtqx0t-ts0601.json new file mode 100644 index 00000000..c99f14bb --- /dev/null +++ b/tests/data/devices/tze284-vuwtqx0t-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f5:c9:76:a5", + "nwk": "0xE5F5", + "manufacturer": "_TZE284_vuwtqx0t", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_vuwtqx0t", + "friendly_model": "TS0601", + "name": "_TZE284_vuwtqx0t TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -30, + "last_seen": "2025-08-22T09:52:55.700709+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_vuwtqx0t" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c9:76:a5-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:c9:76:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c9:76:a5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c9:76:a5-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:f5:c9:76:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c9:76:a5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -30 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f5:c9:76:a5-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:f5:c9:76:a5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f5:c9:76:a5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-wtikaxzs-ts0601.json b/tests/data/devices/tze284-wtikaxzs-ts0601.json new file mode 100644 index 00000000..7ef2daa0 --- /dev/null +++ b/tests/data/devices/tze284-wtikaxzs-ts0601.json @@ -0,0 +1,249 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:13:75:cc:9f", + "nwk": "0x1339", + "manufacturer": "_TZE284_wtikaxzs", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_wtikaxzs", + "friendly_model": "TS0601", + "name": "_TZE284_wtikaxzs TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.594464+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_wtikaxzs" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:75:cc:9f-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:13:75:cc:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:75:cc:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:75:cc:9f-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:13:75:cc:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:75:cc:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:13:75:cc:9f-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:13:75:cc:9f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:13:75:cc:9f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-zjhoqbrd-ts0601.json b/tests/data/devices/tze284-zjhoqbrd-ts0601.json new file mode 100644 index 00000000..35d87cc0 --- /dev/null +++ b/tests/data/devices/tze284-zjhoqbrd-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cf:61:e4:86", + "nwk": "0xCA2C", + "manufacturer": "_TZE284_zjhoqbrd", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_zjhoqbrd", + "friendly_model": "TS0601", + "name": "_TZE284_zjhoqbrd TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -32, + "last_seen": "2025-09-29T09:49:45.989946+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_zjhoqbrd" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 77 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:61:e4:86-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cf:61:e4:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:61:e4:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:61:e4:86-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:cf:61:e4:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:61:e4:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -32 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:61:e4:86-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:cf:61:e4:86:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:61:e4:86", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004d", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-zm8zpwas-ts0601.json b/tests/data/devices/tze284-zm8zpwas-ts0601.json new file mode 100644 index 00000000..855fbff7 --- /dev/null +++ b/tests/data/devices/tze284-zm8zpwas-ts0601.json @@ -0,0 +1,261 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:34:4b:0f:b2", + "nwk": "0x10F0", + "manufacturer": "_TZE284_zm8zpwas", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_zm8zpwas", + "friendly_model": "TS0601", + "name": "_TZE284_zm8zpwas TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-08-28T13:26:09.627084+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 4417, + "maximum_buffer_size": 66, + "maximum_incoming_transfer_size": 66, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 66, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_zm8zpwas" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 80 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4b:0f:b2-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:4b:0f:b2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4b:0f:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4b:0f:b2-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:34:4b:0f:b2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4b:0f:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:4b:0f:b2-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:34:4b:0f:b2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:4b:0f:b2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000050", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze284-znvwzxkq-ts0601.json b/tests/data/devices/tze284-znvwzxkq-ts0601.json new file mode 100644 index 00000000..0fc11139 --- /dev/null +++ b/tests/data/devices/tze284-znvwzxkq-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:12:bb:1b:9d", + "nwk": "0x2DC5", + "manufacturer": "_TZE284_znvwzxkq", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_znvwzxkq", + "friendly_model": "TS0601", + "name": "_TZE284_znvwzxkq TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:43.439474+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4098, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_znvwzxkq" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 74 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:12:bb:1b:9d-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:12:bb:1b:9d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:12:bb:1b:9d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:12:bb:1b:9d-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:12:bb:1b:9d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:12:bb:1b:9d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:12:bb:1b:9d-1-25-firmware_update", + "migrate_unique_ids": [], + "platform": "update", + "class_name": "FirmwareUpdateEntity", + "translation_key": null, + "translation_placeholders": null, + "device_class": "firmware", + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OtaClientClusterHandler", + "generic_id": "cluster_handler_0x0019_client", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "1:0x0019_client", + "unique_id": "ab:cd:ef:12:12:bb:1b:9d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:12:bb:1b:9d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000004a", + "in_progress": false, + "update_percentage": null, + "latest_version": null, + "release_summary": null, + "release_notes": null, + "release_url": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/xyzroe-diy-zintercom.json b/tests/data/devices/xyzroe-diy-zintercom.json new file mode 100644 index 00000000..2116a10f --- /dev/null +++ b/tests/data/devices/xyzroe-diy-zintercom.json @@ -0,0 +1,229 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0a:c9:43:1a", + "nwk": "0x1927", + "manufacturer": "xyzroe", + "model": "DIY_Zintercom", + "friendly_manufacturer": "xyzroe", + "friendly_model": "DIY_Zintercom", + "name": "xyzroe DIY_Zintercom", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.287040+00:00", + "available": true, + "device_type": "EndDevice", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "EndDevice", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 128, + "manufacturer_code": 0, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 160, + "server_mask": 0, + "maximum_outgoing_transfer_size": 160, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SIMPLE_SENSOR", + "id": 12 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "xyzroe" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "DIY_Zintercom" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0101", + "endpoint_attribute": "door_lock", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:c9:43:1a-1-6", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Opening", + "translation_key": null, + "translation_placeholders": null, + "device_class": "opening", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:0a:c9:43:1a:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0a:c9:43:1a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:c9:43:1a-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0a:c9:43:1a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:c9:43:1a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0a:c9:43:1a-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:0a:c9:43:1a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0a:c9:43:1a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/zbeacon-ts0001.json b/tests/data/devices/zbeacon-ts0001.json new file mode 100644 index 00000000..9e7def39 --- /dev/null +++ b/tests/data/devices/zbeacon-ts0001.json @@ -0,0 +1,403 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c6:20:7e:d6", + "nwk": "0x2944", + "manufacturer": "Zbeacon", + "model": "TS0001", + "friendly_manufacturer": "Zbeacon", + "friendly_model": "TS0001", + "name": "Zbeacon TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": 140, + "rssi": -65, + "last_seen": "2025-10-15T12:44:42.446604+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4107, + "maximum_buffer_size": 74, + "maximum_incoming_transfer_size": 404, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 404, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 147 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Zbeacon" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0x1888", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c6:20:7e:d6-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:c6:20:7e:d6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c6:20:7e:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c6:20:7e:d6-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:c6:20:7e:d6:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:c6:20:7e:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": null, + "xy_color": null, + "color_temp": null, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 8, + "color_mode": "onoff", + "supported_color_modes": [ + "onoff" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c6:20:7e:d6-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:c6:20:7e:d6:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:c6:20:7e:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "PreviousValue" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c6:20:7e:d6-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c6:20:7e:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c6:20:7e:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 140 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c6:20:7e:d6-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c6:20:7e:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c6:20:7e:d6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -65 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/zbeacon-ts0505.json b/tests/data/devices/zbeacon-ts0505.json new file mode 100644 index 00000000..2100c3ab --- /dev/null +++ b/tests/data/devices/zbeacon-ts0505.json @@ -0,0 +1,1173 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ba:80:83:70", + "nwk": "0xE88F", + "manufacturer": "zbeacon", + "model": "TS0505", + "friendly_manufacturer": "zbeacon", + "friendly_model": "TS0505", + "name": "zbeacon TS0505", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "quirk_id": null, + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-10-28T18:05:42.713447+00:00", + "available": true, + "device_type": "Router", + "active_coordinator": false, + "node_descriptor": { + "logical_type": "Router", + "complex_descriptor_available": false, + "user_descriptor_available": false, + "reserved": 0, + "aps_flags": 0, + "frequency_band": 8, + "mac_capability_flags": 142, + "manufacturer_code": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "zbeacon" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0505" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 126 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 67 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 25 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 149 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 10040 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 3116 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 200 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-3", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "IdentifyButton", + "translation_key": null, + "translation_placeholders": null, + "device_class": "identify", + "state_class": null, + "entity_category": "diagnostic", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IdentifyClusterHandler", + "generic_id": "cluster_handler_0x0003", + "endpoint_id": 1, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "1:0x0003", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "Light", + "translation_key": "light", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": true, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + }, + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 126, + "xy_color": [ + 0.15320057984283209, + 0.04754711223010605 + ], + "color_temp": 153, + "effect_list": [ + "off" + ], + "effect": "off", + "supported_features": 40, + "color_mode": "color_temp", + "supported_color_modes": [ + "brightness", + "color_temp", + "onoff", + "xy" + ], + "off_with_transition": false, + "off_brightness": null, + "available": true + }, + "extra_state_attributes": [ + "off_brightness", + "off_with_transition" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-768-start_up_color_temperature", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpColorTemperatureConfigurationEntity", + "translation_key": "start_up_color_temperature", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ColorClusterHandler", + "generic_id": "cluster_handler_0x0300", + "endpoint_id": 1, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "1:0x0300", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 500, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 200 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-8-off_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OffTransitionTimeConfigurationEntity", + "translation_key": "off_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OffTransitionTimeConfigurationEntity", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-8-on_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnLevelConfigurationEntity", + "translation_key": "on_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnLevelConfigurationEntity", + "available": true, + "state": 255 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-8-on_transition_time", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "OnTransitionTimeConfigurationEntity", + "translation_key": "on_transition_time", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 65534, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "OnTransitionTimeConfigurationEntity", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-8-start_up_current_level", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "StartUpCurrentLevelConfigurationEntity", + "translation_key": "start_up_current_level", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "LevelControlClusterHandler", + "generic_id": "cluster_handler_0x0008", + "endpoint_id": 1, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "1:0x0008", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 255, + "native_min_value": 0, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpCurrentLevelConfigurationEntity", + "available": true, + "state": 67 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-6-StartUpOnOff", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "StartupOnOffSelectEntity", + "translation_key": "start_up_on_off", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "OnOffClusterHandler", + "generic_id": "cluster_handler_0x0006", + "endpoint_id": 1, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "1:0x0006", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StartUpOnOff", + "options": [ + "Off", + "On", + "Toggle", + "PreviousValue" + ] + }, + "state": { + "class_name": "StartupOnOffSelectEntity", + "available": true, + "state": "Toggle" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-0-lqi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "LQISensor", + "translation_key": "lqi", + "translation_placeholders": null, + "device_class": null, + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-0-rssi", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "RSSISensor", + "translation_key": "rssi", + "translation_placeholders": null, + "device_class": "signal_strength", + "state_class": "measurement", + "entity_category": "diagnostic", + "entity_registry_enabled_default": false, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "BasicClusterHandler", + "generic_id": "cluster_handler_0x0000", + "endpoint_id": 1, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-1794", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergyMetering", + "translation_key": "instantaneous_demand", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": null, + "zcl_unit_of_measurement": null + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-1794-summation_delivered", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummation", + "translation_key": "summation_delivered", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "MeteringClusterHandler", + "generic_id": "cluster_handler_0x0702", + "endpoint_id": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": null + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": null, + "zcl_unit_of_measurement": null + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "PolledElectricalMeasurement", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820-ac_frequency", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementFrequency", + "translation_key": "ac_frequency", + "translation_placeholders": null, + "device_class": "frequency", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820-apparent_power", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementApparentPower", + "translation_key": null, + "translation_placeholders": null, + "device_class": "apparent_power", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820-power_factor", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementPowerFactor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "power_factor", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820-rms_current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrent", + "translation_key": null, + "translation_placeholders": null, + "device_class": "current", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:80:83:70-1-2820-rms_voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltage", + "translation_key": null, + "translation_placeholders": null, + "device_class": "voltage", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "ElectricalMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0b04", + "endpoint_id": 1, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "1:0x0b04", + "unique_id": "ab:cd:ef:12:ba:80:83:70:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:ba:80:83:70", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": null + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file