From 879094416d1e296a866241974278d01f75074d80 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:44:06 -0500 Subject: [PATCH 1/5] Be more cautious about failed imports when loading diagnostics --- tools/import_diagnostics.py | 218 +++++++++++++++++++++++++++++------- 1 file changed, 176 insertions(+), 42 deletions(-) diff --git a/tools/import_diagnostics.py b/tools/import_diagnostics.py index ee8a823d0..75e1fcb5c 100644 --- a/tools/import_diagnostics.py +++ b/tools/import_diagnostics.py @@ -1,9 +1,12 @@ """Import device diagnostics JSON from Home Assistant ZHA diagnostics.""" +from __future__ import annotations + import sys sys.path.insert(0, "tests") +import ast import asyncio import contextlib from contextlib import suppress @@ -11,7 +14,9 @@ import json import logging import pathlib +import re import time +from typing import Any from unittest.mock import AsyncMock, patch from slugify import slugify @@ -31,6 +36,11 @@ _LOGGER = logging.getLogger(__name__) REPO_ROOT = pathlib.Path(__file__).parent.parent +# Old node descriptors were stored as strings +NODE_DESCRIPTOR_REGEX = re.compile( + r"NodeDescriptor\(logical_type=<.*?: (?P\d+)\>, complex_descriptor_available=(?P\w+), user_descriptor_available=(?P\w+), reserved=(?P\d+), aps_flags=(?P\d+), frequency_band=<.*?(?P\d+)>, mac_capability_flags=<.*?: (?P\d+)>, manufacturer_code=(?P\d+), maximum_buffer_size=(?P\d+), maximum_incoming_transfer_size=(?P\d+), server_mask=(?P\d+), maximum_outgoing_transfer_size=(?P\d+), descriptor_capability_field=<.*?: (?P\d+)>," +) + def ieee_from_manufacturer_model(manufacturer: str, model: str) -> zigpy.types.EUI64: """Generate a fake IEEE address based on the manufacturer and model.""" @@ -38,19 +48,107 @@ def ieee_from_manufacturer_model(manufacturer: str, model: str) -> zigpy.types.E return zigpy.types.EUI64.convert("abcdef12" + ieee_hash[:8]) -def zigpy_device_from_legacy_diagnostics( +def parse_legacy_value(value: Any) -> Any: + """Parse a legacy attribute value from diagnostics JSON.""" + if isinstance(value, dict): + if value.get("__type") in ( + "", + "", + ".LimitedLVBytes'>", + ): + result = ast.literal_eval(value["repr"]) + + # Bad Tuya custom quirk, ignore + if ( + result + == b"\x00\x05\x00d\x00\x05\x00\x1e\x00<\x00\x00\x00\x00\x00\x00\x00" + ): + return None + + return result + elif set(value.keys()) == {"field_1", "temperature"}: + # Old, invalid attribute converter for Tuya air CO quality sensors + return value["field_1"].to_bytes(2, "big") + value["temperature"].to_bytes( + 2, "big" + ) + else: + raise ValueError(f"Unknown legacy value dict: {value}") + + return value + + +def zigpy_device_from_legacy_diagnostics( # noqa: C901 app: ControllerApplication, data: dict, patch_cluster: bool = True, -) -> zigpy.device.Device: +) -> zigpy.device.Device | None: """Make a fake device using the specified cluster classes.""" device_data = data["data"] + # Unrelated diagnostics + if "nwk" not in device_data: + return None + nwk = device_data["nwk"] manufacturer = device_data["manufacturer"] model = device_data["model"] - node_descriptor = device_data["signature"]["node_descriptor"] + + if isinstance(device_data["signature"]["node_descriptor"], str): + match = NODE_DESCRIPTOR_REGEX.search( + device_data["signature"]["node_descriptor"] + ) + assert match is not None + node_desc = zdo_t.NodeDescriptor( + logical_type=int(match.group("logical_type")), + complex_descriptor_available=int( + match.group("complex_descriptor_available") + ), + user_descriptor_available=int(match.group("user_descriptor_available")), + reserved=int(match.group("reserved")), + aps_flags=int(match.group("aps_flags")), + frequency_band=int(match.group("frequency_band")), + mac_capability_flags=int(match.group("mac_capability_flags")), + manufacturer_code=int(match.group("manufacturer_code")), + maximum_buffer_size=int(match.group("maximum_buffer_size")), + maximum_incoming_transfer_size=int( + match.group("maximum_incoming_transfer_size") + ), + server_mask=int(match.group("server_mask")), + maximum_outgoing_transfer_size=int( + match.group("maximum_outgoing_transfer_size") + ), + descriptor_capability_field=int(match.group("descriptor_capability_field")), + ) + else: + node_descriptor = device_data["signature"]["node_descriptor"] + node_desc = zdo_t.NodeDescriptor( + logical_type=node_descriptor["logical_type"], + complex_descriptor_available=node_descriptor[ + "complex_descriptor_available" + ], + user_descriptor_available=node_descriptor["user_descriptor_available"], + reserved=node_descriptor["reserved"], + aps_flags=node_descriptor["aps_flags"], + frequency_band=node_descriptor["frequency_band"], + mac_capability_flags=node_descriptor["mac_capability_flags"], + manufacturer_code=node_descriptor["manufacturer_code"], + maximum_buffer_size=node_descriptor["maximum_buffer_size"], + maximum_incoming_transfer_size=node_descriptor[ + "maximum_incoming_transfer_size" + ], + server_mask=node_descriptor["server_mask"], + maximum_outgoing_transfer_size=node_descriptor[ + "maximum_outgoing_transfer_size" + ], + descriptor_capability_field=node_descriptor["descriptor_capability_field"], + ) + endpoints = device_data["signature"]["endpoints"] + + # Older diagnostics did not expose the attribute cache and thus cannot be used + if "cluster_details" not in device_data: + return None + cluster_data = device_data["cluster_details"] # Generate a unique IEEE address based on the manufacturer and model, since the @@ -61,29 +159,14 @@ def zigpy_device_from_legacy_diagnostics( device.manufacturer = manufacturer device.model = model - node_desc = zdo_t.NodeDescriptor( - logical_type=node_descriptor["logical_type"], - complex_descriptor_available=node_descriptor["complex_descriptor_available"], - user_descriptor_available=node_descriptor["user_descriptor_available"], - reserved=node_descriptor["reserved"], - aps_flags=node_descriptor["aps_flags"], - frequency_band=node_descriptor["frequency_band"], - mac_capability_flags=node_descriptor["mac_capability_flags"], - manufacturer_code=node_descriptor["manufacturer_code"], - maximum_buffer_size=node_descriptor["maximum_buffer_size"], - maximum_incoming_transfer_size=node_descriptor[ - "maximum_incoming_transfer_size" - ], - server_mask=node_descriptor["server_mask"], - maximum_outgoing_transfer_size=node_descriptor[ - "maximum_outgoing_transfer_size" - ], - descriptor_capability_field=node_descriptor["descriptor_capability_field"], - ) device.node_desc = node_desc device.last_seen = time.time() for epid, ep in endpoints.items(): + # Old diagnostics just used strings for clusters, there was no cache + if "in_clusters" in ep and isinstance(ep["in_clusters"], list): + return None + endpoint = device.add_endpoint(int(epid)) profile = None with suppress(Exception): @@ -94,9 +177,14 @@ def zigpy_device_from_legacy_diagnostics( if profile else int(ep["device_type"], 16) ) - endpoint.profile_id = ( - profile.PROFILE_ID if profile else int(ep["profile_id"], 16) - ) + + if profile: + endpoint.profile_id = profile.PROFILE_ID + elif isinstance(ep["profile_id"], int): + endpoint.profile_id = ep["profile_id"] + else: + endpoint.profile_id = int(ep["profile_id"], 16) + endpoint.request = AsyncMock(return_value=[0]) for cluster_id in ep["input_clusters"]: @@ -110,17 +198,33 @@ def zigpy_device_from_legacy_diagnostics( for epid, ep in cluster_data.items(): endpoint.request = AsyncMock(return_value=[0]) for cluster_id, cluster in ep["in_clusters"].items(): - real_cluster = device.endpoints[int(epid)].in_clusters[int(cluster_id, 16)] + try: + real_cluster = device.endpoints[int(epid)].in_clusters[ + int(cluster_id, 16) + ] + except KeyError: + _LOGGER.warning( + "Failed to find server cluster 0x%s on endpoint %s: %s", + cluster_id, + epid, + cluster, + ) + continue + if patch_cluster: patch_cluster_for_testing(real_cluster) for attr_id, attr in cluster["attributes"].items(): if ( - attr["value"] is None + attr.get("value", None) is None or attr_id in cluster["unsupported_attributes"] ): continue - real_cluster._attr_cache[int(attr_id, 16)] = attr["value"] - real_cluster.PLUGGED_ATTR_READS[int(attr_id, 16)] = attr["value"] + real_cluster._attr_cache[int(attr_id, 16)] = parse_legacy_value( + attr["value"] + ) + real_cluster.PLUGGED_ATTR_READS[int(attr_id, 16)] = parse_legacy_value( + attr["value"] + ) for unsupported_attr in cluster["unsupported_attributes"]: if isinstance(unsupported_attr, str) and unsupported_attr.startswith( "0x" @@ -135,17 +239,33 @@ def zigpy_device_from_legacy_diagnostics( real_cluster.unsupported_attributes.add(unsupported_attr) for cluster_id, cluster in ep["out_clusters"].items(): - real_cluster = device.endpoints[int(epid)].out_clusters[int(cluster_id, 16)] + try: + real_cluster = device.endpoints[int(epid)].out_clusters[ + int(cluster_id, 16) + ] + except KeyError: + _LOGGER.warning( + "Failed to find client cluster 0x%s on endpoint %s: %s", + cluster_id, + epid, + cluster, + ) + continue + if patch_cluster: patch_cluster_for_testing(real_cluster) for attr_id, attr in cluster["attributes"].items(): if ( - attr["value"] is None + attr.get("value", None) is None or attr_id in cluster["unsupported_attributes"] ): continue - real_cluster._attr_cache[int(attr_id, 16)] = attr["value"] - real_cluster.PLUGGED_ATTR_READS[int(attr_id, 16)] = attr["value"] + real_cluster._attr_cache[int(attr_id, 16)] = parse_legacy_value( + attr["value"] + ) + real_cluster.PLUGGED_ATTR_READS[int(attr_id, 16)] = parse_legacy_value( + attr["value"] + ) for unsupported_attr in cluster["unsupported_attributes"]: if isinstance(unsupported_attr, str) and unsupported_attr.startswith( "0x" @@ -159,6 +279,9 @@ def zigpy_device_from_legacy_diagnostics( else: real_cluster.unsupported_attributes.add(unsupported_attr) + if device.model is None and device.manufacturer is None: + return None + return device @@ -166,10 +289,10 @@ def zigpy_device_from_diagnostics( app: ControllerApplication, data: dict, patch_cluster: bool = True, -) -> zigpy.device.Device: +) -> zigpy.device.Device | None: """Create a zigpy device from diagnostics JSON, both modern and legacy formats.""" - if "home_assistant" not in data: - raise ValueError("Invalid diagnostics JSON, missing 'home_assistant' key") + if "data" not in data: + return None zha_data = data["data"] @@ -208,13 +331,24 @@ async def main(paths: list[str]): """Entry point.""" async with create_zha_gateway() as zha_gateway: for path in map(pathlib.Path, paths): + _LOGGER.debug("Considering %r", path) + try: - zigpy_device = zigpy_device_from_diagnostics( - zha_gateway.application_controller, - json.loads(path.read_text()), - ) - except Exception: - _LOGGER.warning("Failed to import %s", path, exc_info=True) + data = json.loads(path.read_text()) + except json.JSONDecodeError: + _LOGGER.debug("Skipping, not valid JSON") + continue + + if "home_assistant" not in data: + _LOGGER.debug("Skipping, missing 'home_assistant' key") + continue + + zigpy_device = zigpy_device_from_diagnostics( + zha_gateway.application_controller, data + ) + + if zigpy_device is None: + _LOGGER.debug("Skipping, diagnostics are not valid") continue output_path = ( From d7105c72309a890f42d24849c89cb4bb2962d48a Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:45:26 -0500 Subject: [PATCH 2/5] Import devices --- pyproject.toml | 1 + tests/data/devices/adeo-sin-4-fp-21-equ.json | 676 ++++ .../adurosmart-eria-adurolight-csc.json | 434 +++ tests/data/devices/aeotec-zga004.json | 963 +++++ tests/data/devices/alab-alab-co2-1-1.json | 426 +++ .../devices/aqara-lumi-airrtc-aeu005.json | 901 +++++ .../devices/aqara-lumi-curtain-acn04.json | 407 +++ .../data/devices/aqara-lumi-light-acn132.json | 768 ++++ .../aqara-lumi-sensor-occupy-agl1.json | 683 ++++ .../aqara-lumi-sensor-occupy-agl8.json | 770 ++++ ...atlantic-group-adapter-zigbee-fujitsu.json | 650 ++++ .../data/devices/aurora-doublesocket50au.json | 1316 +++++++ tests/data/devices/awox-ercu-ws-zm.json | 295 ++ .../data/devices/bitron-video-902010-24a.json | 626 ++++ .../data/devices/bituo-technik-spm01x001.json | 894 +++++ tests/data/devices/busch-jaeger-rb01.json | 264 ++ tests/data/devices/centralite-3300.json | 528 +++ tests/data/devices/computime-slr2b.json | 1357 +++++++ tests/data/devices/d5x84yu-et093wrg.json | 1376 ++++++++ tests/data/devices/danfoss-0x8040.json | 927 +++++ tests/data/devices/datek-pop.json | 881 +++++ tests/data/devices/datek-ssds.json | 446 +++ .../devices/ecodim-bv-ecodim-zigbee-3-0.json | 807 +++++ tests/data/devices/ewelink-ms01.json | 383 ++ tests/data/devices/ewelink-snzb-03p.json | 579 +++ tests/data/devices/ewelink-zb-sw01.json | 315 ++ tests/data/devices/frient-a-s-moszb-140.json | 762 ++++ .../generic-zigbee-coordinator-ezsp.json | 125 + tests/data/devices/gledopto-gl-b-008z.json | 464 +++ tests/data/devices/gledopto-gl-c-009p.json | 675 ++++ tests/data/devices/gledpopto-gl-c-007p.json | 750 ++++ tests/data/devices/heiman-smokesensor-em.json | 458 +++ .../horn-zone-haier-hs-22zw-0000011216.json | 277 ++ ...eden-tradfri-bulb-e27-ws-globe-1055lm.json | 806 +++++ ...of-sweden-tradfri-bulb-gu10-ww-345lm8.json | 654 ++++ ...kea-of-sweden-tradfri-shortcut-button.json | 405 +++ .../devices/imagic-by-greatstar-1112-s.json | 628 ++++ tests/data/devices/innr-rc-250.json | 404 +++ tests/data/devices/innr-rs-232-c.json | 888 +++++ tests/data/devices/ledvance-a60s-rgbw.json | 1073 ++++++ tests/data/devices/legrand-mobile-outlet.json | 1134 ++++++ .../data/devices/lumi-lumi-ctrl-neutral2.json | 669 ++++ .../devices/lumi-lumi-curtain-acn003.json | 531 +++ .../devices/lumi-lumi-curtain-hagl04.json | 560 +++ tests/data/devices/lumi-lumi-plug-maeu01.json | 903 +++++ .../data/devices/lumi-lumi-remote-b28ac1.json | 469 +++ .../data/devices/lumi-lumi-sen-ill-agl01.json | 391 +++ .../devices/lumi-lumi-switch-b1lacn02.json | 607 ++++ .../devices/lumi-lumi-switch-b2naus01.json | 1086 ++++++ .../data/devices/lumi-lumi-switch-b2nc01.json | 1011 ++++++ .../data/devices/lumi-lumi-switch-n1aeu1.json | 861 +++++ tests/data/devices/namron-as-1402790.json | 780 +++++ .../niko-nv-battery-switch-2-button.json | 428 +++ .../niko-nv-battery-switch-4-button.json | 485 +++ .../niko-nv-connectable-motor-control-3a.json | 634 ++++ tests/data/devices/nodon-sin-4-fp-21.json | 849 +++++ ...vibo-250bccf66c41421b91b5e3242942c164.json | 735 ++++ .../devices/paulmann-licht-gmbh-501-34.json | 661 ++++ tests/data/devices/philips-lct026.json | 725 ++++ tests/data/devices/ptvo-info-ptvo-switch.json | 1077 ++++++ tests/data/devices/samjin-water.json | 503 +++ .../devices/schneider-electric-eko07259.json | 3113 +++++++++++++++++ .../devices/schneider-electric-lk-dimmer.json | 874 +++++ .../schneider-electric-nhmotion-unidim-1.json | 721 ++++ .../schneider-electric-puck-dimmer-1.json | 550 +++ .../schneider-electric-socket-outlet-1.json | 1009 ++++++ .../schneider-electric-socket-outlet-2.json | 1009 ++++++ .../devices/sercomm-corp-sz-esw01-au.json | 1110 ++++++ tests/data/devices/shelly-ecowitt-ws90.json | 538 +++ .../devices/shyugj-dimmer-switch-zb3-0.json | 585 ++++ .../signify-netherlands-b-v-rdm004.json | 420 +++ .../devices/smarthjemmet-dk-quad-zig-sw.json | 342 ++ .../devices/smarthjemmet-dk-quad-zig-sw2.json | 668 ++++ tests/data/devices/smartthings-multiv4.json | 651 ++++ .../texas-instruments-coordinator.json | 125 + .../data/devices/tyst11-czk78ptr-zk78ptr.json | 740 ++++ .../data/devices/tyzb01-8scntis1-ts0216.json | 669 ++++ .../data/devices/tyzb01-mtunwanm-ts011f.json | 324 ++ .../data/devices/tz2000-k4yr34vv-sm0301.json | 663 ++++ .../data/devices/tz3000-2putqrmw-ts011f.json | 858 +++++ .../data/devices/tz3000-303avxxt-ts011f.json | 1035 ++++++ .../data/devices/tz3000-5e235jpa-ts0042.json | 462 +++ .../data/devices/tz3000-5fkufhn1-ts0502a.json | 557 +++ .../data/devices/tz3000-6l1pjfqe-ts011f.json | 885 +++++ .../data/devices/tz3000-8nyaanzb-ts011f.json | 524 +++ .../data/devices/tz3000-a37eix1s-ts0004.json | 800 +++++ .../data/devices/tz3000-a9buwvb7-ts0726.json | 904 +++++ .../data/devices/tz3000-adkvzooy-ts0042.json | 436 +++ .../data/devices/tz3000-aghwaexm-ts0001.json | 326 ++ .../data/devices/tz3000-bjawzodf-ty0201.json | 420 +++ .../data/devices/tz3000-cfnprab5-ts011f.json | 802 +++++ .../data/devices/tz3000-cicwjqth-ts011f.json | 772 ++++ .../data/devices/tz3000-dbou1ap4-ts0505a.json | 586 ++++ .../data/devices/tz3000-dowj6gyi-ts0201.json | 472 +++ .../data/devices/tz3000-e2uieqop-ts0001.json | 430 +++ .../data/devices/tz3000-eamtuojw-ts0201.json | 421 +++ .../data/devices/tz3000-empogkya-ts0003.json | 674 ++++ .../data/devices/tz3000-fdxihpp7-ts0001.json | 838 +++++ .../data/devices/tz3000-gjrubzje-ts0001.json | 882 +++++ .../data/devices/tz3000-isw9u95y-ts0201.json | 610 ++++ .../data/devices/tz3000-j1xl73iw-ts130f.json | 730 ++++ .../data/devices/tz3000-ja5osu5g-ts004f.json | 474 +++ .../data/devices/tz3000-kmsbwdol-ts130f.json | 696 ++++ .../data/devices/tz3000-kqvb5akv-ts0001.json | 949 +++++ .../data/devices/tz3000-lepzuhto-ts011f.json | 884 +++++ .../data/devices/tz3000-lf56vpxj-ts0202.json | 454 +++ .../data/devices/tz3000-llfaquvp-ts0012.json | 597 ++++ .../data/devices/tz3000-lotmgthb-ts011f.json | 858 +++++ .../data/devices/tz3000-lrgccsxm-ts0013.json | 589 ++++ .../data/devices/tz3000-ltiqubue-ts130f.json | 416 +++ .../data/devices/tz3000-mg4dy6z6-ts0202.json | 505 +++ .../data/devices/tz3000-mgusv51k-ts0052.json | 539 +++ .../data/devices/tz3000-mkhkxx1p-ts0001.json | 880 +++++ .../data/devices/tz3000-npzfdcof-ts0001.json | 872 +++++ .../data/devices/tz3000-okaz9tjs-ts011f.json | 817 +++++ .../data/devices/tz3000-pl5v1yyy-ts011f.json | 1293 +++++++ .../data/devices/tz3000-qa8s8vca-ts130f.json | 431 +++ .../data/devices/tz3000-qqdbccb3-ts130f.json | 391 +++ .../data/devices/tz3000-r6buo8ba-ts011f.json | 812 +++++ .../data/devices/tz3000-snq47izk-ts0013.json | 589 ++++ .../data/devices/tz3000-u3oupgdy-ts0004.json | 1044 ++++++ .../data/devices/tz3000-vw8pawxa-ts130f.json | 481 +++ .../data/devices/tz3000-wcgyhnp3-ts0222.json | 610 ++++ .../data/devices/tz3000-wkai4ga5-ts0044.json | 684 ++++ .../data/devices/tz3000-wkr3jqmr-ts0004.json | 1117 ++++++ .../data/devices/tz3000-xabckq1v-ts004f.json | 604 ++++ .../data/devices/tz3000-xkap8wtb-ts000f.json | 962 +++++ .../data/devices/tz3000-xr3htd96-ts0201.json | 472 +++ .../data/devices/tz3000-xxacnuab-ts0004.json | 983 ++++++ .../data/devices/tz3000-ynmowqk2-ts011f.json | 817 +++++ .../data/devices/tz3000-zl1kmjqx-ty0201.json | 427 +++ .../data/devices/tz3000-zv6x8bt2-ts011f.json | 1141 ++++++ .../data/devices/tz3210-3ulg9kpo-ts0021.json | 406 +++ .../data/devices/tz3210-5rta89nj-ts0601.json | 475 +++ .../data/devices/tz3210-dwytrmda-ts130f.json | 504 +++ .../data/devices/tz3210-hxtfthp5-ts0505b.json | 611 ++++ .../data/devices/tz3210-ncw88jfq-ts0201.json | 426 +++ .../data/devices/tz3210-qkj7rujp-ts0201.json | 436 +++ .../data/devices/tz3210-sixywxvy-ts0505b.json | 586 ++++ .../data/devices/tz3210-ue9kyjnj-ts0502b.json | 596 ++++ .../data/devices/tz3210-umi6vbsz-ts0505b.json | 618 ++++ .../data/devices/tz3210-up3pngle-ts0205.json | 453 +++ .../data/devices/tz3210-wuhzzfqg-ts0202.json | 737 ++++ .../data/devices/tz3218-awarhusb-ts0225.json | 384 ++ .../data/devices/tzb210-417ikxay-ts0505b.json | 618 ++++ .../data/devices/tze200-1n2zev06-ts0601.json | 594 ++++ .../data/devices/tze200-2ekuz3dz-ts0601.json | 252 ++ .../data/devices/tze200-2gtsuokt-ts0601.json | 336 ++ .../data/devices/tze200-2se8efxh-ts0601.json | 424 +++ .../data/devices/tze200-3t91nb6k-ts0601.json | 265 ++ .../data/devices/tze200-4utwozi2-ts0601.json | 668 ++++ .../data/devices/tze200-4wxtg5y9-ts0601.json | 294 ++ .../data/devices/tze200-68nvbio9-ts0601.json | 449 +++ .../data/devices/tze200-6rdj8dzm-ts0601.json | 661 ++++ .../data/devices/tze200-7bztmfm1-ts0601.json | 560 +++ .../data/devices/tze200-7ytb3h8u-ts0601.json | 891 +++++ .../data/devices/tze200-81isopgh-ts0601.json | 731 ++++ .../data/devices/tze200-86nbew0j-ts0601.json | 243 ++ .../data/devices/tze200-a0syesf5-ts0601.json | 344 ++ .../data/devices/tze200-a1dia7ml-ts0601.json | 243 ++ .../data/devices/tze200-abatw3kj-ts0601.json | 265 ++ .../data/devices/tze200-agumlajc-ts0601.json | 298 ++ .../data/devices/tze200-aoclfnxz-ts0601.json | 650 ++++ .../data/devices/tze200-bcusnqt8-ts0601.json | 243 ++ .../data/devices/tze200-bvrlmajk-ts0601.json | 243 ++ .../data/devices/tze200-byzdayie-ts0601.json | 844 +++++ .../data/devices/tze200-cirvgep4-ts0601.json | 484 +++ .../data/devices/tze200-cpbo62rn-ts0601.json | 348 ++ .../data/devices/tze200-cpmgn2cf-ts0601.json | 1805 ++++++++++ .../data/devices/tze200-dwcarsat-ts0601.json | 660 ++++ .../data/devices/tze200-eevqq1uv-ts0601.json | 250 ++ .../data/devices/tze200-ewxhg6o9-ts0601.json | 782 +++++ .../data/devices/tze200-f1pvdgoh-ts0601.json | 243 ++ .../data/devices/tze200-fvldku9h-ts0601.json | 250 ++ .../data/devices/tze200-g9a3awaj-ts0601.json | 585 ++++ .../data/devices/tze200-gaj531w3-ts0601.json | 440 +++ .../data/devices/tze200-gubdgai2-ts0601.json | 360 ++ .../data/devices/tze200-hl0ss9oa-ts0225.json | 406 +++ .../data/devices/tze200-icka1clh-ts0601.json | 440 +++ .../data/devices/tze200-iuk8kupi-ts0601.json | 258 ++ .../data/devices/tze200-js3mgbjb-ts0601.json | 265 ++ .../data/devices/tze200-jva8ink8-ts0601.json | 770 ++++ .../data/devices/tze200-jwsjbxjs-ts0601.json | 759 ++++ .../data/devices/tze200-khozatfx-ts0601.json | 243 ++ .../data/devices/tze200-kyfqmmyl-ts0601.json | 541 +++ .../data/devices/tze200-la2c2uo9-ts0601.json | 344 ++ .../data/devices/tze200-libht6ua-ts0601.json | 243 ++ .../data/devices/tze200-m9skfctm-ts0601.json | 307 ++ .../data/devices/tze200-mgxy2d9f-ts0601.json | 244 ++ .../data/devices/tze200-mja3fuja-ts0601.json | 504 +++ .../data/devices/tze200-mz5y07w2-ts0601.json | 792 +++++ .../data/devices/tze200-nklqjk62-ts0601.json | 246 ++ .../data/devices/tze200-nojsjtj2-ts0601.json | 343 ++ .../data/devices/tze200-nyvavzbj-ts0601.json | 256 ++ .../data/devices/tze200-pl31aqf5-ts0601.json | 265 ++ .../data/devices/tze200-pw7mji0l-ts0601.json | 349 ++ .../data/devices/tze200-qhlxve78-ts0601.json | 305 ++ .../data/devices/tze200-r32ctezx-ts0601.json | 366 ++ .../data/devices/tze200-rccxox8p-ts0601.json | 295 ++ .../data/devices/tze200-rk1wojce-ts0601.json | 244 ++ .../data/devices/tze200-rks0sgb7-ts0601.json | 242 ++ .../data/devices/tze200-rmymn92d-ts0601.json | 265 ++ .../data/devices/tze200-rtrmfadk-ts0601.json | 243 ++ .../data/devices/tze200-rxq4iti9-ts0601.json | 912 +++++ .../data/devices/tze200-s6hzw8g2-ts0601.json | 237 ++ .../data/devices/tze200-t1blo2bj-ts0601.json | 530 +++ .../data/devices/tze200-t6gq6nju-ts0601.json | 318 ++ .../data/devices/tze200-v1jqz5cy-ts0601.json | 243 ++ .../data/devices/tze200-v9hkz2yn-ts0601.json | 1054 ++++++ .../data/devices/tze200-vdiuwbkq-ts0601.json | 441 +++ .../data/devices/tze200-viy9ihs7-ts0601.json | 886 +++++ .../data/devices/tze200-vuqzj1ej-ts0601.json | 547 +++ .../data/devices/tze200-wktrysab-ts0601.json | 1002 ++++++ .../data/devices/tze200-xu4a5rhj-ts0601.json | 258 ++ .../data/devices/tze200-yia0p3tr-ts0601.json | 265 ++ .../data/devices/tze200-yojqa8xn-ts0601.json | 641 ++++ .../data/devices/tze200-yvx5lh6k-ts0601.json | 399 +++ .../data/devices/tze200-ztvwu4nk-ts0601.json | 243 ++ .../data/devices/tze204-1fuxihti-ts0601.json | 369 ++ .../data/devices/tze204-4fblxpma-ts0601.json | 456 +++ .../data/devices/tze204-5toc8efa-ts0601.json | 258 ++ .../data/devices/tze204-7ytb3h8u-ts0601.json | 939 +++++ .../data/devices/tze204-9yapgbuv-ts0601.json | 466 +++ .../data/devices/tze204-bkkmqmyo-ts0601.json | 881 +++++ .../data/devices/tze204-bxoo2swd-ts0601.json | 491 +++ .../data/devices/tze204-chbyv06x-ts0601.json | 641 ++++ .../data/devices/tze204-cirvgep4-ts0601.json | 491 +++ .../data/devices/tze204-cjbofhxw-ts0601.json | 532 +++ .../data/devices/tze204-dqolcpcp-ts0601.json | 1183 +++++++ .../data/devices/tze204-dtzziy1e-ts0601.json | 1058 ++++++ .../data/devices/tze204-eekpf0ft-ts0601.json | 274 ++ .../data/devices/tze204-g2ki0ejr-ts0601.json | 237 ++ .../data/devices/tze204-guvc7pdy-ts0601.json | 374 ++ .../data/devices/tze204-hlx9tnzb-ts0601.json | 378 ++ .../data/devices/tze204-ijxvkhd0-ts0601.json | 258 ++ .../data/devices/tze204-k7mfgaen-ts0601.json | 598 ++++ .../data/devices/tze204-kobbcyum-ts0601.json | 306 ++ .../data/devices/tze204-kyhbrfyl-ts0601.json | 598 ++++ .../data/devices/tze204-lsanae15-ts0601.json | 265 ++ .../data/devices/tze204-lzriup1j-ts0601.json | 901 +++++ .../data/devices/tze204-mpbki2zm-ts0601.json | 258 ++ .../data/devices/tze204-muvkrjr5-ts0601.json | 539 +++ .../data/devices/tze204-p3lqqy2r-ts0601.json | 1021 ++++++ .../data/devices/tze204-ptaqh9tk-ts0601.json | 400 +++ .../data/devices/tze204-rhblgy0z-ts0601.json | 258 ++ .../data/devices/tze204-sooucan5-ts0601.json | 693 ++++ .../data/devices/tze204-srmahpwl-ts0601.json | 258 ++ .../data/devices/tze204-sxm7l9xa-ts0601.json | 640 ++++ .../data/devices/tze204-tagezcph-ts0601.json | 265 ++ .../data/devices/tze204-ue3rzddr-ts0601.json | 258 ++ .../data/devices/tze204-vjpaih9f-ts0601.json | 250 ++ .../data/devices/tze204-vmcgja59-ts0601.json | 1402 ++++++++ .../data/devices/tze204-x8fp01wi-ts0601.json | 265 ++ .../data/devices/tze204-x9usygq1-ts0601.json | 250 ++ .../data/devices/tze204-xu4a5rhj-ts0601.json | 265 ++ .../data/devices/tze204-yjjdcqsq-ts0601.json | 493 +++ .../data/devices/tze204-zenj4lxv-ts0601.json | 526 +++ .../data/devices/tze204-ztqnh5cg-ts0601.json | 726 ++++ .../data/devices/tze284-0zaf1cr8-ts0601.json | 419 +++ .../data/devices/tze284-6hrnp30w-ts0601.json | 516 +++ .../data/devices/tze284-fzo2pocs-ts0601.json | 255 ++ .../data/devices/tze284-g2e6cpnw-ts0601.json | 255 ++ .../data/devices/tze284-hodyryli-ts0601.json | 255 ++ .../data/devices/tze284-idvyees9-ts0601.json | 270 ++ .../data/devices/tze284-o9ofysmo-ts0601.json | 255 ++ .../data/devices/tze284-pcdmj88b-ts0601.json | 249 ++ .../data/devices/tze284-rlytpmij-ts0601.json | 270 ++ .../data/devices/tze284-sgabhwa6-ts0601.json | 570 +++ .../data/devices/tze600-iypcp4py-ts0105.json | 295 ++ .../data/devices/tze608-c75zqghm-ts0603.json | 312 ++ .../uiot-uiot-windowcovring2-0402.json | 878 +++++ .../devices/unk-manufacturer-unk-model.json | 498 +++ tests/data/devices/visonic-mct-340-sma.json | 539 +++ ...ux-andigny-alcantara2-d1-00p1-02z1-00.json | 796 +++++ 274 files changed, 159483 insertions(+) create mode 100644 tests/data/devices/adeo-sin-4-fp-21-equ.json create mode 100644 tests/data/devices/adurosmart-eria-adurolight-csc.json create mode 100644 tests/data/devices/aeotec-zga004.json create mode 100644 tests/data/devices/alab-alab-co2-1-1.json create mode 100644 tests/data/devices/aqara-lumi-airrtc-aeu005.json create mode 100644 tests/data/devices/aqara-lumi-curtain-acn04.json create mode 100644 tests/data/devices/aqara-lumi-light-acn132.json create mode 100644 tests/data/devices/aqara-lumi-sensor-occupy-agl1.json create mode 100644 tests/data/devices/aqara-lumi-sensor-occupy-agl8.json create mode 100644 tests/data/devices/atlantic-group-adapter-zigbee-fujitsu.json create mode 100644 tests/data/devices/aurora-doublesocket50au.json create mode 100644 tests/data/devices/awox-ercu-ws-zm.json create mode 100644 tests/data/devices/bitron-video-902010-24a.json create mode 100644 tests/data/devices/bituo-technik-spm01x001.json create mode 100644 tests/data/devices/busch-jaeger-rb01.json create mode 100644 tests/data/devices/centralite-3300.json create mode 100644 tests/data/devices/computime-slr2b.json create mode 100644 tests/data/devices/d5x84yu-et093wrg.json create mode 100644 tests/data/devices/danfoss-0x8040.json create mode 100644 tests/data/devices/datek-pop.json create mode 100644 tests/data/devices/datek-ssds.json create mode 100644 tests/data/devices/ecodim-bv-ecodim-zigbee-3-0.json create mode 100644 tests/data/devices/ewelink-ms01.json create mode 100644 tests/data/devices/ewelink-snzb-03p.json create mode 100644 tests/data/devices/ewelink-zb-sw01.json create mode 100644 tests/data/devices/frient-a-s-moszb-140.json create mode 100644 tests/data/devices/generic-zigbee-coordinator-ezsp.json create mode 100644 tests/data/devices/gledopto-gl-b-008z.json create mode 100644 tests/data/devices/gledopto-gl-c-009p.json create mode 100644 tests/data/devices/gledpopto-gl-c-007p.json create mode 100644 tests/data/devices/heiman-smokesensor-em.json create mode 100644 tests/data/devices/horn-zone-haier-hs-22zw-0000011216.json create mode 100644 tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ws-globe-1055lm.json create mode 100644 tests/data/devices/ikea-of-sweden-tradfri-bulb-gu10-ww-345lm8.json create mode 100644 tests/data/devices/ikea-of-sweden-tradfri-shortcut-button.json create mode 100644 tests/data/devices/imagic-by-greatstar-1112-s.json create mode 100644 tests/data/devices/innr-rc-250.json create mode 100644 tests/data/devices/innr-rs-232-c.json create mode 100644 tests/data/devices/ledvance-a60s-rgbw.json create mode 100644 tests/data/devices/legrand-mobile-outlet.json create mode 100644 tests/data/devices/lumi-lumi-ctrl-neutral2.json create mode 100644 tests/data/devices/lumi-lumi-curtain-acn003.json create mode 100644 tests/data/devices/lumi-lumi-curtain-hagl04.json create mode 100644 tests/data/devices/lumi-lumi-plug-maeu01.json create mode 100644 tests/data/devices/lumi-lumi-remote-b28ac1.json create mode 100644 tests/data/devices/lumi-lumi-sen-ill-agl01.json create mode 100644 tests/data/devices/lumi-lumi-switch-b1lacn02.json create mode 100644 tests/data/devices/lumi-lumi-switch-b2naus01.json create mode 100644 tests/data/devices/lumi-lumi-switch-b2nc01.json create mode 100644 tests/data/devices/lumi-lumi-switch-n1aeu1.json create mode 100644 tests/data/devices/namron-as-1402790.json create mode 100644 tests/data/devices/niko-nv-battery-switch-2-button.json create mode 100644 tests/data/devices/niko-nv-battery-switch-4-button.json create mode 100644 tests/data/devices/niko-nv-connectable-motor-control-3a.json create mode 100644 tests/data/devices/nodon-sin-4-fp-21.json create mode 100644 tests/data/devices/orvibo-250bccf66c41421b91b5e3242942c164.json create mode 100644 tests/data/devices/paulmann-licht-gmbh-501-34.json create mode 100644 tests/data/devices/philips-lct026.json create mode 100644 tests/data/devices/ptvo-info-ptvo-switch.json create mode 100644 tests/data/devices/samjin-water.json create mode 100644 tests/data/devices/schneider-electric-eko07259.json create mode 100644 tests/data/devices/schneider-electric-lk-dimmer.json create mode 100644 tests/data/devices/schneider-electric-nhmotion-unidim-1.json create mode 100644 tests/data/devices/schneider-electric-puck-dimmer-1.json create mode 100644 tests/data/devices/schneider-electric-socket-outlet-1.json create mode 100644 tests/data/devices/schneider-electric-socket-outlet-2.json create mode 100644 tests/data/devices/sercomm-corp-sz-esw01-au.json create mode 100644 tests/data/devices/shelly-ecowitt-ws90.json create mode 100644 tests/data/devices/shyugj-dimmer-switch-zb3-0.json create mode 100644 tests/data/devices/signify-netherlands-b-v-rdm004.json create mode 100644 tests/data/devices/smarthjemmet-dk-quad-zig-sw.json create mode 100644 tests/data/devices/smarthjemmet-dk-quad-zig-sw2.json create mode 100644 tests/data/devices/smartthings-multiv4.json create mode 100644 tests/data/devices/texas-instruments-coordinator.json create mode 100644 tests/data/devices/tyst11-czk78ptr-zk78ptr.json create mode 100644 tests/data/devices/tyzb01-8scntis1-ts0216.json create mode 100644 tests/data/devices/tyzb01-mtunwanm-ts011f.json create mode 100644 tests/data/devices/tz2000-k4yr34vv-sm0301.json create mode 100644 tests/data/devices/tz3000-2putqrmw-ts011f.json create mode 100644 tests/data/devices/tz3000-303avxxt-ts011f.json create mode 100644 tests/data/devices/tz3000-5e235jpa-ts0042.json create mode 100644 tests/data/devices/tz3000-5fkufhn1-ts0502a.json create mode 100644 tests/data/devices/tz3000-6l1pjfqe-ts011f.json create mode 100644 tests/data/devices/tz3000-8nyaanzb-ts011f.json create mode 100644 tests/data/devices/tz3000-a37eix1s-ts0004.json create mode 100644 tests/data/devices/tz3000-a9buwvb7-ts0726.json create mode 100644 tests/data/devices/tz3000-adkvzooy-ts0042.json create mode 100644 tests/data/devices/tz3000-aghwaexm-ts0001.json create mode 100644 tests/data/devices/tz3000-bjawzodf-ty0201.json create mode 100644 tests/data/devices/tz3000-cfnprab5-ts011f.json create mode 100644 tests/data/devices/tz3000-cicwjqth-ts011f.json create mode 100644 tests/data/devices/tz3000-dbou1ap4-ts0505a.json create mode 100644 tests/data/devices/tz3000-dowj6gyi-ts0201.json create mode 100644 tests/data/devices/tz3000-e2uieqop-ts0001.json create mode 100644 tests/data/devices/tz3000-eamtuojw-ts0201.json create mode 100644 tests/data/devices/tz3000-empogkya-ts0003.json create mode 100644 tests/data/devices/tz3000-fdxihpp7-ts0001.json create mode 100644 tests/data/devices/tz3000-gjrubzje-ts0001.json create mode 100644 tests/data/devices/tz3000-isw9u95y-ts0201.json create mode 100644 tests/data/devices/tz3000-j1xl73iw-ts130f.json create mode 100644 tests/data/devices/tz3000-ja5osu5g-ts004f.json create mode 100644 tests/data/devices/tz3000-kmsbwdol-ts130f.json create mode 100644 tests/data/devices/tz3000-kqvb5akv-ts0001.json create mode 100644 tests/data/devices/tz3000-lepzuhto-ts011f.json create mode 100644 tests/data/devices/tz3000-lf56vpxj-ts0202.json create mode 100644 tests/data/devices/tz3000-llfaquvp-ts0012.json create mode 100644 tests/data/devices/tz3000-lotmgthb-ts011f.json create mode 100644 tests/data/devices/tz3000-lrgccsxm-ts0013.json create mode 100644 tests/data/devices/tz3000-ltiqubue-ts130f.json create mode 100644 tests/data/devices/tz3000-mg4dy6z6-ts0202.json create mode 100644 tests/data/devices/tz3000-mgusv51k-ts0052.json create mode 100644 tests/data/devices/tz3000-mkhkxx1p-ts0001.json create mode 100644 tests/data/devices/tz3000-npzfdcof-ts0001.json create mode 100644 tests/data/devices/tz3000-okaz9tjs-ts011f.json create mode 100644 tests/data/devices/tz3000-pl5v1yyy-ts011f.json create mode 100644 tests/data/devices/tz3000-qa8s8vca-ts130f.json create mode 100644 tests/data/devices/tz3000-qqdbccb3-ts130f.json create mode 100644 tests/data/devices/tz3000-r6buo8ba-ts011f.json create mode 100644 tests/data/devices/tz3000-snq47izk-ts0013.json create mode 100644 tests/data/devices/tz3000-u3oupgdy-ts0004.json create mode 100644 tests/data/devices/tz3000-vw8pawxa-ts130f.json create mode 100644 tests/data/devices/tz3000-wcgyhnp3-ts0222.json create mode 100644 tests/data/devices/tz3000-wkai4ga5-ts0044.json create mode 100644 tests/data/devices/tz3000-wkr3jqmr-ts0004.json create mode 100644 tests/data/devices/tz3000-xabckq1v-ts004f.json create mode 100644 tests/data/devices/tz3000-xkap8wtb-ts000f.json create mode 100644 tests/data/devices/tz3000-xr3htd96-ts0201.json create mode 100644 tests/data/devices/tz3000-xxacnuab-ts0004.json create mode 100644 tests/data/devices/tz3000-ynmowqk2-ts011f.json create mode 100644 tests/data/devices/tz3000-zl1kmjqx-ty0201.json create mode 100644 tests/data/devices/tz3000-zv6x8bt2-ts011f.json create mode 100644 tests/data/devices/tz3210-3ulg9kpo-ts0021.json create mode 100644 tests/data/devices/tz3210-5rta89nj-ts0601.json create mode 100644 tests/data/devices/tz3210-dwytrmda-ts130f.json create mode 100644 tests/data/devices/tz3210-hxtfthp5-ts0505b.json create mode 100644 tests/data/devices/tz3210-ncw88jfq-ts0201.json create mode 100644 tests/data/devices/tz3210-qkj7rujp-ts0201.json create mode 100644 tests/data/devices/tz3210-sixywxvy-ts0505b.json create mode 100644 tests/data/devices/tz3210-ue9kyjnj-ts0502b.json create mode 100644 tests/data/devices/tz3210-umi6vbsz-ts0505b.json create mode 100644 tests/data/devices/tz3210-up3pngle-ts0205.json create mode 100644 tests/data/devices/tz3210-wuhzzfqg-ts0202.json create mode 100644 tests/data/devices/tz3218-awarhusb-ts0225.json create mode 100644 tests/data/devices/tzb210-417ikxay-ts0505b.json create mode 100644 tests/data/devices/tze200-1n2zev06-ts0601.json create mode 100644 tests/data/devices/tze200-2ekuz3dz-ts0601.json create mode 100644 tests/data/devices/tze200-2gtsuokt-ts0601.json create mode 100644 tests/data/devices/tze200-2se8efxh-ts0601.json create mode 100644 tests/data/devices/tze200-3t91nb6k-ts0601.json create mode 100644 tests/data/devices/tze200-4utwozi2-ts0601.json create mode 100644 tests/data/devices/tze200-4wxtg5y9-ts0601.json create mode 100644 tests/data/devices/tze200-68nvbio9-ts0601.json create mode 100644 tests/data/devices/tze200-6rdj8dzm-ts0601.json create mode 100644 tests/data/devices/tze200-7bztmfm1-ts0601.json create mode 100644 tests/data/devices/tze200-7ytb3h8u-ts0601.json create mode 100644 tests/data/devices/tze200-81isopgh-ts0601.json create mode 100644 tests/data/devices/tze200-86nbew0j-ts0601.json create mode 100644 tests/data/devices/tze200-a0syesf5-ts0601.json create mode 100644 tests/data/devices/tze200-a1dia7ml-ts0601.json create mode 100644 tests/data/devices/tze200-abatw3kj-ts0601.json create mode 100644 tests/data/devices/tze200-agumlajc-ts0601.json create mode 100644 tests/data/devices/tze200-aoclfnxz-ts0601.json create mode 100644 tests/data/devices/tze200-bcusnqt8-ts0601.json create mode 100644 tests/data/devices/tze200-bvrlmajk-ts0601.json create mode 100644 tests/data/devices/tze200-byzdayie-ts0601.json create mode 100644 tests/data/devices/tze200-cirvgep4-ts0601.json create mode 100644 tests/data/devices/tze200-cpbo62rn-ts0601.json create mode 100644 tests/data/devices/tze200-cpmgn2cf-ts0601.json create mode 100644 tests/data/devices/tze200-dwcarsat-ts0601.json create mode 100644 tests/data/devices/tze200-eevqq1uv-ts0601.json create mode 100644 tests/data/devices/tze200-ewxhg6o9-ts0601.json create mode 100644 tests/data/devices/tze200-f1pvdgoh-ts0601.json create mode 100644 tests/data/devices/tze200-fvldku9h-ts0601.json create mode 100644 tests/data/devices/tze200-g9a3awaj-ts0601.json create mode 100644 tests/data/devices/tze200-gaj531w3-ts0601.json create mode 100644 tests/data/devices/tze200-gubdgai2-ts0601.json create mode 100644 tests/data/devices/tze200-hl0ss9oa-ts0225.json create mode 100644 tests/data/devices/tze200-icka1clh-ts0601.json create mode 100644 tests/data/devices/tze200-iuk8kupi-ts0601.json create mode 100644 tests/data/devices/tze200-js3mgbjb-ts0601.json create mode 100644 tests/data/devices/tze200-jva8ink8-ts0601.json create mode 100644 tests/data/devices/tze200-jwsjbxjs-ts0601.json create mode 100644 tests/data/devices/tze200-khozatfx-ts0601.json create mode 100644 tests/data/devices/tze200-kyfqmmyl-ts0601.json create mode 100644 tests/data/devices/tze200-la2c2uo9-ts0601.json create mode 100644 tests/data/devices/tze200-libht6ua-ts0601.json create mode 100644 tests/data/devices/tze200-m9skfctm-ts0601.json create mode 100644 tests/data/devices/tze200-mgxy2d9f-ts0601.json create mode 100644 tests/data/devices/tze200-mja3fuja-ts0601.json create mode 100644 tests/data/devices/tze200-mz5y07w2-ts0601.json create mode 100644 tests/data/devices/tze200-nklqjk62-ts0601.json create mode 100644 tests/data/devices/tze200-nojsjtj2-ts0601.json create mode 100644 tests/data/devices/tze200-nyvavzbj-ts0601.json create mode 100644 tests/data/devices/tze200-pl31aqf5-ts0601.json create mode 100644 tests/data/devices/tze200-pw7mji0l-ts0601.json create mode 100644 tests/data/devices/tze200-qhlxve78-ts0601.json create mode 100644 tests/data/devices/tze200-r32ctezx-ts0601.json create mode 100644 tests/data/devices/tze200-rccxox8p-ts0601.json create mode 100644 tests/data/devices/tze200-rk1wojce-ts0601.json create mode 100644 tests/data/devices/tze200-rks0sgb7-ts0601.json create mode 100644 tests/data/devices/tze200-rmymn92d-ts0601.json create mode 100644 tests/data/devices/tze200-rtrmfadk-ts0601.json create mode 100644 tests/data/devices/tze200-rxq4iti9-ts0601.json create mode 100644 tests/data/devices/tze200-s6hzw8g2-ts0601.json create mode 100644 tests/data/devices/tze200-t1blo2bj-ts0601.json create mode 100644 tests/data/devices/tze200-t6gq6nju-ts0601.json create mode 100644 tests/data/devices/tze200-v1jqz5cy-ts0601.json create mode 100644 tests/data/devices/tze200-v9hkz2yn-ts0601.json create mode 100644 tests/data/devices/tze200-vdiuwbkq-ts0601.json create mode 100644 tests/data/devices/tze200-viy9ihs7-ts0601.json create mode 100644 tests/data/devices/tze200-vuqzj1ej-ts0601.json create mode 100644 tests/data/devices/tze200-wktrysab-ts0601.json create mode 100644 tests/data/devices/tze200-xu4a5rhj-ts0601.json create mode 100644 tests/data/devices/tze200-yia0p3tr-ts0601.json create mode 100644 tests/data/devices/tze200-yojqa8xn-ts0601.json create mode 100644 tests/data/devices/tze200-yvx5lh6k-ts0601.json create mode 100644 tests/data/devices/tze200-ztvwu4nk-ts0601.json create mode 100644 tests/data/devices/tze204-1fuxihti-ts0601.json create mode 100644 tests/data/devices/tze204-4fblxpma-ts0601.json create mode 100644 tests/data/devices/tze204-5toc8efa-ts0601.json create mode 100644 tests/data/devices/tze204-7ytb3h8u-ts0601.json create mode 100644 tests/data/devices/tze204-9yapgbuv-ts0601.json create mode 100644 tests/data/devices/tze204-bkkmqmyo-ts0601.json create mode 100644 tests/data/devices/tze204-bxoo2swd-ts0601.json create mode 100644 tests/data/devices/tze204-chbyv06x-ts0601.json create mode 100644 tests/data/devices/tze204-cirvgep4-ts0601.json create mode 100644 tests/data/devices/tze204-cjbofhxw-ts0601.json create mode 100644 tests/data/devices/tze204-dqolcpcp-ts0601.json create mode 100644 tests/data/devices/tze204-dtzziy1e-ts0601.json create mode 100644 tests/data/devices/tze204-eekpf0ft-ts0601.json create mode 100644 tests/data/devices/tze204-g2ki0ejr-ts0601.json create mode 100644 tests/data/devices/tze204-guvc7pdy-ts0601.json create mode 100644 tests/data/devices/tze204-hlx9tnzb-ts0601.json create mode 100644 tests/data/devices/tze204-ijxvkhd0-ts0601.json create mode 100644 tests/data/devices/tze204-k7mfgaen-ts0601.json create mode 100644 tests/data/devices/tze204-kobbcyum-ts0601.json create mode 100644 tests/data/devices/tze204-kyhbrfyl-ts0601.json create mode 100644 tests/data/devices/tze204-lsanae15-ts0601.json create mode 100644 tests/data/devices/tze204-lzriup1j-ts0601.json create mode 100644 tests/data/devices/tze204-mpbki2zm-ts0601.json create mode 100644 tests/data/devices/tze204-muvkrjr5-ts0601.json create mode 100644 tests/data/devices/tze204-p3lqqy2r-ts0601.json create mode 100644 tests/data/devices/tze204-ptaqh9tk-ts0601.json create mode 100644 tests/data/devices/tze204-rhblgy0z-ts0601.json create mode 100644 tests/data/devices/tze204-sooucan5-ts0601.json create mode 100644 tests/data/devices/tze204-srmahpwl-ts0601.json create mode 100644 tests/data/devices/tze204-sxm7l9xa-ts0601.json create mode 100644 tests/data/devices/tze204-tagezcph-ts0601.json create mode 100644 tests/data/devices/tze204-ue3rzddr-ts0601.json create mode 100644 tests/data/devices/tze204-vjpaih9f-ts0601.json create mode 100644 tests/data/devices/tze204-vmcgja59-ts0601.json create mode 100644 tests/data/devices/tze204-x8fp01wi-ts0601.json create mode 100644 tests/data/devices/tze204-x9usygq1-ts0601.json create mode 100644 tests/data/devices/tze204-xu4a5rhj-ts0601.json create mode 100644 tests/data/devices/tze204-yjjdcqsq-ts0601.json create mode 100644 tests/data/devices/tze204-zenj4lxv-ts0601.json create mode 100644 tests/data/devices/tze204-ztqnh5cg-ts0601.json create mode 100644 tests/data/devices/tze284-0zaf1cr8-ts0601.json create mode 100644 tests/data/devices/tze284-6hrnp30w-ts0601.json create mode 100644 tests/data/devices/tze284-fzo2pocs-ts0601.json create mode 100644 tests/data/devices/tze284-g2e6cpnw-ts0601.json create mode 100644 tests/data/devices/tze284-hodyryli-ts0601.json create mode 100644 tests/data/devices/tze284-idvyees9-ts0601.json create mode 100644 tests/data/devices/tze284-o9ofysmo-ts0601.json create mode 100644 tests/data/devices/tze284-pcdmj88b-ts0601.json create mode 100644 tests/data/devices/tze284-rlytpmij-ts0601.json create mode 100644 tests/data/devices/tze284-sgabhwa6-ts0601.json create mode 100644 tests/data/devices/tze600-iypcp4py-ts0105.json create mode 100644 tests/data/devices/tze608-c75zqghm-ts0603.json create mode 100644 tests/data/devices/uiot-uiot-windowcovring2-0402.json create mode 100644 tests/data/devices/unk-manufacturer-unk-model.json create mode 100644 tests/data/devices/visonic-mct-340-sma.json create mode 100644 tests/data/devices/zehnder-group-vaux-andigny-alcantara2-d1-00p1-02z1-00.json diff --git a/pyproject.toml b/pyproject.toml index a15a78c39..76ea8fdc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ testing = [ enabled = true [tool.codespell] +skip = ["tests/data/devices/*"] ignore-words-list = "hass, checkin" [tool.mypy] diff --git a/tests/data/devices/adeo-sin-4-fp-21-equ.json b/tests/data/devices/adeo-sin-4-fp-21-equ.json new file mode 100644 index 000000000..ba443030e --- /dev/null +++ b/tests/data/devices/adeo-sin-4-fp-21-equ.json @@ -0,0 +1,676 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:85:66:cc:2e", + "nwk": "0xA2CE", + "manufacturer": "Adeo", + "model": "SIN-4-FP-21_EQU", + "friendly_manufacturer": "Adeo", + "friendly_model": "SIN-4-FP-21_EQU", + "name": "Adeo SIN-4-FP-21_EQU", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4727, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.281545+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": 4727, + "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": "SMART_PLUG", + "id": 81 + }, + "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": "SIN-4-FP-21_EQU" + } + ] + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 39737 + }, + { + "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": 19 + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "value": 1028 + }, + { + "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": 59 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc00", + "endpoint_attribute": "pilot_wire_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:66:cc:2e-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:85:66:cc:2e:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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:85:66:cc:2e-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:85:66:cc:2e:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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": "Pilot wire mode", + "unique_id": "ab:cd:ef:12:85:66:cc:2e-1-pilot_wire_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "pilot_wire_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": "PhillipsRemoteClusterHandler", + "generic_id": "cluster_handler_0xfc00", + "endpoint_id": 1, + "cluster": { + "id": 64512, + "name": "PilotWireCluster", + "type": "server" + }, + "id": "1:0xfc00", + "unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0xfc00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "NodOnPilotWireMode", + "options": [ + "Off", + "Comfort", + "Eco", + "FrostProtection", + "ComfortMinus1", + "ComfortMinus2" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:66:cc:2e-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:66:cc:2e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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:66:cc:2e-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:66:cc:2e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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:66:cc:2e-1-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": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 1028, + "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:85:66:cc:2e-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:85:66:cc:2e:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 39.737, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:66:cc:2e-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:85:66:cc:2e:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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:85:66:cc:2e-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:66:cc:2e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:66:cc:2e", + "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/adurosmart-eria-adurolight-csc.json b/tests/data/devices/adurosmart-eria-adurolight-csc.json new file mode 100644 index 000000000..889a5dbc7 --- /dev/null +++ b/tests/data/devices/adurosmart-eria-adurolight-csc.json @@ -0,0 +1,434 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1a:8b:d4:d3", + "nwk": "0x489C", + "manufacturer": "AduroSmart Eria", + "model": "ADUROLIGHT_CSC", + "friendly_manufacturer": "AduroSmart Eria", + "friendly_model": "ADUROLIGHT_CSC", + "name": "AduroSmart Eria ADUROLIGHT_CSC", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4653, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.144924+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": 4653, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 0, + "maximum_outgoing_transfer_size": 100, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 49246, + "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": "AduroSmart Eria" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ADUROLIGHT_CSC" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 120 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "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": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfccc", + "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": "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": [] + }, + { + "cluster_id": "0xfccc", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 49246, + "device_type": { + "name": "undefined_0x03f2", + "id": 1010 + }, + "in_clusters": [ + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:8b:d4: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:1a:8b:d4:d3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:8b:d4:d3", + "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:1a:8b:d4: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:1a:8b:d4:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:8b:d4: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:1a:8b:d4: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:1a:8b:d4:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:8b:d4:d3", + "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:1a:8b:d4:d3-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:1a:8b:d4:d3:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:1a:8b:d4:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 60.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:1a:8b:d4:d3-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:1a:8b:d4:d3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:8b:d4:d3", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": true, + "available": true + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aeotec-zga004.json b/tests/data/devices/aeotec-zga004.json new file mode 100644 index 000000000..b4068335f --- /dev/null +++ b/tests/data/devices/aeotec-zga004.json @@ -0,0 +1,963 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3a:bc:09:e8", + "nwk": "0x7433", + "manufacturer": "AEOTEC", + "model": "ZGA004", + "friendly_manufacturer": "AEOTEC", + "friendly_model": "ZGA004", + "name": "AEOTEC ZGA004", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4880, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.965041+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": 4880, + "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_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "AEOTEC" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZGA004" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 41 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 10 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 255 + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 6000 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "value": 300 + }, + { + "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": 0 + } + ] + }, + { + "cluster_id": "0xfd01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfd03", + "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", + "unsupported": true + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 10 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0011", + "name": "installed_closed_limit_lift", + "zcl_type": "uint16", + "value": 6000 + }, + { + "id": "0x0013", + "name": "installed_closed_limit_tilt", + "zcl_type": "uint16", + "value": 300 + }, + { + "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": 6 + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_SCENE_CONTROLLER", + "id": 2096 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfd00", + "endpoint_attribute": "manufacturer_specific", + "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": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_SCENE_CONTROLLER", + "id": 2096 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0xfd00", + "endpoint_attribute": "manufacturer_specific", + "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": [] + } + ] + }, + "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:3a:bc:09:e8-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:bc:09:e8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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:3a:bc:09:e8-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": 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:3a:bc:09:e8:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:bc:09:e8-2-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "shutter", + "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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:3a:bc:09:e8:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": 0, + "state": "closed", + "is_opening": false, + "is_closing": false, + "is_closed": true + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:bc:09:e8-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:3a:bc:09:e8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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:3a:bc:09:e8-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:3a:bc:09:e8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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:3a:bc:09:e8-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:bc:09:e8:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.41 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:bc:09:e8-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:3a:bc:09:e8:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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:3a:bc:09:e8-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:3a:bc:09:e8:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Shutter" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:bc:09:e8-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:3a:bc:09:e8:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3a:bc:09:e8-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:3a:bc:09:e8:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "endpoint_id": 2, + "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:3a:bc:09:e8-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:bc:09:e8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3a:bc:09:e8", + "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/alab-alab-co2-1-1.json b/tests/data/devices/alab-alab-co2-1-1.json new file mode 100644 index 000000000..89e6124ca --- /dev/null +++ b/tests/data/devices/alab-alab-co2-1-1.json @@ -0,0 +1,426 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d6:a0:0e:81", + "nwk": "0xBF64", + "manufacturer": "Alab", + "model": "Alab-CO2-1.1", + "friendly_manufacturer": "Alab", + "friendly_model": "Alab-CO2-1.1", + "name": "Alab Alab-CO2-1.1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.199816+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": 1617, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 1617, + "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": "Alab" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Alab-CO2-1.1" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 255 + }, + { + "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": 255 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2010 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 3592 + } + ] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 812.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": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:a0:0e:81-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:d6:a0:0e:81:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "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:d6:a0:0e:81-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:a0:0e:81:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "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:d6:a0:0e:81-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:a0:0e:81:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "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:d6:a0:0e:81-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:d6:a0:0e:81:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 20.1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:a0:0e:81-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:d6:a0:0e:81:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 35.92 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:a0:0e:81-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:d6:a0:0e:81:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d6:a0:0e:81", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "CarbonDioxideConcentration", + "available": true, + "state": 812000000.0 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aqara-lumi-airrtc-aeu005.json b/tests/data/devices/aqara-lumi-airrtc-aeu005.json new file mode 100644 index 000000000..66d03e521 --- /dev/null +++ b/tests/data/devices/aqara-lumi-airrtc-aeu005.json @@ -0,0 +1,901 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a8:b1:ca:04", + "nwk": "0x3EB5", + "manufacturer": "Aqara", + "model": "lumi.airrtc.aeu005", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.airrtc.aeu005", + "name": "Aqara lumi.airrtc.aeu005", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 168, + "rssi": -69, + "last_seen": "2025-11-23T11:12:59.153776+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": 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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 39 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20251112" + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "value": "\u9ed8\u8ba4\u623f\u95f4" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.airrtc.aeu005" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b''" + } + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 27 + }, + { + "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": "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": 3000 + }, + { + "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": 700 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1800 + }, + { + "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": 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", + "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": "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": "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": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "value": 817211574 + } + ] + }, + { + "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": 4647 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "value": 27 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "value": 27 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0008", + "name": "image_type_id", + "zcl_type": "uint16", + "value": 5120 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4447 + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a8:b1:ca: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:a8:b1:ca:04:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "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:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 32.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": 18.0, + "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" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "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:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "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:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 30.0, + "native_min_value": 7.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:a8:b1:ca: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:a8:b1:ca:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "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:a8:b1:ca: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:a8:b1:ca:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -69 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "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:a8:b1:ca:04-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:a8:b1:ca:04:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "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:a8:b1:ca: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:a8:b1:ca:04:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a8:b1:ca:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001227", + "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-curtain-acn04.json b/tests/data/devices/aqara-lumi-curtain-acn04.json new file mode 100644 index 000000000..f23066dfa --- /dev/null +++ b/tests/data/devices/aqara-lumi-curtain-acn04.json @@ -0,0 +1,407 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a4:d1:4f:84", + "nwk": "0x1B19", + "manufacturer": "Aqara", + "model": "lumi.curtain.acn04", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.curtain.acn04", + "name": "Aqara lumi.curtain.acn04", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:20.943097+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": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "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.curtain.acn04" + } + ] + }, + { + "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": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 22 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a4:d1:4f:84-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:a4:d1:4f:84:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "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:a4:d1:4f:84-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": 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:a4:d1:4f:84:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 78, + "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:a4:d1:4f:84-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:a4:d1:4f:84:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "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:a4:d1:4f:84-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:a4:d1:4f:84:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "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:a4:d1:4f:84-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:a4:d1:4f:84:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a4:d1:4f:84-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:a4:d1:4f:84:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:d1:4f:84", + "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/aqara-lumi-light-acn132.json b/tests/data/devices/aqara-lumi-light-acn132.json new file mode 100644 index 000000000..173259989 --- /dev/null +++ b/tests/data/devices/aqara-lumi-light-acn132.json @@ -0,0 +1,768 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f0:a0:54:37", + "nwk": "0x31FB", + "manufacturer": "Aqara", + "model": "lumi.light.acn132", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.light.acn132", + "name": "Aqara lumi.light.acn132", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": 168, + "rssi": null, + "last_seen": "2025-11-16T11:24:55.534701+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.light.acn132" + } + ] + }, + { + "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": 41 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "off_transition_time", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "value": 255 + }, + { + "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", + "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": 370 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 154 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 20512 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 13762 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 250 + } + ] + }, + { + "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": 6682 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:a0:54: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:f0:a0:54:37:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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:f0:a0:54:37-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:f0:a0:54:37: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:f0:a0:54:37: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:f0:a0:54:37:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 370 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 41, + "xy_color": [ + 0.312993057145037, + 0.20999465934233616 + ], + "color_temp": 154, + "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:f0:a0:54:37-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:f0:a0:54:37:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 370, + "native_min_value": 153, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 250 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:a0:54:37-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:f0:a0:54:37:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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": 3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:a0:54:37-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:f0:a0:54:37:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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:f0:a0:54:37-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:f0:a0:54:37:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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:f0:a0:54:37-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:f0:a0:54:37:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f0:a0:54: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:f0:a0:54:37:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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:f0:a0:54: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:f0:a0:54:37:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "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:a0:54: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:f0:a0:54:37:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f0:a0:54:37", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00001a1a", + "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-sensor-occupy-agl1.json b/tests/data/devices/aqara-lumi-sensor-occupy-agl1.json new file mode 100644 index 000000000..9581f618a --- /dev/null +++ b/tests/data/devices/aqara-lumi-sensor-occupy-agl1.json @@ -0,0 +1,683 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ca:86:17:4b", + "nwk": "0x2AFF", + "manufacturer": "aqara", + "model": "lumi.sensor_occupy.agl1", + "friendly_manufacturer": "Aqara", + "friendly_model": "Presence Sensor FP1E", + "name": "Aqara Presence Sensor FP1E", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.476869+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": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 127, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 127, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfff0", + "id": 65520 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 26 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.sensor_occupy.agl1" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "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": 26 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:86:17:4b-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:ca:86:17:4b:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "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:ca:86:17:4b-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:ca:86:17:4b:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "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:ca:86:17: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:ca:86:17:4b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + }, + { + "info_object": { + "fallback_name": "Presence status reset", + "unique_id": "ab:cd:ef:12:ca:86:17:4b-1-reset_no_presence_status", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "WriteAttributeButton", + "translation_key": "reset_no_presence_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": "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:ca:86:17:4b:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "reset_no_presence_status", + "attribute_value": 1 + }, + "state": { + "class_name": "WriteAttributeButton", + "available": true + } + }, + { + "info_object": { + "fallback_name": "Restart device", + "unique_id": "ab:cd:ef:12:ca:86:17:4b-1-restart_device", + "migrate_unique_ids": [], + "platform": "button", + "class_name": "WriteAttributeButton", + "translation_key": "restart_device", + "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": "OppleCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:ca:86:17:4b:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "restart_device", + "attribute_value": 0 + }, + "state": { + "class_name": "WriteAttributeButton", + "available": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Approach distance", + "unique_id": "ab:cd:ef:12:ca:86:17:4b-1-approach_distance", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "approach_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": "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:ca:86:17:4b:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6, + "native_min_value": 0, + "native_step": 0.1, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:ca:86:17:4b-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": "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:ca:86:17:4b:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "AqaraMotionSensitivity", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:86:17: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:ca:86:17:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "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:ca:86:17: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:ca:86:17:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "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:ca:86:17:4b-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:ca:86:17:4b:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion distance", + "unique_id": "ab:cd:ef:12:ca:86:17:4b-1-motion_distance", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "motion_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": "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:ca:86:17:4b:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "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:ca:86:17: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:ca:86:17:4b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:86:17:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x0000001a", + "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-sensor-occupy-agl8.json b/tests/data/devices/aqara-lumi-sensor-occupy-agl8.json new file mode 100644 index 000000000..95b05087b --- /dev/null +++ b/tests/data/devices/aqara-lumi-sensor-occupy-agl8.json @@ -0,0 +1,770 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ae:99:5e:c4", + "nwk": "0x9506", + "manufacturer": "Aqara", + "model": "lumi.sensor_occupy.agl8", + "friendly_manufacturer": "Aqara", + "friendly_model": "lumi.sensor_occupy.agl8", + "name": "Aqara lumi.sensor_occupy.agl8", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": 176, + "rssi": -67, + "last_seen": "2025-11-12T22:55:44.525496+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": 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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 34 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20250829" + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "value": "\u9ed8\u8ba4\u623f\u95f4" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Aqara" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.sensor_occupy.agl8" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "value": { + "__type": "", + "repr": "b''" + } + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 27 + }, + { + "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", + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "identify_time", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x004a", + "name": "number_of_states", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "uint16", + "value": -32768 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "uint16", + "value": -32768 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2365 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "int16", + "value": -32768 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5200 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "uint16", + "value": 65535 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "value": 816303172 + } + ] + }, + { + "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": 13346 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "value": 27 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "value": 27 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0008", + "name": "image_type_id", + "zcl_type": "uint16", + "value": 9792 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4447 + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "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:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "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:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "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:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "endpoint_id": 1, + "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:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.65 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 52.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ae:99:5e:c4-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:ae:99:5e:c4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ae:99:5e:c4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00003422", + "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/atlantic-group-adapter-zigbee-fujitsu.json b/tests/data/devices/atlantic-group-adapter-zigbee-fujitsu.json new file mode 100644 index 000000000..f78678774 --- /dev/null +++ b/tests/data/devices/atlantic-group-adapter-zigbee-fujitsu.json @@ -0,0 +1,650 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "nwk": "0xEE14", + "manufacturer": "ATLANTIC GROUP", + "model": "Adapter Zigbee FUJITSU", + "friendly_manufacturer": "ATLANTIC GROUP", + "friendly_model": "Adapter Zigbee FUJITSU", + "name": "ATLANTIC GROUP Adapter Zigbee FUJITSU", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4699, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.142800+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": 4699, + "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": "ATLANTIC GROUP" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Adapter Zigbee FUJITSU" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0201", + "endpoint_attribute": "thermostat", + "attributes": [ + { + "id": "0x0006", + "name": "abs_max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0004", + "name": "abs_max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 3000 + }, + { + "id": "0x0005", + "name": "abs_min_cool_setpoint_limit", + "zcl_type": "int16", + "value": 1800 + }, + { + "id": "0x0003", + "name": "abs_min_heat_setpoint_limit", + "zcl_type": "int16", + "value": 1600 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2000 + }, + { + "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": 2300 + }, + { + "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": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0202", + "endpoint_attribute": "fan", + "attributes": [ + { + "id": "0x0000", + "name": "fan_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0001", + "name": "fan_mode_sequence", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0xfc03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "232": { + "profile_id": 260, + "device_type": { + "name": "CONFIGURATION_TOOL", + "id": 5 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "242": { + "profile_id": 41440, + "device_type": { + "name": "PROXY", + "id": 96 + }, + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + }, + { + "class_name": "FanClusterHandler", + "generic_id": "cluster_handler_0x0202", + "endpoint_id": 1, + "cluster": { + "id": 514, + "name": "Fan Control", + "type": "server" + }, + "id": "1:0x0202", + "unique_id": "ab:cd:ef:12:8e:4d:7a:e3:1:0x0202", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 16.0, + "supported_features": 395, + "fan_modes": [ + "auto", + "on" + ], + "preset_modes": [], + "hvac_modes": [ + "off", + "heat_cool", + "cool", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 20.0, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "off", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[0]/off", + "occupancy": null, + "occupied_cooling_setpoint": 2600, + "occupied_heating_setpoint": 2300, + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "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:8e:4d:7a:e3-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:8e:4d:7a:e3:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:8e:4d:7a:e3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/aurora-doublesocket50au.json b/tests/data/devices/aurora-doublesocket50au.json new file mode 100644 index 000000000..79c2e4a52 --- /dev/null +++ b/tests/data/devices/aurora-doublesocket50au.json @@ -0,0 +1,1316 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:73:79:07:f7", + "nwk": "0xC337", + "manufacturer": "Aurora", + "model": "DoubleSocket50AU", + "friendly_manufacturer": "Aurora", + "friendly_model": "DoubleSocket50AU", + "name": "Aurora DoubleSocket50AU", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4636, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:58.183337+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": 4636, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 0, + "maximum_outgoing_transfer_size": 100, + "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": "Aurora" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "DoubleSocket50AU" + } + ] + }, + { + "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", + "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": "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", + "value": 50 + }, + { + "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", + "value": 65535 + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 6 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 246 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "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": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "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", + "value": 50 + }, + { + "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", + "value": 65535 + }, + { + "id": "0x0000", + "name": "measurement_type", + "zcl_type": "map32", + "value": 1 + }, + { + "id": "0x0403", + "name": "power_divisor", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 246 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-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:73:79:07:f7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 50.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": null, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": null, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 6.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-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:73:79:07:f7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 246.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "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:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 50.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": null, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": null, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 3.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:73:79:07:f7-2-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": 2, + "cluster": { + "id": 2820, + "name": "Electrical Measurement", + "type": "server" + }, + "id": "2:0x0b04", + "unique_id": "ab:cd:ef:12:73:79:07:f7:2:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 246.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:73:79:07:f7-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:73:79:07:f7:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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:73:79:07:f7-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:73:79:07:f7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:73:79:07:f7", + "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/awox-ercu-ws-zm.json b/tests/data/devices/awox-ercu-ws-zm.json new file mode 100644 index 000000000..0f24e6a0e --- /dev/null +++ b/tests/data/devices/awox-ercu-ws-zm.json @@ -0,0 +1,295 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:50:b9:32:f5", + "nwk": "0x8C7A", + "manufacturer": "AwoX", + "model": "ERCU_WS_Zm", + "friendly_manufacturer": "AwoX", + "friendly_model": "ERCU_WS_Zm", + "name": "AwoX ERCU_WS_Zm", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 208, + "rssi": -59, + "last_seen": "2025-11-21T19:30:54.038765+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": "COLOR_CONTROLLER", + "id": 2048 + }, + "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": "ERCU_WS_Zm" + } + ] + }, + { + "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": "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": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 4751, + "device_type": { + "name": "unknown", + "id": 2048 + }, + "in_clusters": [ + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:50:b9:32:f5-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:50:b9:32:f5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:50:b9:32:f5", + "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:50:b9:32:f5-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:50:b9:32:f5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:50:b9:32:f5", + "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:50:b9:32:f5-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:50:b9:32:f5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:50:b9:32:f5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -59 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/bitron-video-902010-24a.json b/tests/data/devices/bitron-video-902010-24a.json new file mode 100644 index 000000000..817e1fb9e --- /dev/null +++ b/tests/data/devices/bitron-video-902010-24a.json @@ -0,0 +1,626 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "nwk": "0xD9B6", + "manufacturer": "Bitron Video", + "model": "902010/24A", + "friendly_manufacturer": "Bitron Video", + "friendly_model": "902010/24A", + "name": "Bitron Video 902010/24A", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.809574+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": "Bitron Video" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "902010/24A" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 14, + 38, + 222, + 41, + 0, + 75, + 18, + 0 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 48 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 40 + } + ] + }, + { + "cluster_id": "0x0502", + "endpoint_attribute": "ias_wd", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-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": 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:f4:7b:a3:f4:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3: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:f4:7b:a3: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:f4:7b:a3:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "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:f4:7b:a3:f4-1-1282-SirenLevel", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultSirenLevelSelectEntity", + "translation_key": "default_siren_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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SirenLevel", + "options": [ + "Low level sound", + "Medium level sound", + "High level sound", + "Very high level sound" + ] + }, + "state": { + "class_name": "DefaultSirenLevelSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-1-1282-Strobe", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultStrobeSelectEntity", + "translation_key": "default_strobe", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "Strobe", + "options": [ + "No Strobe", + "Strobe" + ] + }, + "state": { + "class_name": "DefaultStrobeSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-1-1282-StrobeLevel", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultStrobeLevelSelectEntity", + "translation_key": "default_strobe_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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StrobeLevel", + "options": [ + "Low level strobe", + "Medium level strobe", + "High level strobe", + "Very high level strobe" + ] + }, + "state": { + "class_name": "DefaultStrobeLevelSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-1-1282-WarningMode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultToneSelectEntity", + "translation_key": "default_siren_tone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "WarningMode", + "options": [ + "Stop", + "Burglar", + "Fire", + "Emergency", + "Police Panic", + "Fire Panic", + "Emergency Panic" + ] + }, + "state": { + "class_name": "DefaultToneSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3: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:f4:7b:a3:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3: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:f4:7b:a3: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:f4:7b:a3:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "siren": [ + { + "info_object": { + "fallback_name": "Siren", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-1-1282", + "migrate_unique_ids": [], + "platform": "siren", + "class_name": "Siren", + "translation_key": null, + "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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "available_tones": { + "1": "Burglar", + "2": "Fire", + "3": "Emergency", + "4": "Police Panic", + "5": "Fire Panic", + "6": "Emergency Panic" + }, + "supported_features": 31 + }, + "state": { + "class_name": "Siren", + "available": true, + "state": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4-4-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": 4, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "4:0x0019_client", + "unique_id": "ab:cd:ef:12:f4:7b:a3:f4:4:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:7b:a3:f4", + "endpoint_id": 4, + "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/bituo-technik-spm01x001.json b/tests/data/devices/bituo-technik-spm01x001.json new file mode 100644 index 000000000..a4197cf1f --- /dev/null +++ b/tests/data/devices/bituo-technik-spm01x001.json @@ -0,0 +1,894 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:c2:0c:51", + "nwk": "0x4837", + "manufacturer": "BITUO TECHNIK", + "model": "SPM01X001", + "friendly_manufacturer": "BITUO TECHNIK", + "friendly_model": "SPM01X001", + "name": "BITUO TECHNIK SPM01X001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4630, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.201128+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": 4630, + "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_0x0501", + "id": 1281 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "BITUO TECHNIK" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SPM01X001" + } + ] + }, + { + "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": 10 + }, + { + "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": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0300", + "name": "ac_frequency", + "zcl_type": "uint16", + "value": 4992 + }, + { + "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", + "value": 1 + }, + { + "id": "0x0605", + "name": "ac_power_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0604", + "name": "ac_power_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": "0x050f", + "name": "apparent_power", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "value": 100 + }, + { + "id": "0x050e", + "name": "reactive_power", + "zcl_type": "int16", + "value": 0 + }, + { + "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": 24178 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "value": 0 + }, + { + "id": "0x0306", + "name": "total_apparent_power", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0305", + "name": "total_reactive_power", + "zcl_type": "int32", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:c2:0c:51:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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:8d:c2:0c:51-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:c2:0c:51:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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:8d:c2:0c:51-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:c2:0c:51:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": null + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 10.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:8d:c2:0c:51-1-1794-summation_received", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "SmartEnergySummationReceived", + "translation_key": "summation_received", + "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:8d:c2:0c:51:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": null + }, + "state": { + "class_name": "SmartEnergySummationReceived", + "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:8d:c2:0c:51-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:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 4992.0 + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": 100 + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 24178.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:8d:c2:0c:51:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementTotalActivePower", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c2:0c:51-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:c2:0c:51:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c2:0c:51", + "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/busch-jaeger-rb01.json b/tests/data/devices/busch-jaeger-rb01.json new file mode 100644 index 000000000..c7d15918c --- /dev/null +++ b/tests/data/devices/busch-jaeger-rb01.json @@ -0,0 +1,264 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:97:db:33:21", + "nwk": "0x71F3", + "manufacturer": "Busch-Jaeger", + "model": "RB01", + "friendly_manufacturer": "Busch-Jaeger", + "friendly_model": "RB01", + "name": "Busch-Jaeger RB01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4398, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.366184+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": 4398, + "maximum_buffer_size": 89, + "maximum_incoming_transfer_size": 61, + "server_mask": 0, + "maximum_outgoing_transfer_size": 61, + "descriptor_capability_field": 0 + }, + "endpoints": { + "10": { + "profile_id": 49246, + "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": "Busch-Jaeger" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RB01" + } + ] + }, + { + "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": "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:97:db:33:21-10-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": 10, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "10:0x0000", + "unique_id": "ab:cd:ef:12:97:db:33:21:10:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:db:33:21", + "endpoint_id": 10, + "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:97:db:33:21-10-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": 10, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "10:0x0000", + "unique_id": "ab:cd:ef:12:97:db:33:21:10:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:db:33:21", + "endpoint_id": 10, + "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:97:db:33:21-10-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": 10, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "10:0x0019_client", + "unique_id": "ab:cd:ef:12:97:db:33:21:10:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:db:33:21", + "endpoint_id": 10, + "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/centralite-3300.json b/tests/data/devices/centralite-3300.json new file mode 100644 index 000000000..7d974c0eb --- /dev/null +++ b/tests/data/devices/centralite-3300.json @@ -0,0 +1,528 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:51:73:e6:7b", + "nwk": "0x2463", + "manufacturer": "CentraLite", + "model": "3300", + "friendly_manufacturer": "CentraLite", + "friendly_model": "3300", + "name": "CentraLite 3300", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4174, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.680462+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": 4174, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "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": "CentraLite" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "3300" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0040", + "name": "battery_2_voltage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0060", + "name": "battery_3_voltage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": 2 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2335 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 98, + 152, + 214, + 254, + 255, + 179, + 91, + 76 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 37 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 21 + } + ] + }, + { + "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": 520573712 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:73:e6:7b-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:51:73:e6:7b:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "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:51:73:e6: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:51:73:e6:7b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "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:51:73:e6: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:51:73:e6:7b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6: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:51:73:e6: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:51:73:e6:7b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "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:51:73:e6:7b-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:51:73:e6:7b:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "Other", + "battery_quantity": 1, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:73:e6:7b-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:51:73:e6:7b:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.35 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:73:e6: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:51:73:e6:7b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:73:e6:7b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x1f075310", + "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/computime-slr2b.json b/tests/data/devices/computime-slr2b.json new file mode 100644 index 000000000..faecf7762 --- /dev/null +++ b/tests/data/devices/computime-slr2b.json @@ -0,0 +1,1357 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2e:80:b4:9c", + "nwk": "0x63B9", + "manufacturer": "Computime", + "model": "SLR2b", + "friendly_manufacturer": "Computime", + "friendly_model": "SLR2b", + "name": "Computime SLR2b", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4153, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.902026+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": 4153, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "5": { + "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": "Computime" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SLR2b" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [ + { + "id": "0x0000", + "name": "alarm_count", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + } + ] + }, + { + "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": "0x0041", + "name": "ac_capacity", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x003a", + "name": "emergency_heat_delta", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1864 + }, + { + "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": 3200 + }, + { + "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": 2100 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1900 + }, + { + "id": "0x0001", + "name": "outdoor_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "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", + "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": 0 + }, + { + "id": "0x0031", + "name": "setpoint_change_amount", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0009", + "name": "system_type_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0023", + "name": "temp_setpoint_hold", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0024", + "name": "temp_setpoint_hold_duration", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfd00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [] + }, + { + "cluster_id": "0xfd00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "6": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "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": "0x003a", + "name": "emergency_heat_delta", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 2100 + }, + { + "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": 1500 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2100 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 2200 + }, + { + "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": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "7": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + } + ] + } + ], + "out_clusters": [] + }, + "8": { + "profile_id": 260, + "device_type": { + "name": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-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:2e:80:b4:9c:5:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "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:2e:80:b4:9c-5", + "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": 5, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "5:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "available": true, + "group_id": null, + "max_temp": 32.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": 18.64, + "outdoor_temperature": null, + "target_temperature": 19.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": 2100, + "occupied_heating_setpoint": 1900, + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-6", + "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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "available": true, + "group_id": null, + "max_temp": 30.0, + "min_temp": 15.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "Thermostat", + "available": true, + "current_temperature": 21.0, + "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": 2100, + "occupied_heating_setpoint": 2200, + "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:2e:80:b4:9c-5-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": 5, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "5:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "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": 32.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-5-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": 5, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "5:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 32.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": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-6-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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "native_min_value": 15.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:2e:80:b4:9c-6-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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "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": 15.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-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": "Basic", + "type": "server" + }, + "id": "5:0x0000", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "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:2e:80:b4:9c-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": "Basic", + "type": "server" + }, + "id": "5:0x0000", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "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:2e:80:b4:9c-5-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": 5, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "5:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "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:2e:80:b4:9c-5-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": 5, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "5:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:5:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "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:2e:80:b4:9c-6-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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "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:2e:80:b4:9c-6-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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "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:2e:80:b4:9c-6-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": 6, + "cluster": { + "id": 513, + "name": "Thermostat", + "type": "server" + }, + "id": "6:0x0201", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:6:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 6, + "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:2e:80:b4:9c-7-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": 7, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "7:0x0402", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:7:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 7, + "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:2e:80:b4:9c-8-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": 8, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "8:0x0402", + "unique_id": "ab:cd:ef:12:2e:80:b4:9c:8:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 8, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:80:b4:9c-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:2e:80:b4:9c:5:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:80:b4:9c", + "endpoint_id": 5, + "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/d5x84yu-et093wrg.json b/tests/data/devices/d5x84yu-et093wrg.json new file mode 100644 index 000000000..380f45ab8 --- /dev/null +++ b/tests/data/devices/d5x84yu-et093wrg.json @@ -0,0 +1,1376 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:20:83:1e:1f", + "nwk": "0xC0D7", + "manufacturer": "D5X84YU", + "model": "eT093WRG", + "friendly_manufacturer": "D5X84YU", + "friendly_model": "eT093WRG", + "name": "D5X84YU eT093WRG", + "quirk_applied": true, + "quirk_class": "zhaquirks.danfoss.thermostat.DanfossThermostat", + "exposes_features": [ + "danfoss.ally_thermostat" + ], + "manufacturer_code": 4678, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.407205+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": "D5X84YU" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "eT093WRG" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 198 + }, + { + "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": 32 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "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", + "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": "0x0046", + "name": "ac_coil_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0045", + "name": "ac_louver_position", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1537 + }, + { + "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": "0x0019", + "name": "min_setpoint_dead_band", + "zcl_type": "int8", + "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": 1100 + }, + { + "id": "0x0035", + "name": "occupied_setback_min", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "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", + "value": 2 + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0023", + "name": "temp_setpoint_hold", + "zcl_type": "enum8", + "unsupported": true + }, + { + "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": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e: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:20:83:1e:1f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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": 15.37, + "outdoor_temperature": null, + "target_temperature": 11.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": 1100, + "pi_heating_demand": 1, + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e: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:20:83:1e:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e: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:20:83:1e:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e: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:20:83:1e:1f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 99.0, + "battery_voltage": 3.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0b05", + "status": "INITIALIZED", + "value_attribute": "sw_error_code" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossMotorStepCounter", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0b05", + "status": "INITIALIZED", + "value_attribute": "sw_error_code" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossSoftwareErrorCode", + "available": true, + "state": null, + "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": false, + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossAdaptationRunStatus", + "available": true, + "state": null, + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossLoadEstimate", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossOpenWindowDetection", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "DanfossPreheatTime", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e:1f-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:20:83:1e:1f:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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:20:83:1e: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:20:83:1e:1f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:20:83:1e:1f", + "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/danfoss-0x8040.json b/tests/data/devices/danfoss-0x8040.json new file mode 100644 index 000000000..2cc487661 --- /dev/null +++ b/tests/data/devices/danfoss-0x8040.json @@ -0,0 +1,927 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:07:55:96:1c", + "nwk": "0x41E2", + "manufacturer": "Danfoss", + "model": "0x8040", + "friendly_manufacturer": "Danfoss", + "friendly_model": "0x8040", + "name": "Danfoss 0x8040", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4678, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.030895+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": "0x8040" + } + ] + }, + { + "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": "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": 2392 + }, + { + "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": 400 + }, + { + "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": 2100 + }, + { + "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": "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": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": -32768 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 2700 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:55:96: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:07:55:96:1c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96: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:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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": 23.92, + "outdoor_temperature": null, + "target_temperature": 21.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": 2100, + "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:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 327.67, + "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:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "box", + "native_max_value": 35.0, + "native_min_value": -273.15000000000003, + "native_step": 0.5, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "MinHeatSetpointLimit", + "available": true, + "state": 4.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:55:96: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:07:55:96:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96: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:07:55:96: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:07:55:96:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96: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:07:55:96: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:07:55:96:1c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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:07:55:96:1c-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:07:55:96:1c:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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:07:55:96:1c-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:07:55:96:1c:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 27.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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:07:55:96: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": "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:07:55:96:1c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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:07:55:96: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:07:55:96:1c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:55:96:1c", + "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/datek-pop.json b/tests/data/devices/datek-pop.json new file mode 100644 index 000000000..0d55073c5 --- /dev/null +++ b/tests/data/devices/datek-pop.json @@ -0,0 +1,881 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "nwk": "0xDE54", + "manufacturer": "Datek", + "model": "PoP", + "friendly_manufacturer": "Datek", + "friendly_model": "PoP", + "name": "Datek PoP", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4919, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.873027+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": 4919, + "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": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Datek" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "PoP" + } + ] + }, + { + "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": [ + { + "id": "0x0000", + "name": "alarm_count", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2238 + } + ] + }, + { + "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": 50403 + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0302", + "name": "ac_frequency_max", + "zcl_type": "uint16", + "value": 54824 + }, + { + "id": "0x0400", + "name": "ac_frequency_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "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": 0 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "value": 2245 + }, + { + "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": "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", + "value": 9591 + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 23633 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "value": 24254 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfee1", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfeed", + "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": [] + } + ] + }, + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.38 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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", + "active_power_max": 2245.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 50.403, + "measurement_type": "ACTIVE_MEASUREMENT", + "ac_frequency_max": 54.824 + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": null, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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", + "rms_current_max": 9.591 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 236.33, + "measurement_type": "ACTIVE_MEASUREMENT", + "rms_voltage_max": 242.54 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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:cd:d1:2a:c9-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:cd:d1:2a:c9:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:d1:2a:c9", + "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/datek-ssds.json b/tests/data/devices/datek-ssds.json new file mode 100644 index 000000000..61db0c644 --- /dev/null +++ b/tests/data/devices/datek-ssds.json @@ -0,0 +1,446 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f7:d4:84:f4", + "nwk": "0xAACB", + "manufacturer": "Datek", + "model": "SSDS", + "friendly_manufacturer": "Datek", + "friendly_model": "SSDS", + "name": "Datek SSDS", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4919, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.025963+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": 4919, + "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": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Datek" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SSDS" + } + ] + }, + { + "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": 255 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2435 + } + ] + }, + { + "cluster_id": "0xfea7", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfeed", + "endpoint_attribute": "manufacturer_specific", + "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": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:d4:84: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:f7:d4:84:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84: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:f7:d4:84: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:f7:d4:84:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84: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:f7:d4:84: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:f7:d4:84:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84:f4", + "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:f7:d4:84: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:f7:d4:84:f4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_voltage": 25.5 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:d4:84:f4-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:f7:d4:84:f4:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84:f4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 24.35 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:d4:84: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:f7:d4:84:f4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:d4:84: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/ecodim-bv-ecodim-zigbee-3-0.json b/tests/data/devices/ecodim-bv-ecodim-zigbee-3-0.json new file mode 100644 index 000000000..485e52bec --- /dev/null +++ b/tests/data/devices/ecodim-bv-ecodim-zigbee-3-0.json @@ -0,0 +1,807 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:52:45:d8:51", + "nwk": "0xC5F8", + "manufacturer": "EcoDim BV", + "model": "EcoDim-Zigbee 3.0", + "friendly_manufacturer": "EcoDim BV", + "friendly_model": "EcoDim-Zigbee 3.0", + "name": "EcoDim BV EcoDim-Zigbee 3.0", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.653086+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": "EcoDim-Zigbee 3.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": "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", + "value": 1 + }, + { + "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": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 190 + }, + { + "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", + "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": [] + } + ] + }, + "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": 210 + }, + { + "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": 210 + }, + { + "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": [] + } + ] + }, + "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:52:45:d8:51-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:45:d8:51:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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:52:45:d8:51-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:52:45:d8:51: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:52:45:d8:51:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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": 190, + "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:52:45:d8:51-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:52:45:d8:51: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:52:45:d8:51:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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": 210, + "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:52:45:d8:51-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:52:45:d8:51:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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:52:45:d8:51-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:52:45:d8:51:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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": 210 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:45:d8:51-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:52:45:d8:51:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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:52:45:d8:51-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:52:45:d8:51:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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:52:45:d8:51-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:45:d8:51:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:45:d8:51-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:52:45:d8:51:2:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:45:d8:51", + "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/ewelink-ms01.json b/tests/data/devices/ewelink-ms01.json new file mode 100644 index 000000000..aad8219ee --- /dev/null +++ b/tests/data/devices/ewelink-ms01.json @@ -0,0 +1,383 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5e:7d:ad:d6", + "nwk": "0x2DF8", + "manufacturer": "eWeLink", + "model": "MS01", + "friendly_manufacturer": "eWeLink", + "friendly_model": "MS01", + "name": "eWeLink MS01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.327234+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": "MS01" + } + ] + }, + { + "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": [ + 103, + 70, + 219, + 254, + 255, + 193, + 199, + 92 + ] + }, + { + "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 + } + ] + } + ], + "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:5e:7d:ad:d6-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:5e:7d:ad:d6:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:7d:ad:d6", + "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:5e:7d:ad: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:5e:7d:ad:d6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:7d:ad:d6", + "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:5e:7d:ad: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:5e:7d:ad:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:7d:ad: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:5e:7d:ad: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:5e:7d:ad:d6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:7d:ad:d6", + "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:5e:7d:ad:d6-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:5e:7d:ad:d6:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:5e:7d:ad:d6", + "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/ewelink-snzb-03p.json b/tests/data/devices/ewelink-snzb-03p.json new file mode 100644 index 000000000..b6b6b03bc --- /dev/null +++ b/tests/data/devices/ewelink-snzb-03p.json @@ -0,0 +1,579 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cb:2e:18:c7", + "nwk": "0xFB8F", + "manufacturer": "eWeLink", + "model": "SNZB-03P", + "friendly_manufacturer": "eWeLink", + "friendly_model": "SNZB-03P", + "name": "eWeLink SNZB-03P", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.200513+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": "OCCUPANCY_SENSOR", + "id": 263 + }, + "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-03P" + } + ] + }, + { + "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": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "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": 60 + }, + { + "id": "0x0021", + "name": "ultrasonic_u_to_o_delay", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 209, + 24, + 34, + 254, + 255, + 39, + 135, + 4 + ] + }, + { + "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": "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": 8705 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cb:2e:18:c7-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:cb:2e:18:c7:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:cb:2e:18:c7-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:cb:2e:18:c7:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:cb:2e:18:c7-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:cb:2e:18:c7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:cb:2e:18:c7-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:cb:2e:18:c7:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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": 60 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cb:2e:18:c7-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:2e:18:c7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:2e:18:c7-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:2e:18:c7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:cb:2e:18:c7-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:cb:2e:18:c7:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "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:cb:2e:18:c7-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:2e:18:c7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:2e:18:c7", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00002201", + "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-zb-sw01.json b/tests/data/devices/ewelink-zb-sw01.json new file mode 100644 index 000000000..7c0d1210d --- /dev/null +++ b/tests/data/devices/ewelink-zb-sw01.json @@ -0,0 +1,315 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f8:28:3c:8f", + "nwk": "0x8674", + "manufacturer": "eWeLink", + "model": "ZB-SW01", + "friendly_manufacturer": "eWeLink", + "friendly_model": "ZB-SW01", + "name": "eWeLink ZB-SW01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.722063+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": "eWeLink" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ZB-SW01" + } + ] + }, + { + "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:f8:28:3c: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:f8:28:3c:8f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:28:3c:8f", + "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:f8:28:3c:8f-1", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "ForceOnLight", + "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:f8:28:3c:8f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f8:28:3c:8f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 8, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "ForceOnLight", + "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:f8:28:3c: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:f8:28:3c:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:28:3c: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:f8:28:3c: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:f8:28:3c:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:28:3c:8f", + "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/frient-a-s-moszb-140.json b/tests/data/devices/frient-a-s-moszb-140.json new file mode 100644 index 000000000..d6043b7cb --- /dev/null +++ b/tests/data/devices/frient-a-s-moszb-140.json @@ -0,0 +1,762 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a5:49:dd:25", + "nwk": "0x0281", + "manufacturer": "frient A/S", + "model": "MOSZB-140", + "friendly_manufacturer": "frient A/S", + "friendly_model": "MOSZB-140", + "name": "frient A/S MOSZB-140", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4117, + "power_source": "Battery or Unknown", + "lqi": 192, + "rssi": -52, + "last_seen": "2025-11-01T10:12:29.732810+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": 0, + "manufacturer_code": 4117, + "maximum_buffer_size": 80, + "maximum_incoming_transfer_size": 80, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 80, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 49353, + "device_type": { + "name": "unknown", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "34": { + "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": "frient A/S" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "MOSZB-140" + } + ] + }, + { + "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": [] + }, + "35": { + "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": "0x003e", + "name": "battery_alarm_state", + "zcl_type": "map32", + "value": 0 + }, + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 200 + }, + { + "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": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000f", + "endpoint_attribute": "binary_input", + "attributes": [ + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Motion" + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 74, + 238, + 77, + 254, + 255, + 106, + 77, + 252 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 53 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + } + ], + "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": 262150 + } + ] + } + ] + }, + "38": { + "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": 2043 + } + ] + } + ], + "out_clusters": [] + }, + "39": { + "profile_id": 260, + "device_type": { + "name": "LIGHT_SENSOR", + "id": 262 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 26490 + } + ] + } + ], + "out_clusters": [] + }, + "40": { + "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": [] + }, + "41": { + "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": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 1280, + "name": "IAS Zone", + "type": "server" + }, + "id": "35:0x0500", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "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:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "35:0x0003", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "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:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "35:0x0000", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "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:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "35:0x0000", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -52 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "35:0x0001", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "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, + "battery_voltage": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a5:49:dd:25-38-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": 38, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "38:0x0402", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:38:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 38, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 20.43 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a5:49:dd:25-39-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": 39, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "39:0x0400", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:39:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 39, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 446 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a5:49:dd:25-35-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": 35, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "35:0x0019_client", + "unique_id": "ab:cd:ef:12:a5:49:dd:25:35:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a5:49:dd:25", + "endpoint_id": 35, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00040006", + "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/generic-zigbee-coordinator-ezsp.json b/tests/data/devices/generic-zigbee-coordinator-ezsp.json new file mode 100644 index 000000000..973b213c8 --- /dev/null +++ b/tests/data/devices/generic-zigbee-coordinator-ezsp.json @@ -0,0 +1,125 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:90:34:24:63", + "nwk": "0x0000", + "manufacturer": "", + "model": "Generic Zigbee Coordinator (EZSP)", + "friendly_manufacturer": "", + "friendly_model": "Generic Zigbee Coordinator (EZSP)", + "name": " Generic Zigbee Coordinator (EZSP)", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 43981, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:48:19.945695+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/gledopto-gl-b-008z.json b/tests/data/devices/gledopto-gl-b-008z.json new file mode 100644 index 000000000..4a36bd171 --- /dev/null +++ b/tests/data/devices/gledopto-gl-b-008z.json @@ -0,0 +1,464 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:80:5a:bb:1b", + "nwk": "0x0A04", + "manufacturer": "GLEDOPTO", + "model": "GL-B-008Z", + "friendly_manufacturer": "GLEDOPTO", + "friendly_model": "GL-B-008Z", + "name": "GLEDOPTO GL-B-008Z", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:40.052747+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": { + "11": { + "profile_id": 49246, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 528 + }, + "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", + "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": 31 + }, + { + "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", + "unsupported": true + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 20 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 219 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 12480 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 47190 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:80:5a:bb:1b-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:80:5a:bb:1b:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:5a:bb:1b", + "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:80:5a:bb:1b-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:80:5a:bb:1b: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:80:5a:bb:1b: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:80:5a:bb:1b:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:80:5a:bb:1b", + "endpoint_id": 11, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": [ + 0.19043259327077133, + 0.7200732433051041 + ], + "color_temp": 500, + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:80:5a:bb:1b-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:80:5a:bb:1b:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:5a:bb:1b", + "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:80:5a:bb:1b-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:80:5a:bb:1b:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:5a:bb:1b", + "endpoint_id": 11, + "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/gledopto-gl-c-009p.json b/tests/data/devices/gledopto-gl-c-009p.json new file mode 100644 index 000000000..3ad210324 --- /dev/null +++ b/tests/data/devices/gledopto-gl-c-009p.json @@ -0,0 +1,675 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8c:97:e8:62", + "nwk": "0x26A7", + "manufacturer": "GLEDOPTO", + "model": "GL-C-009P", + "friendly_manufacturer": "GLEDOPTO", + "friendly_model": "GL-C-009P", + "name": "GLEDOPTO GL-C-009P", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4687, + "power_source": "Mains", + "lqi": 200, + "rssi": -61, + "last_seen": "2025-11-08T15:56:28.342584+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": "GLEDOPTO" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "GL-C-009P" + } + ] + }, + { + "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": 166 + }, + { + "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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "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": 5 + }, + { + "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": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 500 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 11653 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 46664 + }, + { + "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": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 687943681 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:97:e8:62-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:8c:97:e8:62:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "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:8c:97:e8:62-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:8c:97:e8:62: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:8c:97:e8:62: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:8c:97:e8:62:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "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": 166, + "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" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:97:e8:62-11-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": 11, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "11:0x0300", + "unique_id": "ab:cd:ef:12:8c:97:e8:62:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "endpoint_id": 11, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 500, + "native_min_value": 158, + "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:8c:97:e8:62-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:8c:97:e8:62:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "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:8c:97:e8:62-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:8c:97:e8:62:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "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:8c:97:e8:62-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:8c:97:e8:62:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "endpoint_id": 11, + "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:8c:97:e8:62-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:8c:97:e8:62:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "endpoint_id": 11, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -61 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8c:97:e8:62-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:8c:97:e8:62:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8c:97:e8:62", + "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/gledpopto-gl-c-007p.json b/tests/data/devices/gledpopto-gl-c-007p.json new file mode 100644 index 000000000..e20e6430b --- /dev/null +++ b/tests/data/devices/gledpopto-gl-c-007p.json @@ -0,0 +1,750 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ce:0d:48:29", + "nwk": "0x57B2", + "manufacturer": "GLEDPOPTO", + "model": "GL-C-007P", + "friendly_manufacturer": "GLEDPOPTO", + "friendly_model": "GL-C-007P", + "name": "GLEDPOPTO GL-C-007P", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.876608+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": { + "11": { + "profile_id": 260, + "device_type": { + "name": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "GLEDPOPTO" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "GL-C-007P" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "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": [] + }, + { + "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": 0 + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 211 + }, + { + "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": 0 + } + ] + }, + { + "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": 2 + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 495 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 158 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 495 + }, + { + "id": "0x0006", + "name": "compensation_text", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 17623 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 43739 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 158 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:ce:0d:48:29-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:ce:0d:48:29:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "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:ce:0d:48:29-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:ce:0d:48:29: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:ce:0d:48:29: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:ce:0d:48:29:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "endpoint_id": 11, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 158, + "max_mireds": 495 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 211, + "xy_color": [ + 0.26890974288548103, + 0.6674143587396048 + ], + "color_temp": 495, + "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:ce:0d:48:29-11-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": 11, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "11:0x0300", + "unique_id": "ab:cd:ef:12:ce:0d:48:29:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "endpoint_id": 11, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 495, + "native_min_value": 158, + "native_step": 1.0, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "StartUpColorTemperatureConfigurationEntity", + "available": true, + "state": 158 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:0d:48:29-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:ce:0d:48:29:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "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": 0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:0d:48:29-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:ce:0d:48:29:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "endpoint_id": 11, + "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:ce:0d:48:29-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:ce:0d:48:29:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "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:ce:0d:48:29-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:ce:0d:48:29:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "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:ce:0d:48:29-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:ce:0d:48:29:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:0d:48:29", + "endpoint_id": 11, + "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/heiman-smokesensor-em.json b/tests/data/devices/heiman-smokesensor-em.json new file mode 100644 index 000000000..befe2ecb6 --- /dev/null +++ b/tests/data/devices/heiman-smokesensor-em.json @@ -0,0 +1,458 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5b:49:00:53", + "nwk": "0x0ED6", + "manufacturer": "HEIMAN", + "model": "SmokeSensor-EM", + "friendly_manufacturer": "HEIMAN", + "friendly_model": "SmokeSensor-EM", + "name": "HEIMAN SmokeSensor-EM", + "quirk_applied": true, + "quirk_class": "zhaquirks.heiman.smoke.HeimanSmokeEM", + "exposes_features": [], + "manufacturer_code": 4619, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.860047+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": 4619, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "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": "HEIMAN" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SmokeSensor-EM" + } + ] + }, + { + "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": 32 + } + ] + }, + { + "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, + 163, + 90, + 254, + 255, + 192, + 130, + 240 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 32 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 40 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "HEIMAN", + "SmokeSensor-EM" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0402", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0500", + "0x0502" + ], + "output_clusters": [ + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5b:49:00:53-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:5b:49:00:53:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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:5b:49:00:53-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:5b:49:00:53:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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:5b:49:00:53-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:5b:49:00:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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:5b:49:00:53-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:5b:49:00:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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:5b:49:00:53-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:5b:49:00:53:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5b:49:00:53-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:5b:49:00:53:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5b:49:00:53", + "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/horn-zone-haier-hs-22zw-0000011216.json b/tests/data/devices/horn-zone-haier-hs-22zw-0000011216.json new file mode 100644 index 000000000..3efe95bfd --- /dev/null +++ b/tests/data/devices/horn-zone-haier-hs-22zw-0000011216.json @@ -0,0 +1,277 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e2:16:2d:16", + "nwk": "0x9E37", + "manufacturer": "HORN-ZONE-HAIER ", + "model": "HS-22ZW 0000011216", + "friendly_manufacturer": "HORN-ZONE-HAIER ", + "friendly_model": "HS-22ZW 0000011216", + "name": "HORN-ZONE-HAIER HS-22ZW 0000011216", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.592814+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": "HORN-ZONE-HAIER " + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "HS-22ZW 0000011216" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ], + "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 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e2:16:2d:16-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:e2:16:2d:16:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e2:16:2d:16", + "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:e2:16:2d:16-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:e2:16:2d:16:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:16:2d:16", + "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:e2:16:2d:16-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:e2:16:2d:16:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:16:2d:16", + "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:e2:16:2d:16-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:e2:16:2d:16:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:16:2d:16", + "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/ikea-of-sweden-tradfri-bulb-e27-ws-globe-1055lm.json b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ws-globe-1055lm.json new file mode 100644 index 000000000..126a184b4 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-tradfri-bulb-e27-ws-globe-1055lm.json @@ -0,0 +1,806 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:54:27:c9:2f", + "nwk": "0xD172", + "manufacturer": "IKEA of Sweden", + "model": "TRADFRI bulb E27 WS globe 1055lm", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "TRADFRI bulb E27 WS globe 1055lm", + "name": "IKEA of Sweden TRADFRI bulb E27 WS globe 1055lm", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4476, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.771779+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 E27 WS globe 1055lm" + } + ] + }, + { + "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": 234 + }, + { + "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": 234 + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 3 + }, + { + "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": 1 + }, + { + "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": 250 + }, + { + "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", + "value": 30015 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 26870 + }, + { + "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", + "value": 443 + } + ] + }, + { + "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": 33816581 + } + ] + } + ] + }, + "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:54:27:c9:2f-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:54:27:c9:2f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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:54:27:c9:2f-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:54:27:c9:2f: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:54:27:c9:2f: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:54:27:c9:2f:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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": false, + "brightness": 234, + "xy_color": null, + "color_temp": 250, + "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:54:27:c9:2f-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:54:27:c9:2f:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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": 443 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:54:27:c9:2f-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:54:27:c9:2f:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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": 234 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:54:27:c9:2f-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:54:27:c9:2f:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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:54:27:c9:2f-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:54:27:c9:2f:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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:54:27:c9:2f-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:54:27:c9:2f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "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:54:27:c9: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:54:27:c9:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9: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:54:27:c9: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:54:27:c9:2f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9: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:54:27:c9: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:54:27:c9:2f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:27:c9:2f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x02040005", + "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-gu10-ww-345lm8.json b/tests/data/devices/ikea-of-sweden-tradfri-bulb-gu10-ww-345lm8.json new file mode 100644 index 000000000..012e9a8b4 --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-tradfri-bulb-gu10-ww-345lm8.json @@ -0,0 +1,654 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "nwk": "0x0174", + "manufacturer": "IKEA of Sweden", + "model": "\u001aTRADFRI bulb GU10 WW 345lm8", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "\u001aTRADFRI bulb GU10 WW 345lm8", + "name": "IKEA of Sweden \u001aTRADFRI bulb GU10 WW 345lm8", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4476, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:20.983681+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": "\u001aTRADFRI bulb GU10 WW 345lm8" + } + ] + }, + { + "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": 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", + "value": 0 + }, + { + "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": "0xfc7c", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "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:ec:ce:b7:e4-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:ce:b7:e4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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:ce:b7:e4-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:ce:b7:e4: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:ce:b7:e4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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": 1, + "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:ec:ce:b7:e4-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:ec:ce:b7:e4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ec:ce:b7:e4-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:ec:ce:b7:e4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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:ec:ce:b7:e4-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:ec:ce:b7:e4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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:ec:ce:b7:e4-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:ec:ce:b7:e4:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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:ec:ce:b7: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:ec:ce:b7:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7: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:ec:ce:b7: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:ec:ce:b7:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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:ec:ce:b7: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:ec:ce:b7:e4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:ce:b7:e4", + "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-tradfri-shortcut-button.json b/tests/data/devices/ikea-of-sweden-tradfri-shortcut-button.json new file mode 100644 index 000000000..986cdfc2b --- /dev/null +++ b/tests/data/devices/ikea-of-sweden-tradfri-shortcut-button.json @@ -0,0 +1,405 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "nwk": "0x8047", + "manufacturer": "IKEA of Sweden", + "model": "TRADFRI SHORTCUT Button", + "friendly_manufacturer": "IKEA of Sweden", + "friendly_model": "TRADFRI SHORTCUT Button", + "name": "IKEA of Sweden TRADFRI SHORTCUT Button", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4476, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.202151+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": "TRADFRI SHORTCUT Button" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 360 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 10 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 29 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "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": "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7d:a7:c6:3b-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:a7:c6:3b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "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:a7:c6:3b-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:a7:c6:3b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "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:7d:a7:c6:3b-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:a7:c6:3b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "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:7d:a7:c6:3b-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:a7:c6:3b:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 180.0, + "battery_size": "CR2032", + "battery_quantity": 1, + "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:7d:a7:c6:3b-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:a7:c6:3b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7d:a7:c6:3b", + "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/imagic-by-greatstar-1112-s.json b/tests/data/devices/imagic-by-greatstar-1112-s.json new file mode 100644 index 000000000..7a801b64a --- /dev/null +++ b/tests/data/devices/imagic-by-greatstar-1112-s.json @@ -0,0 +1,628 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:06:61:9f:d3", + "nwk": "0x444E", + "manufacturer": "iMagic by GreatStar", + "model": "1112-S", + "friendly_manufacturer": "iMagic by GreatStar", + "friendly_model": "1112-S", + "name": "iMagic by GreatStar 1112-S", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4667, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.777259+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": 4667, + "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": "iMagic by GreatStar" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "1112-S" + } + ] + }, + { + "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": 0 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 56 + } + ] + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2570 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 3080 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "bc:02:6e:ff:fe:22:9c:95" + }, + { + "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": 541 + } + ] + }, + { + "cluster_id": "0x0501", + "endpoint_attribute": "ias_ace", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0501", + "endpoint_attribute": "ias_ace", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "alarm_control_panel": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:06:61:9f:d3-1-1281", + "migrate_unique_ids": [], + "platform": "alarm_control_panel", + "class_name": "AlarmControlPanel", + "translation_key": "alarm_control_panel", + "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": "IasAceClusterHandler", + "generic_id": "cluster_handler_0x0501", + "endpoint_id": 1, + "cluster": { + "id": 1281, + "name": "IAS Ancillary Control Equipment", + "type": "client" + }, + "id": "1:0x0501", + "unique_id": "ab:cd:ef:12:06:61:9f:d3:1:0x0501", + "status": "CONFIGURED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "code_arm_required": false, + "code_format": "number", + "supported_features": 15 + }, + "state": { + "class_name": "AlarmControlPanel", + "available": true, + "state": "disarmed" + } + } + ], + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:06:61:9f:d3-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:06:61:9f:d3:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "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:06:61:9f: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:06:61:9f:d3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "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:06:61:9f: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:06:61:9f:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f: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:06:61:9f: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:06:61:9f:d3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "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:06:61:9f:d3-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:06:61:9f:d3:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "Unknown", + "battery_quantity": 0, + "battery_voltage": 5.6 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:06:61:9f:d3-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:06:61:9f:d3:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 25.7 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:06:61:9f:d3-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:06:61:9f:d3:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 30.8 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:06:61:9f: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:06:61:9f:d3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:06:61:9f:d3", + "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/innr-rc-250.json b/tests/data/devices/innr-rc-250.json new file mode 100644 index 000000000..9587f9e54 --- /dev/null +++ b/tests/data/devices/innr-rc-250.json @@ -0,0 +1,404 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:25:3a:b6:6f", + "nwk": "0xDD91", + "manufacturer": "innr", + "model": "RC 250", + "friendly_manufacturer": "innr", + "friendly_model": "RC 250", + "name": "innr RC 250", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4454, + "power_source": "Battery or Unknown", + "lqi": 204, + "rssi": -60, + "last_seen": "2025-11-29T13:02:15.439930+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": 4454, + "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": "innr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "RC 250" + } + ] + }, + { + "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": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 25 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfd01", + "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": 554198272 + } + ] + }, + { + "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:25:3a:b6:6f-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:25:3a:b6:6f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:3a:b6:6f", + "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:25:3a:b6: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:25:3a:b6:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:3a:b6:6f", + "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:25:3a:b6: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:25:3a:b6:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:3a:b6:6f", + "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:25:3a:b6: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:25:3a:b6:6f:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:25:3a:b6:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 10.0, + "battery_size": "Other", + "battery_quantity": 1, + "battery_voltage": 2.5 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:25:3a:b6: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:25:3a:b6:6f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:3a:b6:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x21086500", + "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-rs-232-c.json b/tests/data/devices/innr-rs-232-c.json new file mode 100644 index 000000000..fc9d51972 --- /dev/null +++ b/tests/data/devices/innr-rs-232-c.json @@ -0,0 +1,888 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f1:3f:19:36", + "nwk": "0xF875", + "manufacturer": "innr", + "model": "RS 232 C", + "friendly_manufacturer": "innr", + "friendly_model": "RS 232 C", + "name": "innr RS 232 C", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4454, + "power_source": "Mains", + "lqi": 100, + "rssi": -86, + "last_seen": "2025-11-19T23:42:46.107628+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": 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": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "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": "RS 232 C" + } + ] + }, + { + "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": "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": 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": 497 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 34443 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 27097 + }, + { + "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": "0xfc57", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc82", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 571806993 + } + ] + } + ] + }, + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36: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:f1:3f:19:36: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:f1:3f:19:36:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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.5255664911879149, + 0.4134737163347829 + ], + "color_temp": 497, + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:f1:3f:19:36:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "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:f1:3f:19:36-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:3f:19:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 100 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:3f:19:36-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:3f:19:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -86 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:3f:19:36-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:3f:19:36:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:3f:19:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x22151511", + "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/ledvance-a60s-rgbw.json b/tests/data/devices/ledvance-a60s-rgbw.json new file mode 100644 index 000000000..48a6ed599 --- /dev/null +++ b/tests/data/devices/ledvance-a60s-rgbw.json @@ -0,0 +1,1073 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:43:dd:e3:9b", + "nwk": "0xF4D9", + "manufacturer": "LEDVANCE", + "model": "A60S RGBW", + "friendly_manufacturer": "LEDVANCE", + "friendly_model": "A60S RGBW", + "name": "LEDVANCE A60S RGBW", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4489, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:58.989436+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": 4489, + "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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "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": 2 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LEDVANCE" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "A60S RGBW" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "02136550" + }, + { + "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": 1 + }, + { + "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": 1 + }, + { + "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": "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", + "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", + "value": 254 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "max_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0005", + "name": "min_frequency", + "zcl_type": "uint16", + "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", + "value": 0 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0001", + "name": "remaining_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x400a", + "name": "color_capabilities", + "zcl_type": "map16", + "value": 31 + }, + { + "id": "0x4002", + "name": "color_loop_active", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x4003", + "name": "color_loop_direction", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x4005", + "name": "color_loop_start_enhanced_hue", + "zcl_type": "uint16", + "value": 8960 + }, + { + "id": "0x4006", + "name": "color_loop_stored_enhanced_hue", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4004", + "name": "color_loop_time", + "zcl_type": "uint16", + "value": 25 + }, + { + "id": "0x0008", + "name": "color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x003c", + "name": "color_point_b_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x003a", + "name": "color_point_b_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x003b", + "name": "color_point_b_y", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x400c", + "name": "color_temp_physical_max", + "zcl_type": "uint16", + "value": 370 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0006", + "name": "compensation_text", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x400d", + "name": "couple_color_temp_to_level_min", + "zcl_type": "uint16", + "value": 200 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 253 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 2399 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 2409 + }, + { + "id": "0x4001", + "name": "enhanced_color_mode", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0010", + "name": "num_primaries", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0013", + "name": "primary1_intensity", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0011", + "name": "primary1_x", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "remaining_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0030", + "name": "white_point_x", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0x011b", + "name": "average_mac_retry_per_aps_message_sent", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x011c", + "name": "last_message_lqi", + "zcl_type": "uint8", + "value": 156 + }, + { + "id": "0x011d", + "name": "last_message_rssi", + "zcl_type": "int8", + "value": -61 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "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": 34891088 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x000a", + "name": "image_stamp", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0x0008", + "name": "image_type_id", + "zcl_type": "uint16", + "value": 160 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4489 + }, + { + "id": "0x0009", + "name": "minimum_block_req_delay", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": "e0:79:8d:ff:fe:d3:b1:44" + } + ] + } + ] + }, + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "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:43:dd:e3:9b-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:43:dd:e3:9b: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:43:dd:e3:9b: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:43:dd:e3:9b:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 153, + "max_mireds": 370 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 254, + "xy_color": [ + 0.03660639353017472, + 0.03675898374914168 + ], + "color_temp": 153, + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 370, + "native_min_value": 153, + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "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:43:dd:e3:9b-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:43:dd:e3:9b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:dd:e3:9b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x02146550", + "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-mobile-outlet.json b/tests/data/devices/legrand-mobile-outlet.json new file mode 100644 index 000000000..e6133cc87 --- /dev/null +++ b/tests/data/devices/legrand-mobile-outlet.json @@ -0,0 +1,1134 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:00:e8:bc:6f", + "nwk": "0xAA72", + "manufacturer": " Legrand", + "model": " Mobile outlet", + "friendly_manufacturer": " Legrand", + "friendly_model": " Mobile outlet", + "name": " Legrand Mobile outlet", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4129, + "power_source": "Mains", + "lqi": 224, + "rssi": -55, + "last_seen": "2025-11-05T10:35:00.863190+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": "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": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": " Legrand" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": " Mobile outlet" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "value": " https://developer.legrand.com" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "0065" + } + ] + }, + { + "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": "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": 1 + }, + { + "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", + "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": "0x0b04", + "endpoint_attribute": "electrical_measurement", + "attributes": [ + { + "id": "0x0803", + "name": "ac_active_power_overload", + "zcl_type": "int16", + "unsupported": true + }, + { + "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": 13 + }, + { + "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", + "value": 19 + }, + { + "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": 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": "0xfc01", + "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": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 6637055 + }, + { + "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 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0009", + "name": "minimum_block_req_delay", + "zcl_type": "uint16", + "value": 20 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000b", + "name": "upgrade_activation_policy", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0000", + "name": "upgrade_server_id", + "zcl_type": "EUI64", + "value": [ + 7, + 53, + 67, + 254, + 255, + 192, + 130, + 240 + ] + }, + { + "id": "0x000c", + "name": "upgrade_timeout_policy", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc: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:00:e8:bc:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc: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:00:e8:bc:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 13.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "VA" + }, + "state": { + "class_name": "ElectricalMeasurementApparentPower", + "available": true, + "state": 19.0, + "measurement_type": "ACTIVE_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc:6f-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:00:e8:bc:6f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "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:00:e8:bc: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:00:e8:bc:6f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:e8:bc:6f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x006545ff", + "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-ctrl-neutral2.json b/tests/data/devices/lumi-lumi-ctrl-neutral2.json new file mode 100644 index 000000000..d74309b56 --- /dev/null +++ b/tests/data/devices/lumi-lumi-ctrl-neutral2.json @@ -0,0 +1,669 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:35:1a:bf:9e", + "nwk": "0x1FEC", + "manufacturer": "LUMI", + "model": "lumi.ctrl_neutral2", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.ctrl_neutral2", + "name": "LUMI lumi.ctrl_neutral2", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4151, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:20.881630+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": 132, + "manufacturer_code": 4151, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 1, + "maximum_outgoing_transfer_size": 100, + "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": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.ctrl_neutral2" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 2300 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "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": 1 + } + ] + }, + { + "cluster_id": "0x0010", + "endpoint_attribute": "binary_output", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "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": 1 + } + ] + }, + { + "cluster_id": "0x0010", + "endpoint_attribute": "binary_output", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "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": 1 + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "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": 1 + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:1a:bf:9e-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:35:1a:bf:9e:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "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:35:1a:bf: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:35:1a:bf:9e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf: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:35:1a:bf: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:35:1a:bf:9e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "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:35:1a:bf:9e-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:35:1a:bf:9e:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 23.0 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:1a:bf:9e-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:35:1a:bf:9e:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "endpoint_id": 2, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:1a:bf:9e-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:35:1a:bf:9e:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:1a:bf:9e-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:35:1a:bf:9e:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "endpoint_id": 4, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": 1, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:1a:bf:9e-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:35:1a:bf:9e:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "endpoint_id": 5, + "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:35:1a:bf: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": "OtaClusterHandler", + "generic_id": "cluster_handler_0x0019", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "server" + }, + "id": "1:0x0019", + "unique_id": "ab:cd:ef:12:35:1a:bf:9e:1:0x0019", + "status": "INITIALIZED", + "value_attribute": null + }, + { + "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:35:1a:bf:9e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:1a:bf:9e", + "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/lumi-lumi-curtain-acn003.json b/tests/data/devices/lumi-lumi-curtain-acn003.json new file mode 100644 index 000000000..1f98e81ec --- /dev/null +++ b/tests/data/devices/lumi-lumi-curtain-acn003.json @@ -0,0 +1,531 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:26:4b:7b:ee", + "nwk": "0x2F28", + "manufacturer": "LUMI", + "model": "lumi.curtain.acn003", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.curtain.acn003", + "name": "LUMI lumi.curtain.acn003", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.659138+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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": 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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 11 + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 20001.0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:4b:7b:ee-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:4b:7b:ee:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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:26:4b:7b:ee-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": 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:26:4b:7b:ee:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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:26:4b:7b:ee-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:4b:7b:ee:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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:4b:7b:ee-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:4b:7b:ee:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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:26:4b:7b:ee-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:26:4b:7b:ee:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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:26:4b:7b:ee-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:26:4b:7b:ee:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 100 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:4b:7b:ee-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:26:4b:7b:ee:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:26:4b:7b:ee-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:4b:7b:ee:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:26:4b:7b:ee", + "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/lumi-lumi-curtain-hagl04.json b/tests/data/devices/lumi-lumi-curtain-hagl04.json new file mode 100644 index 000000000..b35d364e6 --- /dev/null +++ b/tests/data/devices/lumi-lumi-curtain-hagl04.json @@ -0,0 +1,560 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:43:8b:55:72", + "nwk": "0x3345", + "manufacturer": "LUMI", + "model": "lumi.curtain.hagl04", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.curtain.hagl04", + "name": "LUMI lumi.curtain.hagl04", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.278837+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": 132, + "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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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.curtain.hagl04" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 101 + }, + { + "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": "0x0003", + "endpoint_attribute": "identify", + "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", + "unsupported": true + }, + { + "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", + "unsupported": true + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 1.0 + }, + { + "id": "0x0068", + "name": "relinquish_default", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0013", + "endpoint_attribute": "multistate_output", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 0.0 + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "value": 0 + }, + { + "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", + "value": 0 + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 4 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:8b:55:72-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:43:8b:55:72:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "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:43:8b:55:72-1-258", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Cover", + "translation_key": "cover", + "translation_placeholders": null, + "device_class": "curtain", + "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:43:8b:55:72:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:8b:55:72-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:43:8b:55:72:1:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 100.0, + "native_min_value": 0, + "native_step": null, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": 1.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:8b:55:72-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:43:8b:55:72:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "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:43:8b:55:72-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:43:8b:55:72:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "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:43:8b:55:72-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:43:8b:55:72:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Drapery" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:8b:55:72-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:43:8b:55:72:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:43:8b:55:72", + "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 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-plug-maeu01.json b/tests/data/devices/lumi-lumi-plug-maeu01.json new file mode 100644 index 000000000..5f32b59f4 --- /dev/null +++ b/tests/data/devices/lumi-lumi-plug-maeu01.json @@ -0,0 +1,903 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:49:c1:10:71", + "nwk": "0xE95B", + "manufacturer": "LUMI", + "model": "lumi.plug.maeu01", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.plug.maeu01", + "name": "LUMI lumi.plug.maeu01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.348703+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": 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": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 29 + } + ] + }, + { + "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": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "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": 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", + "value": 1 + }, + { + "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": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_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:49:c1:10:71-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:49:c1:10:71:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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:49:c1:10: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:49:c1:10:71:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10: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:49:c1:10: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:49:c1:10:71:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10: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:49:c1:10:71-1-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": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:49:c1:10:71:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": null, + "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:49:c1:10:71-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:49:c1:10:71:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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:49:c1:10:71-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:49:c1:10:71:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.29 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:49:c1:10:71-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:49:c1:10:71:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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:49:c1:10:71-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:49:c1:10:71:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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:49:c1:10:71-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:49:c1:10:71:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:49:c1:10:71-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:49:c1:10:71:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementTotalActivePower", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:49:c1:10:71-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:49:c1:10:71:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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:49:c1:10: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:49:c1:10:71:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:c1:10:71", + "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/lumi-lumi-remote-b28ac1.json b/tests/data/devices/lumi-lumi-remote-b28ac1.json new file mode 100644 index 000000000..7c8616f34 --- /dev/null +++ b/tests/data/devices/lumi-lumi-remote-b28ac1.json @@ -0,0 +1,469 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b2:f6:6e:7d", + "nwk": "0x9CFA", + "manufacturer": "LUMI", + "model": "lumi.remote.b28ac1", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.remote.b28ac1", + "name": "LUMI lumi.remote.b28ac1", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.506951+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_SWITCH", + "id": 259 + }, + "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": 7 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 30 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT_SWITCH", + "id": 259 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT_SWITCH", + "id": 259 + }, + "in_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b2:f6:6e:7d-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:b2:f6:6e:7d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "command": "identify", + "args": [ + 5 + ], + "kwargs": {} + }, + "state": { + "class_name": "IdentifyButton", + "available": true + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Click mode", + "unique_id": "ab:cd:ef:12:b2:f6:6e:7d-1-click_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "click_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": "AqaraRemoteManuSpecificCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:b2:f6:6e:7d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "AqaraSwitchClickMode", + "options": [ + "Single", + "Multiple" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Operation mode", + "unique_id": "ab:cd:ef:12:b2:f6:6e:7d-1-operation_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "operation_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": "AqaraRemoteManuSpecificCluster", + "type": "server" + }, + "id": "1:0xfcc0", + "unique_id": "ab:cd:ef:12:b2:f6:6e:7d:1:0xfcc0", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "AqaraSwitchOperationMode", + "options": [ + "Command", + "Event" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b2:f6:6e: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:b2:f6:6e:7d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e: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:b2:f6:6e: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:b2:f6:6e:7d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e: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:b2:f6:6e:7d-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:b2:f6:6e:7d:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:b2:f6:6e:7d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "CR2", + "battery_quantity": 1, + "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/lumi-lumi-sen-ill-agl01.json b/tests/data/devices/lumi-lumi-sen-ill-agl01.json new file mode 100644 index 000000000..facabf997 --- /dev/null +++ b/tests/data/devices/lumi-lumi-sen-ill-agl01.json @@ -0,0 +1,391 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0d:d9:db:dd", + "nwk": "0x136D", + "manufacturer": "LUMI", + "model": "lumi.sen_ill.agl01", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.sen_ill.agl01", + "name": "LUMI lumi.sen_ill.agl01", + "quirk_applied": true, + "quirk_class": "zhaquirks.xiaomi.aqara.illumination.IlluminationT1", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.035752+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": "LIGHT_SENSOR", + "id": 262 + }, + "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": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.sen_ill.agl01" + } + ] + }, + { + "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": 7 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 32 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 33786 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "opple_cluster", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "LUMI", + "lumi.sen_ill.agl01" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0106", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0400" + ], + "output_clusters": [ + "0x0003" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:d9:db:dd-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:d9:db:dd:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:d9:db:dd", + "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:0d:d9:db:dd-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:0d:d9:db:dd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:d9:db:dd", + "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:d9:db:dd-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:0d:d9:db:dd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:d9:db:dd", + "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:d9:db:dd-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:0d:d9:db:dd:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:0d:d9:db:dd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "CR2", + "battery_quantity": 1, + "battery_voltage": 3.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:d9:db:dd-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": true, + "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:0d:d9:db:dd:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:0d:d9:db:dd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 2391 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/lumi-lumi-switch-b1lacn02.json b/tests/data/devices/lumi-lumi-switch-b1lacn02.json new file mode 100644 index 000000000..ca64035a7 --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-b1lacn02.json @@ -0,0 +1,607 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:63:c6:80:fe", + "nwk": "0x9A30", + "manufacturer": "LUMI", + "model": "lumi.switch.b1lacn02", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.b1lacn02", + "name": "LUMI lumi.switch.b1lacn02", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4151, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.149757+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": 132, + "manufacturer_code": 4151, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 1, + "maximum_outgoing_transfer_size": 100, + "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": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.b1lacn02" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 1700 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "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 + } + ] + }, + { + "cluster_id": "0x0010", + "endpoint_attribute": "binary_output", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "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 + } + ] + }, + { + "cluster_id": "0x0010", + "endpoint_attribute": "binary_output", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "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 + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:63:c6:80:fe-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:63:c6:80:fe:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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:63:c6:80:fe-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:63:c6:80:fe:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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:63:c6:80:fe-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:63:c6:80:fe:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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:63:c6:80:fe-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:63:c6:80:fe:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 17.0 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:63:c6:80:fe-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:63:c6:80:fe:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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:63:c6:80:fe-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:63:c6:80:fe:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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:63:c6:80:fe-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:63:c6:80:fe:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "endpoint_id": 4, + "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:63:c6:80:fe-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": "OtaClusterHandler", + "generic_id": "cluster_handler_0x0019", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "server" + }, + "id": "1:0x0019", + "unique_id": "ab:cd:ef:12:63:c6:80:fe:1:0x0019", + "status": "INITIALIZED", + "value_attribute": null + }, + { + "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:63:c6:80:fe:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:63:c6:80:fe", + "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/lumi-lumi-switch-b2naus01.json b/tests/data/devices/lumi-lumi-switch-b2naus01.json new file mode 100644 index 000000000..e2f090f5f --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-b2naus01.json @@ -0,0 +1,1086 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:af:a9:89:77", + "nwk": "0xAF40", + "manufacturer": "LUMI", + "model": "lumi.switch.b2naus01", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.b2naus01", + "name": "LUMI lumi.switch.b2naus01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.136724+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": 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_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "09-06-2019" + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.b2naus01" + } + ] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 1400 + } + ] + }, + { + "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": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "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": 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": 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": 207 + }, + { + "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", + "value": 1 + }, + { + "id": "0x0510", + "name": "power_factor", + "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": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_SWITCH", + "id": 0 + }, + "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": [] + }, + "21": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 20.666000366210938 + } + ] + } + ], + "out_clusters": [] + }, + "31": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "41": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [] + }, + "42": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [] + }, + "51": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [] + }, + "61": { + "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:af:a9:89:77-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:a9:89:77:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:a9:89:77:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:a9:89:77:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:af:a9:89:77:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:af:a9:89:77:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 14.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:a9:89:77-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:af:a9:89:77:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 20.7 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:a9:89:77-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:af:a9:89:77:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:a9:89:77-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:af:a9:89:77:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementTotalActivePower", + "available": true, + "state": 0.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:af:a9:89:77-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:af:a9:89:77:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:af:a9:89:77:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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:af:a9:89:77-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:a9:89:77:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:af:a9:89:77", + "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/lumi-lumi-switch-b2nc01.json b/tests/data/devices/lumi-lumi-switch-b2nc01.json new file mode 100644 index 000000000..7e285d0ec --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-b2nc01.json @@ -0,0 +1,1011 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c9:e1:af:79", + "nwk": "0xABC3", + "manufacturer": "LUMI", + "model": "lumi.switch.b2nc01", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.b2nc01", + "name": "LUMI lumi.switch.b2nc01", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.935657+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": 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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 22 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "12-07-2021" + }, + { + "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": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.b2nc01" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "value": "789S00092233" + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 2 + }, + { + "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", + "value": 1 + }, + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 24 + }, + { + "id": "0x0010", + "name": "dev_temp_alarm_mask", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0014", + "name": "high_temp_dwell_trip_point", + "zcl_type": "uint24", + "value": 3 + }, + { + "id": "0x0012", + "name": "high_temp_thres", + "zcl_type": "int16", + "value": 75 + } + ] + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 128 + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "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": "0x0005", + "name": "last_configured_by", + "zcl_type": "EUI64", + "value": "ff:ff:ff:ff:ff:ff:ff:ff" + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 128 + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "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", + "value": 1 + }, + { + "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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x004a", + "name": "number_of_states", + "zcl_type": "uint16", + "value": 6 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 0.0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "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": 22 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "12-07-2021" + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "LUMI" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "lumi.switch.b2nc01" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000d", + "name": "serial_number", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 2 + }, + { + "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": 2 + }, + { + "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": 3 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 128 + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "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": "0x0005", + "name": "last_configured_by", + "zcl_type": "EUI64", + "value": "ff:ff:ff:ff:ff:ff:ff:ff" + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 128 + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "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", + "value": 1 + }, + { + "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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x004a", + "name": "number_of_states", + "zcl_type": "uint16", + "value": 6 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 0.0 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfcc0", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [] + }, + "41": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [] + }, + "42": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ], + "out_clusters": [] + }, + "51": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.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": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c9:e1:af:79-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:c9:e1:af:79:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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:c9:e1:af:79-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:c9:e1:af:79:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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:c9:e1:af:79-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:c9:e1:af:79:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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:c9:e1:af:79-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:c9:e1:af:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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:c9:e1:af:79-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:c9:e1:af:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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:c9:e1:af:79-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:c9:e1:af:79:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.24 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c9:e1:af:79-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:c9:e1:af:79:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:e1:af:79", + "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/lumi-lumi-switch-n1aeu1.json b/tests/data/devices/lumi-lumi-switch-n1aeu1.json new file mode 100644 index 000000000..1a906828a --- /dev/null +++ b/tests/data/devices/lumi-lumi-switch-n1aeu1.json @@ -0,0 +1,861 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:76:e5:a3:fd", + "nwk": "0x3F09", + "manufacturer": "LUMI", + "model": "lumi.switch.n1aeu1", + "friendly_manufacturer": "LUMI", + "friendly_model": "lumi.switch.n1aeu1", + "name": "LUMI lumi.switch.n1aeu1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.260822+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": 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_SWITCH", + "id": 0 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0002", + "endpoint_attribute": "device_temperature", + "attributes": [ + { + "id": "0x0000", + "name": "current_temperature", + "zcl_type": "int16", + "value": 28 + } + ] + }, + { + "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": "0x0009", + "endpoint_attribute": "alarms", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x004a", + "name": "number_of_states", + "zcl_type": "uint16", + "value": 6 + }, + { + "id": "0x0051", + "name": "out_of_service", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 0.0 + }, + { + "id": "0x0067", + "name": "reliability", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000e", + "name": "state_text", + "zcl_type": "unk", + "unsupported": true + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "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", + "value": 0 + }, + { + "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": 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": 12 + }, + { + "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": "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": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "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": [] + } + ] + }, + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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:76:e5:a3:fd-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:e5:a3:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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:76:e5:a3:fd-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:e5:a3:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0002", + "status": "INITIALIZED", + "value_attribute": "current_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "DeviceTemperature", + "available": true, + "state": 0.28 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 1.2, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": null, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:76:e5:a3:fd-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:76:e5:a3:fd:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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:76:e5:a3:fd-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:e5:a3:fd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:76:e5:a3:fd", + "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/namron-as-1402790.json b/tests/data/devices/namron-as-1402790.json new file mode 100644 index 000000000..927e696eb --- /dev/null +++ b/tests/data/devices/namron-as-1402790.json @@ -0,0 +1,780 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2f:e9:5d:02", + "nwk": "0x0250", + "manufacturer": "NAMRON AS", + "model": "1402790", + "friendly_manufacturer": "NAMRON AS", + "friendly_model": "1402790", + "name": "NAMRON AS 1402790", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:58.502689+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": 4660, + "maximum_buffer_size": 108, + "maximum_incoming_transfer_size": 0, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 0, + "descriptor_capability_field": 80 + }, + "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": "NAMRON AS" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "1402790" + } + ] + }, + { + "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": "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", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "tolerance", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "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", + "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": "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": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "10": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfff0", + "id": 65520 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2f:e9:5d:02-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:2f:e9:5d:02:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-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:e9:5d:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-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:e9:5d:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-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:2f:e9:5d:02:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-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:2f:e9:5d:02:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-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:2f:e9:5d:02:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2f:e9:5d:02-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:2f:e9:5d:02:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "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:2f:e9:5d:02-10-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": 10, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "10:0x0019_client", + "unique_id": "ab:cd:ef:12:2f:e9:5d:02:10:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2f:e9:5d:02", + "endpoint_id": 10, + "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/niko-nv-battery-switch-2-button.json b/tests/data/devices/niko-nv-battery-switch-2-button.json new file mode 100644 index 000000000..8494a5f8e --- /dev/null +++ b/tests/data/devices/niko-nv-battery-switch-2-button.json @@ -0,0 +1,428 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f1:c5:12:a4", + "nwk": "0x5253", + "manufacturer": "NIKO NV", + "model": "Battery switch, 2 button", + "friendly_manufacturer": "NIKO NV", + "friendly_model": "Battery switch, 2 button", + "name": "NIKO NV Battery switch, 2 button", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4703, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.369935+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": 4703, + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "NIKO NV" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Battery switch, 2 button" + } + ] + }, + { + "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", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 31 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "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": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f1:c5:12:a4-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:f1:c5:12:a4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:c5:12:a4", + "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:f1:c5:12:a4-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:c5:12:a4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:c5:12:a4", + "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:c5:12:a4-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:c5:12:a4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:c5:12:a4", + "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:c5:12:a4-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:c5:12:a4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f1:c5:12:a4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "Other", + "battery_quantity": 1, + "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:f1:c5:12:a4-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:c5:12:a4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f1:c5:12:a4", + "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/niko-nv-battery-switch-4-button.json b/tests/data/devices/niko-nv-battery-switch-4-button.json new file mode 100644 index 000000000..a9fd983d1 --- /dev/null +++ b/tests/data/devices/niko-nv-battery-switch-4-button.json @@ -0,0 +1,485 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:23:5d:15:43", + "nwk": "0xBD47", + "manufacturer": "NIKO NV", + "model": "Battery switch, 4 button", + "friendly_manufacturer": "NIKO NV", + "friendly_model": "Battery switch, 4 button", + "name": "NIKO NV Battery switch, 4 button", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4703, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.795174+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": 4703, + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "NIKO NV" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Battery switch, 4 button" + } + ] + }, + { + "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", + "value": 200 + }, + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 32 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "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": 553936736 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:23:5d:15: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:23:5d:15:43:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:23:5d:15:43", + "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:23:5d:15: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:23:5d:15:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:23:5d:15: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:23:5d:15: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:23:5d:15:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:23:5d:15: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:23:5d:15:43-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:23:5d:15:43:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:23:5d:15:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "Other", + "battery_quantity": 1, + "battery_voltage": 3.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:23:5d:15:43-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:23:5d:15:43:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:23:5d:15:43", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x21046760", + "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/niko-nv-connectable-motor-control-3a.json b/tests/data/devices/niko-nv-connectable-motor-control-3a.json new file mode 100644 index 000000000..67a3c0b77 --- /dev/null +++ b/tests/data/devices/niko-nv-connectable-motor-control-3a.json @@ -0,0 +1,634 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0e:7d:6a:9a", + "nwk": "0x0898", + "manufacturer": "NIKO NV", + "model": "Connectable motor control,3A", + "friendly_manufacturer": "NIKO NV", + "friendly_model": "Connectable motor control,3A", + "name": "NIKO NV Connectable motor control,3A", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4703, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.841767+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": 4703, + "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_DEVICE", + "id": 514 + }, + "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": 2 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "20200930" + }, + { + "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": 255 + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "NIKO NV" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Connectable motor control,3A" + }, + { + "id": "0x0011", + "name": "physical_env", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "value": "www.niko.eu" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "313-690-00" + }, + { + "id": "0x0000", + "name": "zcl_version", + "zcl_type": "uint8", + "value": 3 + } + ] + }, + { + "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": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "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": 3 + }, + { + "id": "0x0003", + "name": "current_position_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0004", + "name": "current_position_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "deceleration_time_lift", + "zcl_type": "uint16", + "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": "0x0018", + "name": "intermediate_setpoints_lift", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0019", + "name": "intermediate_setpoints_tilt", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0005", + "name": "number_of_actuations_lift", + "zcl_type": "uint16", + "value": 56 + }, + { + "id": "0x0006", + "name": "number_of_actuations_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0001", + "name": "physical_closed_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "physical_closed_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "velocity_lift", + "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", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0x0116", + "name": "aps_decrypt_failures", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xfc00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 555089926 + } + ] + } + ] + }, + "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:7d:6a:9a-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:7d:6a:9a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a:9a", + "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:0e:7d:6a:9a-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:0e:7d:6a:9a:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a:9a", + "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:0e:7d:6a: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:0e:7d:6a:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a: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:0e:7d:6a: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:0e:7d:6a:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a: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:0e:7d:6a:9a-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:0e:7d:6a:9a:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Rollershade" + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0e:7d:6a: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:0e:7d:6a:9a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7d:6a:9a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x21160006", + "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/nodon-sin-4-fp-21.json b/tests/data/devices/nodon-sin-4-fp-21.json new file mode 100644 index 000000000..1b0dcbaea --- /dev/null +++ b/tests/data/devices/nodon-sin-4-fp-21.json @@ -0,0 +1,849 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a9:41:13:af", + "nwk": "0x3CFB", + "manufacturer": "NodOn", + "model": "SIN-4-FP-21", + "friendly_manufacturer": "NodOn", + "friendly_model": "SIN-4-FP-21", + "name": "NodOn SIN-4-FP-21", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4747, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.107276+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": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 3 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "2021" + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 52 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "NodOn" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SIN-4-FP-21" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 103 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "3.0.0-1.4.4" + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "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": 3 + }, + { + "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": "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", + "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": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 4738 + }, + { + "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": "0x000a", + "name": "default_update_period", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "value": 19 + }, + { + "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": 59 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc00", + "endpoint_attribute": "pilot_wire_cluster", + "attributes": [ + { + "id": "0x0000", + "name": "pilot_wire_mode", + "zcl_type": "uint8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "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", + "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:a9:41:13:af-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:a9:41:13:af:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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:a9:41:13:af-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:a9:41:13:af:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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": "Pilot wire mode", + "unique_id": "ab:cd:ef:12:a9:41:13:af-1-pilot_wire_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "pilot_wire_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": "PhillipsRemoteClusterHandler", + "generic_id": "cluster_handler_0xfc00", + "endpoint_id": 1, + "cluster": { + "id": 64512, + "name": "PilotWireCluster", + "type": "server" + }, + "id": "1:0xfc00", + "unique_id": "ab:cd:ef:12:a9:41:13:af:1:0xfc00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "NodOnPilotWireMode", + "options": [ + "Off", + "Comfort", + "Eco", + "FrostProtection", + "ComfortMinus1", + "ComfortMinus2" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:41:13:af-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:41:13:af:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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:41:13:af-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:41:13:af:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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:41:13:af-1-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": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:a9:41:13:af:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "endpoint_id": 1, + "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:a9:41:13:af-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:a9:41:13:af:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 4.738, + "device_type": "Electric Metering", + "status": "NO_ALARMS", + "zcl_unit_of_measurement": 0 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:41:13:af-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:a9:41:13:af:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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:a9:41:13:af-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:41:13:af:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:41:13:af", + "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/orvibo-250bccf66c41421b91b5e3242942c164.json b/tests/data/devices/orvibo-250bccf66c41421b91b5e3242942c164.json new file mode 100644 index 000000000..5226218d3 --- /dev/null +++ b/tests/data/devices/orvibo-250bccf66c41421b91b5e3242942c164.json @@ -0,0 +1,735 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d1:19:cf:59", + "nwk": "0xF47E", + "manufacturer": "ORVIBO", + "model": "250bccf66c41421b91b5e3242942c164", + "friendly_manufacturer": "ORVIBO", + "friendly_model": "250bccf66c41421b91b5e3242942c164", + "name": "ORVIBO 250bccf66c41421b91b5e3242942c164", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.809438+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": "COLOR_DIMMABLE_LIGHT", + "id": 258 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "ORVIBO" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "250bccf66c41421b91b5e3242942c164" + } + ] + }, + { + "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": 128 + }, + { + "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", + "value": 20 + }, + { + "id": "0x0011", + "name": "on_level", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "on_off_transition_time", + "zcl_type": "uint16", + "value": 20 + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "value": 20 + }, + { + "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": 371 + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "value": 153 + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 250 + }, + { + "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", + "value": 24939 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 24701 + }, + { + "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", + "value": 153 + } + ] + }, + { + "cluster_id": "0xff00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:19:cf:59-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:19:cf:59:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "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:19:cf:59-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:19:cf:59: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:19:cf:59: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:19:cf:59:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 371 + }, + "state": { + "class_name": "Light", + "on": true, + "brightness": 128, + "xy_color": null, + "color_temp": 250, + "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:d1:19:cf:59-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:d1:19:cf:59:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 371, + "native_min_value": 153, + "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:d1:19:cf:59-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:d1:19:cf:59:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "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": 20 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:19:cf:59-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:d1:19:cf:59:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "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": 20 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:19:cf:59-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:d1:19:cf:59:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf:59", + "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": 20 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d1:19:cf: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:d1:19:cf:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf: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:d1:19:cf: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:d1:19:cf:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf: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:d1:19:cf: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:d1:19:cf:59:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d1:19:cf: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/paulmann-licht-gmbh-501-34.json b/tests/data/devices/paulmann-licht-gmbh-501-34.json new file mode 100644 index 000000000..8bd235d4d --- /dev/null +++ b/tests/data/devices/paulmann-licht-gmbh-501-34.json @@ -0,0 +1,661 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4e:54:ef:79", + "nwk": "0x35C7", + "manufacturer": "Paulmann Licht GmbH", + "model": "501.34", + "friendly_manufacturer": "Paulmann Licht GmbH", + "friendly_model": "501.34", + "name": "Paulmann Licht GmbH 501.34", + "quirk_applied": true, + "quirk_class": "zhaquirks.paulmann.fourbtnremote.PaulmannRemote4Btn", + "exposes_features": [], + "manufacturer_code": 4644, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.079595+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": 4644, + "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": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Paulmann Licht GmbH" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "501.34" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "2.7.6_r25" + } + ] + }, + { + "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": 0 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 33 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "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": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "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", + "value": 0 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 33 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "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": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "Paulmann LichtGmbH", + "501.34" + ], + [ + "Paulmann Licht GmbH", + "501.34" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0001", + "input_clusters": [ + "0x0000", + "0x0b05", + "0x0003", + "0x1000", + "0x0001" + ], + "output_clusters": [ + "0x0300", + "0x0004", + "0x0003", + "0x0008", + "0x1000", + "0x0006", + "0x0019", + "0x0005" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0001", + "input_clusters": [ + "0x0000", + "0x0b05", + "0x0003", + "0x1000", + "0x0001" + ], + "output_clusters": [ + "0x0300", + "0x0004", + "0x0003", + "0x0008", + "0x1000", + "0x0006", + "0x0019", + "0x0005" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:54:ef:79-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:4e:54:ef:79:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "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:4e:54:ef:79-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:54:ef:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "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:54:ef:79-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:54:ef:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "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:54:ef:79-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:4e:54:ef:79:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "Unknown", + "battery_quantity": 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:4e:54:ef:79-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:4e:54:ef:79:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_size": "Unknown", + "battery_quantity": 0, + "battery_voltage": 3.3 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:54:ef:79-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:54:ef:79:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:54:ef:79-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:4e:54:ef:79:2:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:54:ef:79", + "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/philips-lct026.json b/tests/data/devices/philips-lct026.json new file mode 100644 index 000000000..47085edcc --- /dev/null +++ b/tests/data/devices/philips-lct026.json @@ -0,0 +1,725 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "nwk": "0x3A92", + "manufacturer": "Philips", + "model": "LCT026", + "friendly_manufacturer": "Philips", + "friendly_model": "LCT026", + "name": "Philips LCT026", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.587726+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": 128, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 128, + "descriptor_capability_field": 0 + }, + "endpoints": { + "11": { + "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": "Philips" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "LCT026" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "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": "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": 67 + }, + { + "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": 254 + } + ] + }, + { + "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": "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": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 21 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 233 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 36958 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 25586 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 4044 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 366 + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "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:ea:c8:c2:fd-11", + "migrate_unique_ids": [], + "platform": "light", + "class_name": "HueLight", + "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:ea:c8:c2:fd: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:ea:c8:c2:fd: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:ea:c8:c2:fd:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "endpoint_id": 11, + "available": true, + "group_id": null, + "effect_list": [ + "off", + "colorloop" + ], + "supported_features": 44, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "HueLight", + "on": false, + "brightness": 67, + "xy_color": [ + 0.5639429312581064, + 0.39041733424887465 + ], + "color_temp": 500, + "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:ea:c8:c2:fd-11-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": 11, + "cluster": { + "id": 768, + "name": "Color Control", + "type": "server" + }, + "id": "11:0x0300", + "unique_id": "ab:cd:ef:12:ea:c8:c2:fd:11:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "endpoint_id": 11, + "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": 366 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "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": 254 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "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:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "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:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "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:ea:c8:c2:fd-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:ea:c8:c2:fd:11:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:c8:c2:fd", + "endpoint_id": 11, + "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/ptvo-info-ptvo-switch.json b/tests/data/devices/ptvo-info-ptvo-switch.json new file mode 100644 index 000000000..0537ca7ad --- /dev/null +++ b/tests/data/devices/ptvo-info-ptvo-switch.json @@ -0,0 +1,1077 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "nwk": "0xD408", + "manufacturer": "ptvo.info", + "model": "ptvo.switch", + "friendly_manufacturer": "ptvo.info", + "friendly_model": "ptvo.switch", + "name": "ptvo.info ptvo.switch", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 64447, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.656359+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": 64447, + "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": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "ptvo.info" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ptvo.switch" + } + ] + }, + { + "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": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "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 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "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 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "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 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "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 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "6": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "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 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + } + ] + }, + "7": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2243 + } + ] + } + ], + "out_clusters": [] + }, + "8": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2200 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-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:1a:bc:2b:a0:1:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-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:1a:bc:2b:a0:2:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-3-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": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:3:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 3, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-4-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": 4, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "4:0x0006", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:4:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 4, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-5-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": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:5:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 5, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-6-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": 6, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "6:0x0006", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:6:0x0006", + "status": "CREATED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 6, + "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:1a:bc:2b: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:1a:bc:2b:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b: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:1a:bc:2b: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:1a:bc:2b:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b: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:1a:bc:2b:a0-7-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": 7, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "7:0x0402", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:7:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 7, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.43 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-8-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": 8, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "8:0x0402", + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0:8:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 8, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.0 + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1a:bc:2b:a0-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:1a:bc:2b:a0:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "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:1a:bc:2b:a0-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:1a:bc:2b:a0:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "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:1a:bc:2b:a0-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:1a:bc:2b:a0:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "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:1a:bc:2b:a0-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:1a:bc:2b:a0:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "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:1a:bc:2b:a0-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:1a:bc:2b:a0:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "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:1a:bc:2b:a0-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:1a:bc:2b:a0:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1a:bc:2b:a0", + "endpoint_id": 6, + "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/samjin-water.json b/tests/data/devices/samjin-water.json new file mode 100644 index 000000000..52424dd4b --- /dev/null +++ b/tests/data/devices/samjin-water.json @@ -0,0 +1,503 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:a9:8a:6b", + "nwk": "0x29A8", + "manufacturer": "Samjin", + "model": "water", + "friendly_manufacturer": "Samjin", + "friendly_model": "water", + "name": "Samjin water", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4673, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.366957+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": 4673, + "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": "Samjin" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "water" + } + ] + }, + { + "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": "0x0020", + "endpoint_attribute": "poll_control", + "attributes": [ + { + "id": "0x0000", + "name": "checkin_interval", + "zcl_type": "uint32", + "value": 13200 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2229 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "04:87:27:ff:fe:1f:cc:3d" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 32 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 42 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:a9:8a:6b-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:39:a9:8a:6b:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a:6b", + "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:a9:8a: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:39:a9:8a:6b:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a:6b", + "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:a9:8a: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:39:a9:8a:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a: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:39:a9:8a: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:39:a9:8a:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a: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:39:a9:8a:6b-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:a9:8a:6b:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a:6b", + "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:39:a9:8a:6b-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:39:a9:8a:6b:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a:6b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.29 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:a9:8a: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:39:a9:8a:6b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:a9:8a: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/schneider-electric-eko07259.json b/tests/data/devices/schneider-electric-eko07259.json new file mode 100644 index 000000000..06081fa74 --- /dev/null +++ b/tests/data/devices/schneider-electric-eko07259.json @@ -0,0 +1,3113 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c8:65:ea:5c", + "nwk": "0xA3BA", + "manufacturer": "Schneider Electric", + "model": "EKO07259", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "EKO07259", + "name": "Schneider Electric EKO07259", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": 188, + "rssi": -64, + "last_seen": "2025-11-19T18:46:55.562996+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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xe001", + "name": "se_application_fw_version", + "zcl_type": "string", + "value": "001.000.029" + }, + { + "id": "0xe002", + "name": "se_application_hw_version", + "zcl_type": "string", + "value": "000.000.000" + }, + { + "id": "0xe004", + "name": "se_device_serial_number", + "zcl_type": "string", + "value": "B0C7DEFFFEBCA8D6" + }, + { + "id": "0xe00a", + "name": "se_product_family", + "zcl_type": "string", + "value": "Thermostat" + }, + { + "id": "0xe007", + "name": "se_product_identifier", + "zcl_type": "enum16", + "value": 17540 + }, + { + "id": "0xe009", + "name": "se_product_model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0xe008", + "name": "se_product_range", + "zcl_type": "string", + "value": "Wiser" + }, + { + "id": "0xe00b", + "name": "se_vendor_url", + "zcl_type": "string", + "value": "https://www.se.com" + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "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": "0x0041", + "name": "ac_capacity", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 1886 + }, + { + "id": "0x0010", + "name": "local_temperature_calibration", + "zcl_type": "int8", + "unsupported": true + }, + { + "id": "0x0018", + "name": "max_cool_setpoint_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0016", + "name": "max_heat_setpoint_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "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": "0x0022", + "name": "number_of_daily_transitions", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": 2480 + }, + { + "id": "0x0034", + "name": "occupied_setback", + "zcl_type": "uint8", + "value": 5 + }, + { + "id": "0x0036", + "name": "occupied_setback_max", + "zcl_type": "uint8", + "value": 50 + }, + { + "id": "0x0035", + "name": "occupied_setback_min", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0001", + "name": "outdoor_temperature", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "pi_cooling_demand", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0008", + "name": "pi_heating_demand", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0025", + "name": "programing_oper_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x001a", + "name": "remote_sensing", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0xe210", + "name": "se_boost_amount", + "zcl_type": "uint16", + "value": 200 + }, + { + "id": "0xe211", + "name": "se_control_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xe213", + "name": "se_control_type", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0xe200", + "name": "se_fallback_timeout", + "zcl_type": "uint16", + "value": 600 + }, + { + "id": "0xe214", + "name": "se_heat_cool_input_mode", + "zcl_type": "enum8", + "value": 255 + }, + { + "id": "0xe218", + "name": "se_heat_transfer_medium", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xe21a", + "name": "se_heating_emitter_type", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0xe217", + "name": "se_heating_fuel", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xe212", + "name": "se_local_temperature_source_select", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0xe015", + "name": "se_open_window_detection_guard_period", + "zcl_type": "uint16", + "value": 120 + }, + { + "id": "0xe012", + "name": "se_open_window_detection_status", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xe013", + "name": "se_open_window_detection_threshold", + "zcl_type": "uint8", + "value": 2 + }, + { + "id": "0xe014", + "name": "se_open_window_event_duration", + "zcl_type": "uint16", + "value": 1200 + }, + { + "id": "0xe216", + "name": "se_thermostat_application", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xe215", + "name": "se_unoccupied_tracking_offset", + "zcl_type": "uint16", + "value": 200 + }, + { + "id": "0x0031", + "name": "setpoint_change_amount", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0030", + "name": "setpoint_change_source", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "value": 4 + }, + { + "id": "0x0009", + "name": "system_type_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0023", + "name": "temp_setpoint_hold", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0024", + "name": "temp_setpoint_hold_duration", + "zcl_type": "uint16", + "unsupported": true + }, + { + "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 + }, + { + "id": "0xe002", + "name": "se_activity_timeout", + "zcl_type": "uint16", + "value": 60 + }, + { + "id": "0xe000", + "name": "se_brightness", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0xe001", + "name": "se_inactive_brightness", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0000", + "name": "temperature_display_mode", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x011c", + "name": "last_message_lqi", + "zcl_type": "uint8", + "value": 160 + }, + { + "id": "0x011d", + "name": "last_message_rssi", + "zcl_type": "int8", + "value": -60 + } + ] + }, + { + "cluster_id": "0xfe03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xff16", + "endpoint_attribute": null, + "attributes": [ + { + "id": "0xfffd", + "name": "se_cluster_revision", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0010", + "name": "se_cycle_time", + "zcl_type": "uint16", + "value": 600 + }, + { + "id": "0x0000", + "name": "se_demand_percentage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0012", + "name": "se_max_cycle_time", + "zcl_type": "uint16", + "value": 1800 + }, + { + "id": "0x0011", + "name": "se_min_cycle_time", + "zcl_type": "uint16", + "value": 300 + }, + { + "id": "0x0020", + "name": "se_status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xff23", + "endpoint_attribute": null, + "attributes": [ + { + "id": "0x0006", + "name": "se_abs_max_cool_temperature_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0004", + "name": "se_abs_max_heat_temperature_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0005", + "name": "se_abs_min_cool_temperature_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0003", + "name": "se_abs_min_heat_temperature_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0042", + "name": "se_anti_idle_exercise_time", + "zcl_type": "uint16", + "value": 180 + }, + { + "id": "0xfffd", + "name": "se_cluster_revision", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0022", + "name": "se_cool_temperature_high_limit", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0023", + "name": "se_cool_temperature_low_limit", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0030", + "name": "se_cooling_output_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0020", + "name": "se_heat_temperature_high_limit", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0021", + "name": "se_heat_temperature_low_limit", + "zcl_type": "int16", + "value": -32768 + }, + { + "id": "0x0031", + "name": "se_heating_output_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0018", + "name": "se_max_cool_temperature_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0016", + "name": "se_max_heat_temperature_limit", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0xe207", + "name": "se_max_overall_duty_cycle", + "zcl_type": "uint16", + "value": 3600 + }, + { + "id": "0x0041", + "name": "se_maximum_idle_time", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0000", + "name": "se_measured_temperature", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0017", + "name": "se_min_cool_temperature_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0015", + "name": "se_min_heat_temperature_limit", + "zcl_type": "int16", + "value": 400 + }, + { + "id": "0x0044", + "name": "se_min_off_time", + "zcl_type": "uint16", + "value": 60 + }, + { + "id": "0x0045", + "name": "se_min_on_time", + "zcl_type": "uint16", + "value": 60 + }, + { + "id": "0xe208", + "name": "se_overall_duty_cycle_period", + "zcl_type": "uint16", + "value": 60 + }, + { + "id": "0x0043", + "name": "se_preffered_exercise_time", + "zcl_type": "uint16", + "value": 660 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "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": 16784640 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "value": 65535 + }, + { + "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": "bc:02:6e:ff:fe:2a:3f:6a" + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xe001", + "name": "se_application_fw_version", + "zcl_type": "string", + "value": "001.000.029" + }, + { + "id": "0xe002", + "name": "se_application_hw_version", + "zcl_type": "string", + "value": "000.000.000" + }, + { + "id": "0xe004", + "name": "se_device_serial_number", + "zcl_type": "string", + "value": "B0C7DEFFFEBCA8D6" + }, + { + "id": "0xe00a", + "name": "se_product_family", + "zcl_type": "string", + "value": "Thermostat" + }, + { + "id": "0xe007", + "name": "se_product_identifier", + "zcl_type": "enum16", + "value": 17540 + }, + { + "id": "0xe009", + "name": "se_product_model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0xe008", + "name": "se_product_range", + "zcl_type": "string", + "value": "Wiser" + }, + { + "id": "0xe00b", + "name": "se_vendor_url", + "zcl_type": "string", + "value": "https://www.se.com" + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "int16", + "value": 4000 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 1914 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0xe020", + "name": "se_sensor_correction", + "zcl_type": "int16", + "value": -190 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xe001", + "name": "se_application_fw_version", + "zcl_type": "string", + "value": "001.000.029" + }, + { + "id": "0xe002", + "name": "se_application_hw_version", + "zcl_type": "string", + "value": "000.000.000" + }, + { + "id": "0xe004", + "name": "se_device_serial_number", + "zcl_type": "string", + "value": "B0C7DEFFFEBCA8D6" + }, + { + "id": "0xe00a", + "name": "se_product_family", + "zcl_type": "string", + "value": "Thermostat" + }, + { + "id": "0xe007", + "name": "se_product_identifier", + "zcl_type": "enum16", + "value": 17540 + }, + { + "id": "0xe009", + "name": "se_product_model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0xe008", + "name": "se_product_range", + "zcl_type": "string", + "value": "Wiser" + }, + { + "id": "0xe00b", + "name": "se_vendor_url", + "zcl_type": "string", + "value": "https://www.se.com" + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "int16", + "value": 5000 + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0xe020", + "name": "se_sensor_correction", + "zcl_type": "int16", + "value": 0 + }, + { + "id": "0xe021", + "name": "se_temperature_sensor_type", + "zcl_type": "enum8", + "value": 255 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + } + ] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "CONSUMPTION_AWARENESS_DEVICE", + "id": 13 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xe001", + "name": "se_application_fw_version", + "zcl_type": "string", + "value": "001.000.029" + }, + { + "id": "0xe002", + "name": "se_application_hw_version", + "zcl_type": "string", + "value": "000.000.000" + }, + { + "id": "0xe004", + "name": "se_device_serial_number", + "zcl_type": "string", + "value": "B0C7DEFFFEBCA8D6" + }, + { + "id": "0xe00a", + "name": "se_product_family", + "zcl_type": "string", + "value": "Thermostat" + }, + { + "id": "0xe007", + "name": "se_product_identifier", + "zcl_type": "enum16", + "value": 17540 + }, + { + "id": "0xe009", + "name": "se_product_model", + "zcl_type": "string", + "value": "EKO07259" + }, + { + "id": "0xe008", + "name": "se_product_range", + "zcl_type": "string", + "value": "Wiser" + }, + { + "id": "0xe00b", + "name": "se_vendor_url", + "zcl_type": "string", + "value": "https://www.se.com" + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 3 + }, + { + "id": "0x0000", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 640678 + }, + { + "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": 500 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 1 + }, + { + "id": "0x4510", + "name": "se_fixed_load_demand", + "zcl_type": "uint24", + "value": 500 + }, + { + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Open window detection status", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_open_window_detection_status", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "open_window_detection_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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "se_open_window_detection_status" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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:c8:65:ea:5c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 40.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.86, + "outdoor_temperature": null, + "target_temperature": 24.8, + "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": 2000, + "occupied_heating_setpoint": 2480, + "pi_heating_demand": 30, + "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:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": 40.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": "MinHeatSetpointLimit", + "available": true, + "state": 4.0 + } + }, + { + "info_object": { + "fallback_name": "Display activity timeout", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_activity_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_activity_timeout", + "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": "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:c8:65:ea:5c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 3600, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 60 + } + }, + { + "info_object": { + "fallback_name": "Boost amount", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_boost_amount", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "boost_amount", + "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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": 2.0 + } + }, + { + "info_object": { + "fallback_name": "Display brightness", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_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:c8:65:ea:5c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": 100 + } + }, + { + "info_object": { + "fallback_name": "Fallback timeout", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_fallback_timeout", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fallback_timeout", + "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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10800, + "native_min_value": 30, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 600 + } + }, + { + "info_object": { + "fallback_name": "Display inactive brightness", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_inactive_brightness", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "display_inactive_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:c8:65:ea:5c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": 0 + } + }, + { + "info_object": { + "fallback_name": "Open window detection guard period", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_open_window_detection_guard_period", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "open_window_detection_guard_period", + "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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 7620, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 120 + } + }, + { + "info_object": { + "fallback_name": "Open window detection threshold", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_open_window_detection_threshold", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "open_window_detection_threshold", + "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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1.2, + "native_min_value": 0, + "native_step": 0.1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0.2 + } + }, + { + "info_object": { + "fallback_name": "Open window event duration", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_open_window_event_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "open_window_event_duration", + "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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 7620, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 1200 + } + }, + { + "info_object": { + "fallback_name": "Ambient sensor correction", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-2-se_sensor_correction", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "ambient_sensor_correction", + "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": "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:c8:65:ea:5c:2:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 2, + "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": "NumberConfigurationEntity", + "available": true, + "state": -1.9000000000000001 + } + }, + { + "info_object": { + "fallback_name": "External sensor correction", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-3-se_sensor_correction", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "external_sensor_correction", + "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": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 3, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "3:0x0402", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:3:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": "NumberConfigurationEntity", + "available": true, + "state": 0.0 + } + }, + { + "info_object": { + "fallback_name": "Fixed load demand", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-5-se_fixed_load_demand", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "fixed_load_demand", + "translation_placeholders": null, + "device_class": "power", + "state_class": null, + "entity_category": "config", + "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": "SEMetering", + "type": "server" + }, + "id": "5:0x0702", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:5:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 10000, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "W" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 500 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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:c8:65:ea:5c:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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 type", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_control_type", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "control_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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SEControlType", + "options": [ + "OnOff", + "PI", + "NoControl" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "NoControl" + } + }, + { + "info_object": { + "fallback_name": "Heat transfer medium", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_heat_transfer_medium", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "heat_transfer_medium", + "translation_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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SEHeatTransferMedium", + "options": [ + "Nothing", + "Hydronic", + "Air" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Nothing" + } + }, + { + "info_object": { + "fallback_name": "Heating emitter type", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_heating_emitter_type", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "heating_emitter_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": "ThermostatClusterHandler", + "generic_id": "cluster_handler_0x0201", + "endpoint_id": 1, + "cluster": { + "id": 513, + "name": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SEHeatingEmitterType", + "options": [ + "Direct", + "Radiator", + "FanAssistedRadiator", + "RadiantPanel", + "Floor", + "NotSpecified" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Floor" + } + }, + { + "info_object": { + "fallback_name": "Heating fuel", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_heating_fuel", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "heating_fuel", + "translation_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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SEHeatingFuel", + "options": [ + "Electricity", + "Gas", + "Oil", + "SolidFuel", + "Solar", + "ComunityHeating", + "HeatPump", + "NotSpecified" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Electricity" + } + }, + { + "info_object": { + "fallback_name": "Local temperature source", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_local_temperature_source_select", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "local_temperature_source", + "translation_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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SELocalTemperatureSourceSelect", + "options": [ + "Ambient", + "External" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Ambient" + } + }, + { + "info_object": { + "fallback_name": "Thermostat application", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_thermostat_application", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "thermostat_application", + "translation_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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SEThermostatApplication", + "options": [ + "OccupiedSpace", + "Floor", + "NotKnown" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Floor" + } + }, + { + "info_object": { + "fallback_name": "External temperature sensor type", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-3-se_temperature_sensor_type", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "external_temperature_sensor_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": "TemperatureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0402", + "endpoint_id": 3, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "3:0x0402", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:3:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 3, + "available": true, + "group_id": null, + "enum": "SETemperatureSensorType", + "options": [ + "Sensor2kOhm", + "Sensor10kOhm", + "Sensor12kOhm", + "Sensor15kOhm", + "Sensor33kOhm", + "Sensor47kOhm", + "SensorAbsent" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "SensorAbsent" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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": "SEBasic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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:c8:65:ea:5c-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": "SEBasic", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "PiHeatingDemand", + "available": true, + "state": 30 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "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": "Control status", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-1-se_control_status", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "control_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": "SEThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": "NormalOperation" + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-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:c8:65:ea:5c:2:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 19.14 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c8:65:ea:5c-3-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": 3, + "cluster": { + "id": 1026, + "name": "Temperature Measurement", + "type": "server" + }, + "id": "3:0x0402", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:3:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 3, + "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:c8:65:ea:5c-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": "SEMetering", + "type": "server" + }, + "id": "5:0x0702", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:5:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 500, + "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:c8:65:ea:5c-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": "SEMetering", + "type": "server" + }, + "id": "5:0x0702", + "unique_id": "ab:cd:ef:12:c8:65:ea:5c:5:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 5, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 640.678, + "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:c8:65:ea:5c-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:c8:65:ea:5c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c8:65:ea:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x01001d00", + "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-lk-dimmer.json b/tests/data/devices/schneider-electric-lk-dimmer.json new file mode 100644 index 000000000..4a6978c54 --- /dev/null +++ b/tests/data/devices/schneider-electric-lk-dimmer.json @@ -0,0 +1,874 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:28:80:01:79", + "nwk": "0xC2FD", + "manufacturer": "Schneider Electric", + "model": "LK Dimmer", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "LK Dimmer", + "name": "Schneider Electric LK Dimmer", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.084331+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": { + "3": { + "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": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "LK Dimmer" + } + ] + }, + { + "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": "0x4000", + "name": "global_scene_control", + "zcl_type": "bool", + "value": 1 + }, + { + "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", + "value": 50 + }, + { + "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": 2 + }, + { + "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": "0x0301", + "endpoint_attribute": "light_ballast", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "21": { + "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": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xff17", + "endpoint_attribute": "manufacturer_specific", + "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": [] + } + ] + }, + "22": { + "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": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xff17", + "endpoint_attribute": "manufacturer_specific", + "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": [] + } + ] + }, + "23": { + "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": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xff17", + "endpoint_attribute": "manufacturer_specific", + "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": [] + } + ] + }, + "24": { + "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": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xff17", + "endpoint_attribute": "manufacturer_specific", + "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": [] + } + ] + }, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "3:0x0003", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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:28:80:01:79-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": true, + "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:28:80:01:79: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:28:80:01:79:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 1, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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": 50 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:80:01:79-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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": 2 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:80:01:79-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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:28:80:01:79-3-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": 3, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "3:0x0019_client", + "unique_id": "ab:cd:ef:12:28:80:01:79:3:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:80:01:79", + "endpoint_id": 3, + "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/schneider-electric-nhmotion-unidim-1.json b/tests/data/devices/schneider-electric-nhmotion-unidim-1.json new file mode 100644 index 000000000..e6108d16c --- /dev/null +++ b/tests/data/devices/schneider-electric-nhmotion-unidim-1.json @@ -0,0 +1,721 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8f:16:4b:4b", + "nwk": "0x0FA2", + "manufacturer": "Schneider Electric", + "model": "NHMOTION/UNIDIM/1", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "NHMOTION/UNIDIM/1", + "name": "Schneider Electric NHMOTION/UNIDIM/1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": 88, + "rssi": -89, + "last_seen": "2025-11-18T10:26:12.374229+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": { + "3": { + "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": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "NHMOTION/UNIDIM/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", + "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": 255 + }, + { + "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": "0x0301", + "endpoint_attribute": "light_ballast", + "attributes": [] + }, + { + "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": 34279423 + } + ] + } + ] + }, + "37": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 8451 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + }, + { + "cluster_id": "0xff19", + "endpoint_attribute": "manufacturer_specific", + "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": "0x0406", + "endpoint_attribute": "occupancy", + "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:8f:16:4b:4b-37-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": 37, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "37:0x0406", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:37:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 37, + "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:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "3:0x0003", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "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:8f:16:4b:4b-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": true, + "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:8f:16:4b:4b: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:8f:16:4b:4b:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "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:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "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:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "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:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "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:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -89 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:16:4b:4b-37-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": 37, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "37:0x0400", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:37:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 37, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 7 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8f:16:4b:4b-3-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": 3, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "3:0x0019_client", + "unique_id": "ab:cd:ef:12:8f:16:4b:4b:3:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8f:16:4b:4b", + "endpoint_id": 3, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x020b0fff", + "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-dimmer-1.json b/tests/data/devices/schneider-electric-puck-dimmer-1.json new file mode 100644 index 000000000..22ae14957 --- /dev/null +++ b/tests/data/devices/schneider-electric-puck-dimmer-1.json @@ -0,0 +1,550 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "nwk": "0x61DD", + "manufacturer": "Schneider Electric", + "model": "PUCK/DIMMER/1", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "PUCK/DIMMER/1", + "name": "Schneider Electric PUCK/DIMMER/1", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.363466+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": { + "3": { + "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": "Schneider Electric" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "PUCK/DIMMER/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", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 245 + }, + { + "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", + "unsupported": true + }, + { + "id": "0x0012", + "name": "on_transition_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0301", + "endpoint_attribute": "light_ballast", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 3, + "name": "Identify", + "type": "server" + }, + "id": "3:0x0003", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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:c9:cb:c2:ea-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": true, + "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:c9:cb:c2:ea: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:c9:cb:c2:ea:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "available": true, + "group_id": null, + "effect_list": [ + "off" + ], + "supported_features": 40, + "min_mireds": 153, + "max_mireds": 500 + }, + "state": { + "class_name": "Light", + "on": false, + "brightness": 245, + "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:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 8, + "name": "Level control", + "type": "server" + }, + "id": "3:0x0008", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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": 0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 0, + "name": "Basic", + "type": "server" + }, + "id": "3:0x0000", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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:c9:cb:c2:ea-3-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": 3, + "cluster": { + "id": 25, + "name": "Ota", + "type": "client" + }, + "id": "3:0x0019_client", + "unique_id": "ab:cd:ef:12:c9:cb:c2:ea:3:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c9:cb:c2:ea", + "endpoint_id": 3, + "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/schneider-electric-socket-outlet-1.json b/tests/data/devices/schneider-electric-socket-outlet-1.json new file mode 100644 index 000000000..f6d747d5f --- /dev/null +++ b/tests/data/devices/schneider-electric-socket-outlet-1.json @@ -0,0 +1,1009 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:81:8a:da:20", + "nwk": "0x7C85", + "manufacturer": "Schneider Electric", + "model": "SOCKET/OUTLET/1", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "SOCKET/OUTLET/1", + "name": "Schneider Electric SOCKET/OUTLET/1", + "quirk_applied": true, + "quirk_class": "zhaquirks.schneiderelectric.outlet.SocketOutlet", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": 180, + "rssi": -66, + "last_seen": "2025-11-18T21:03:48.108060+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": "SOCKET/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": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "value": 255 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 10329 + }, + { + "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": "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.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": "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", + "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": 225 + }, + { + "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": "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": 33952511 + } + ] + } + ] + }, + "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": [ + [ + "Schneider Electric", + "SOCKET/OUTLET/1" + ], + [ + "Schneider Electric", + "SOCKET/OUTLET/2" + ] + ], + "endpoints": { + "6": { + "profile_id": "0x0104", + "device_type": "0x0009", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0702", + "0x0708", + "0x0b04", + "0x0b05", + "0xfc04" + ], + "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:81:8a:da:20-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:81:8a:da:20:6:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "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:81:8a:da:20-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:81:8a:da:20:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "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:81:8a:da:20-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:81:8a:da:20:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "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:81:8a:da:20-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:81:8a:da:20:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "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:81:8a:da:20-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": "MeteringCluster", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:81:8a:da:20:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "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:81:8a:da:20-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": "MeteringCluster", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:81:8a:da:20:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 10.329, + "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:81:8a:da:20-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:81:8a:da:20:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "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:81:8a:da:20-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:81:8a:da:20:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 225.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:81:8a:da:20-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:81:8a:da:20:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "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:81:8a:da:20-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:81:8a:da:20:6:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:8a:da:20", + "endpoint_id": 6, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x020612ff", + "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-socket-outlet-2.json b/tests/data/devices/schneider-electric-socket-outlet-2.json new file mode 100644 index 000000000..dcbec9332 --- /dev/null +++ b/tests/data/devices/schneider-electric-socket-outlet-2.json @@ -0,0 +1,1009 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bc:ec:d0:94", + "nwk": "0x673E", + "manufacturer": "Schneider Electric", + "model": "SOCKET/OUTLET/2", + "friendly_manufacturer": "Schneider Electric", + "friendly_model": "SOCKET/OUTLET/2", + "name": "Schneider Electric SOCKET/OUTLET/2", + "quirk_applied": true, + "quirk_class": "zhaquirks.schneiderelectric.outlet.SocketOutlet", + "exposes_features": [], + "manufacturer_code": 4190, + "power_source": "Mains", + "lqi": 168, + "rssi": -69, + "last_seen": "2025-11-18T21:05:10.127698+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": "SOCKET/OUTLET/2" + } + ] + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 23 + }, + { + "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": "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.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": "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", + "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": 225 + }, + { + "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": "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": 33952511 + } + ] + } + ] + }, + "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": [ + [ + "Schneider Electric", + "SOCKET/OUTLET/1" + ], + [ + "Schneider Electric", + "SOCKET/OUTLET/2" + ] + ], + "endpoints": { + "6": { + "profile_id": "0x0104", + "device_type": "0x0009", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0702", + "0x0708", + "0x0b04", + "0x0b05", + "0xfc04" + ], + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -69 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bc:ec:d0:94-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": "MeteringCluster", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:bc:ec:d0:94:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "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:bc:ec:d0:94-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": "MeteringCluster", + "type": "server" + }, + "id": "6:0x0702", + "unique_id": "ab:cd:ef:12:bc:ec:d0:94:6:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.023, + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 225.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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "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:bc:ec:d0:94-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:bc:ec:d0:94:6:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bc:ec:d0:94", + "endpoint_id": 6, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x020612ff", + "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/sercomm-corp-sz-esw01-au.json b/tests/data/devices/sercomm-corp-sz-esw01-au.json new file mode 100644 index 000000000..f22597c99 --- /dev/null +++ b/tests/data/devices/sercomm-corp-sz-esw01-au.json @@ -0,0 +1,1110 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:42:61:67:6a", + "nwk": "0x88CB", + "manufacturer": "Sercomm Corp.", + "model": "SZ-ESW01-AU", + "friendly_manufacturer": "Sercomm Corp.", + "friendly_model": "SZ-ESW01-AU", + "name": "Sercomm Corp. SZ-ESW01-AU", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4401, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.794751+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": 4401, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "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": "Sercomm Corp." + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SZ-ESW01-AU" + } + ] + }, + { + "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": "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": "0x0019", + "name": "control_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x040f", + "name": "current_month_max_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 20571987 + }, + { + "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": 150 + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 0 + }, + { + "id": "0x0305", + "name": "historical_consumption_formatting", + "zcl_type": "map8", + "value": 206 + }, + { + "id": "0x0202", + "name": "hours_in_operation", + "zcl_type": "uint24", + "unsupported": true + }, + { + "id": "0x0017", + "name": "inlet_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "value": 286 + }, + { + "id": "0x0308", + "name": "meter_serial_number", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x030e", + "name": "module_serial_number", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "value": 0 + }, + { + "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", + "value": 50 + }, + { + "id": "0x0401", + "name": "ac_frequency_divisor", + "zcl_type": "uint16", + "value": 1 + }, + { + "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": 1000 + }, + { + "id": "0x0604", + "name": "ac_power_multiplier", + "zcl_type": "uint16", + "value": 128 + }, + { + "id": "0x0601", + "name": "ac_voltage_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 8 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 2 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "value": -32768 + }, + { + "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": 32 + }, + { + "id": "0x0510", + "name": "power_factor", + "zcl_type": "int8", + "value": 1 + }, + { + "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": 3600 + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 79 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "value": 32768 + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 29503 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "value": 65535 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "ON_OFF_LIGHT_SWITCH", + "id": 259 + }, + "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", + "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": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67: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:42:61:67:6a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "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:42:61:67:6a-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:42:61:67:6a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "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:42:61:67: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:42:61:67:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67: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:42:61:67: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:42:61:67:6a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "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:42:61:67:6a-1-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": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:42:61:67:6a:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": 286000, + "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:42:61:67: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:42:61:67:6a:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 20571987.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:42:61:67: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:42:61:67:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 0.256, + "measurement_type": "PHASE_A_MEASUREMENT", + "active_power_max": -4194.304 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67:6a-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:42:61:67:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 50.0, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67:6a-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:42:61:67:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": 1, + "measurement_type": "PHASE_A_MEASUREMENT" + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67:6a-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:42:61:67:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.079, + "measurement_type": "PHASE_A_MEASUREMENT", + "rms_current_max": 32.768 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67:6a-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:42:61:67:6a:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 236.024, + "measurement_type": "PHASE_A_MEASUREMENT", + "rms_voltage_max": 524.28 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:42:61:67: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:42:61:67:6a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:42:61:67:6a", + "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/shelly-ecowitt-ws90.json b/tests/data/devices/shelly-ecowitt-ws90.json new file mode 100644 index 000000000..ba304118b --- /dev/null +++ b/tests/data/devices/shelly-ecowitt-ws90.json @@ -0,0 +1,538 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a6:a9:96:8e", + "nwk": "0x2695", + "manufacturer": "Shelly", + "model": "Ecowitt WS90", + "friendly_manufacturer": "Shelly", + "friendly_model": "Ecowitt WS90", + "name": "Shelly Ecowitt WS90", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 5264, + "power_source": "Battery or Unknown", + "lqi": 64, + "rssi": -95, + "last_seen": "2025-12-09T23:11:37.553329+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": 5264, + "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": "TEMPERATURE_SENSOR", + "id": 770 + }, + "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": "Ecowitt WS90" + } + ] + }, + { + "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": 32 + } + ] + }, + { + "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": 2000 + } + ] + }, + { + "cluster_id": "0x0403", + "endpoint_attribute": "pressure", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 990 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 6000 + } + ] + }, + { + "cluster_id": "0xfc01", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc02", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc03", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-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:a6:a9:96:8e:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "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:a6:a9:96:8e-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:a9:96:8e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 64 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-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:a9:96:8e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -95 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-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:a6:a9:96:8e:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "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.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-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:a6:a9:96:8e:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "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:a6:a9:96:8e-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:a6:a9:96:8e:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 20.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-1-1027", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Pressure", + "translation_key": null, + "translation_placeholders": null, + "device_class": "pressure", + "state_class": "measurement", + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "PressureMeasurementClusterHandler", + "generic_id": "cluster_handler_0x0403", + "endpoint_id": 1, + "cluster": { + "id": 1027, + "name": "Pressure Measurement", + "type": "server" + }, + "id": "1:0x0403", + "unique_id": "ab:cd:ef:12:a6:a9:96:8e:1:0x0403", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "hPa" + }, + "state": { + "class_name": "Pressure", + "available": true, + "state": 990 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a6:a9:96:8e-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:a6:a9:96:8e:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:a6:a9:96:8e", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 60.0 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/shyugj-dimmer-switch-zb3-0.json b/tests/data/devices/shyugj-dimmer-switch-zb3-0.json new file mode 100644 index 000000000..8312b8dc6 --- /dev/null +++ b/tests/data/devices/shyugj-dimmer-switch-zb3-0.json @@ -0,0 +1,585 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:43:59:bd:59", + "nwk": "0xA3E8", + "manufacturer": "Shyugj", + "model": "Dimmer-Switch-ZB3.0", + "friendly_manufacturer": "Shyugj", + "friendly_model": "Dimmer-Switch-ZB3.0", + "name": "Shyugj Dimmer-Switch-ZB3.0", + "quirk_applied": true, + "quirk_class": "zhaquirks.hzc.dimmerswitch.DimmerSwitch", + "exposes_features": [], + "manufacturer_code": 4714, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.605018+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": "DIMMABLE_LIGHT", + "id": 257 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "Shyugj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "Dimmer-Switch-ZB3.0" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "value": "3.09" + } + ] + }, + { + "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": 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", + "value": 0 + }, + { + "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": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 246 + }, + { + "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": 184 + }, + { + "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": "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", + "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": { + "models_info": [ + [ + "HZC", + "Dimmer-Switch-ZB3.0" + ], + [ + "Shyugj", + "Dimmer-Switch-ZB3.0" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0101", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0b05", + "0x1000" + ], + "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:43:59:bd:59-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:43:59:bd:59:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd:59", + "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:43:59:bd:59-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:43:59:bd:59: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:43:59:bd:59:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd:59", + "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": 246, + "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:43:59:bd:59-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:43:59:bd:59:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd:59", + "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": 184 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:59:bd: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:43:59:bd:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd: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:43:59:bd: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:43:59:bd:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd: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:43:59:bd: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:43:59:bd:59:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:59:bd: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/signify-netherlands-b-v-rdm004.json b/tests/data/devices/signify-netherlands-b-v-rdm004.json new file mode 100644 index 000000000..c0f2ee3f3 --- /dev/null +++ b/tests/data/devices/signify-netherlands-b-v-rdm004.json @@ -0,0 +1,420 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:84:06:58:23", + "nwk": "0x0AAD", + "manufacturer": "Signify Netherlands B.V.", + "model": "RDM004", + "friendly_manufacturer": "Signify Netherlands B.V.", + "friendly_model": "RDM004", + "name": "Signify Netherlands B.V. RDM004", + "quirk_applied": true, + "quirk_class": "zhaquirks.philips.wall_switch.PhilipsWallSwitchNewFirmware", + "exposes_features": [], + "manufacturer_code": 4107, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.464901+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": { + "1": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_SCENE_CONTROLLER", + "id": 2096 + }, + "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": "RDM004" + } + ] + }, + { + "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": "0xfc00", + "endpoint_attribute": "philips_remote_cluster", + "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": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x0008", + "endpoint_attribute": "level", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "Philips", + "RDM001" + ], + [ + "Signify Netherlands B.V.", + "RDM001" + ], + [ + "Philips", + "RDM004" + ], + [ + "Signify Netherlands B.V.", + "RDM004" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0830", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0xfc00" + ], + "output_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0006", + "0x0008", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:84:06:58:23-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:84:06:58:23:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:06:58:23", + "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:84:06:58: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": "PhilipsWallSwitchBasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:84:06:58:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:06:58: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:84:06:58: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": "PhilipsWallSwitchBasicCluster", + "type": "server" + }, + "id": "1:0x0000", + "unique_id": "ab:cd:ef:12:84:06:58:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:06:58:23", + "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:84:06:58:23-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:84:06:58:23:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:84:06:58:23", + "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:84:06:58: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:84:06:58:23:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:06:58:23", + "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/smarthjemmet-dk-quad-zig-sw.json b/tests/data/devices/smarthjemmet-dk-quad-zig-sw.json new file mode 100644 index 000000000..f90590d14 --- /dev/null +++ b/tests/data/devices/smarthjemmet-dk-quad-zig-sw.json @@ -0,0 +1,342 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:35:6f:4f:77", + "nwk": "0x226D", + "manufacturer": "smarthjemmet.dk", + "model": "QUAD-ZIG-SW", + "friendly_manufacturer": "smarthjemmet.dk", + "friendly_model": "QUAD-ZIG-SW", + "name": "smarthjemmet.dk QUAD-ZIG-SW", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 64447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.335986+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": 64447, + "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_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "smarthjemmet.dk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "QUAD-ZIG-SW" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0021", + "name": "battery_percentage_remaining", + "zcl_type": "uint8", + "value": 56 + }, + { + "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": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:6f:4f:77-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:35:6f:4f:77:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:6f:4f:77", + "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:35:6f:4f:77-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:35:6f:4f:77:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:6f:4f:77", + "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:35:6f:4f:77-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:35:6f:4f:77:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:35:6f:4f:77", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 28.0, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/smarthjemmet-dk-quad-zig-sw2.json b/tests/data/devices/smarthjemmet-dk-quad-zig-sw2.json new file mode 100644 index 000000000..3919facdf --- /dev/null +++ b/tests/data/devices/smarthjemmet-dk-quad-zig-sw2.json @@ -0,0 +1,668 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:35:e9:d5:e0", + "nwk": "0x75D4", + "manufacturer": "smarthjemmet.dk", + "model": "QUAD-ZIG-SW2", + "friendly_manufacturer": "smarthjemmet.dk", + "friendly_model": "QUAD-ZIG-SW2", + "name": "smarthjemmet.dk QUAD-ZIG-SW2", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4447, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.149990+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": 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_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "smarthjemmet.dk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "QUAD-ZIG-SW2" + } + ] + }, + { + "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": 34 + } + ] + }, + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0012", + "endpoint_attribute": "multistate_input", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "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": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "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": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "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": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "uint16", + "value": 1.0 + } + ] + } + ] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "undefined_0xfffe", + "id": 65534 + }, + "in_clusters": [ + { + "cluster_id": "0x0007", + "endpoint_attribute": "on_off_config", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "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.0 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:e9:d5:e0-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:35:e9:d5:e0:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:e9:d5:e0-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:35:e9:d5:e0:2:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "endpoint_id": 2, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:e9:d5:e0-3-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": 3, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "3:0x0006", + "unique_id": "ab:cd:ef:12:35:e9:d5:e0:3:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "endpoint_id": 3, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:e9:d5:e0-4-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": 4, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "4:0x0006", + "unique_id": "ab:cd:ef:12:35:e9:d5:e0:4:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "endpoint_id": 4, + "available": true, + "group_id": null, + "attribute_name": "on_off" + }, + "state": { + "class_name": "Opening", + "available": true, + "state": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:35:e9:d5:e0-5-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": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "client" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:35:e9:d5:e0:5:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "endpoint_id": 5, + "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:35:e9:d5: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:35:e9:d5:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5: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:35:e9:d5: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:35:e9:d5:e0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5: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:35:e9:d5: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:35:e9:d5:e0:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:35:e9:d5:e0", + "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.4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/smartthings-multiv4.json b/tests/data/devices/smartthings-multiv4.json new file mode 100644 index 000000000..71c58d059 --- /dev/null +++ b/tests/data/devices/smartthings-multiv4.json @@ -0,0 +1,651 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:85:6f:e5:ee", + "nwk": "0xE8FB", + "manufacturer": "SmartThings", + "model": "multiv4", + "friendly_manufacturer": "SmartThings", + "friendly_model": "multiv4", + "name": "SmartThings multiv4", + "quirk_applied": true, + "quirk_class": "zhaquirks.smartthings.multiv4.SmartThingsMultiV4", + "exposes_features": [], + "manufacturer_code": 4362, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.413382+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": 4362, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "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": [] + }, + { + "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": 24 + } + ] + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2352 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 45, + 109, + 124, + 254, + 255, + 126, + 224, + 232 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 33 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfc02", + "endpoint_attribute": "accelerometer", + "attributes": [ + { + "id": "0x0010", + "name": "acceleration", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x0012", + "name": "x_axis", + "zcl_type": "int16", + "value": 110 + }, + { + "id": "0x0013", + "name": "y_axis", + "zcl_type": "int16", + "value": -67 + }, + { + "id": "0x0014", + "name": "z_axis", + "zcl_type": "int16", + "value": -996 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 27 + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "SmartThings", + "multiv4" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0402", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x000f", + "0x0020", + "0x0402", + "0x0500", + "0xfc02" + ], + "output_clusters": [ + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:6f:e5:ee-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:85:6f:e5:ee:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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:85:6f:e5:ee-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:85:6f:e5:ee:1:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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:85:6f:e5:ee-1-64514", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "Accelerometer", + "translation_key": "accelerometer", + "translation_placeholders": null, + "device_class": "moving", + "state_class": null, + "entity_category": null, + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "SmartThingsAccelerationClusterHandler", + "generic_id": "cluster_handler_0xfc02", + "endpoint_id": 1, + "cluster": { + "id": 64514, + "name": "CentraLite Accelerometer", + "type": "server" + }, + "id": "1:0xfc02", + "unique_id": "ab:cd:ef:12:85:6f:e5:ee:1:0xfc02", + "status": "INITIALIZED", + "value_attribute": "acceleration" + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "acceleration" + }, + "state": { + "class_name": "Accelerometer", + "available": true, + "state": false + } + } + ], + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:6f:e5:ee-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:85:6f:e5:ee:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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:85:6f:e5:ee-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:6f:e5:ee:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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:6f:e5:ee-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:6f:e5:ee:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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:6f:e5:ee-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:6f:e5:ee:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_voltage": 2.4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:6f:e5:ee-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:6f:e5:ee:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.52 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:6f:e5:ee-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:6f:e5:ee:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:6f:e5:ee", + "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/texas-instruments-coordinator.json b/tests/data/devices/texas-instruments-coordinator.json new file mode 100644 index 000000000..2de01ca8a --- /dev/null +++ b/tests/data/devices/texas-instruments-coordinator.json @@ -0,0 +1,125 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:14:1a:f0:68", + "nwk": "0x0000", + "manufacturer": "Texas Instruments", + "model": "Coordinator", + "friendly_manufacturer": "Texas Instruments", + "friendly_model": "Coordinator", + "name": "Texas Instruments Coordinator", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-02T20:22:39.227463+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/tyst11-czk78ptr-zk78ptr.json b/tests/data/devices/tyst11-czk78ptr-zk78ptr.json new file mode 100644 index 000000000..ca44a8502 --- /dev/null +++ b/tests/data/devices/tyst11-czk78ptr-zk78ptr.json @@ -0,0 +1,740 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9d:fd:87:35", + "nwk": "0xC52F", + "manufacturer": "_TYST11_czk78ptr", + "model": "zk78ptr", + "friendly_manufacturer": "_TYST11_czk78ptr", + "friendly_model": "zk78ptr", + "name": "_TYST11_czk78ptr zk78ptr", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.399062+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": 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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TYST11_czk78ptr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "zk78ptr" + } + ] + }, + { + "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": "0x0003", + "endpoint_attribute": "identify", + "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": 1760 + }, + { + "id": "0x0002", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 1350 + }, + { + "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 + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "value": 1650 + } + ] + }, + { + "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": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9d:fd:87:35-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:fd:87:35:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:fd:87:35-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:9d:fd:87:35:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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": 17.6, + "outdoor_temperature": null, + "target_temperature": 13.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": 1350, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": 1650 + }, + "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:9d:fd:87:35-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:9d:fd:87:35:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:fd:87:35:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:fd:87:35-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:fd:87:35:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:fd:87:35-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:fd:87:35:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:fd:87:35:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:9d:fd:87:35:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:9d:fd:87:35:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:fd:87:35:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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:9d:fd:87:35-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:fd:87:35:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9d:fd:87:35", + "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/tyzb01-8scntis1-ts0216.json b/tests/data/devices/tyzb01-8scntis1-ts0216.json new file mode 100644 index 000000000..0602250d0 --- /dev/null +++ b/tests/data/devices/tyzb01-8scntis1-ts0216.json @@ -0,0 +1,669 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:52:26:72:dc", + "nwk": "0xC264", + "manufacturer": "_TYZB01_8scntis1", + "model": "TS0216", + "friendly_manufacturer": "_TYZB01_8scntis1", + "friendly_model": "TS0216", + "name": "_TYZB01_8scntis1 TS0216", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4619, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.533359+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": 4619, + "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_WARNING_DEVICE", + "id": 1027 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TYZB01_8scntis1" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0216" + } + ] + }, + { + "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": 42 + }, + { + "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": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:21:2e:ff:ff:05:09:1d" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 16 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 549 + } + ] + }, + { + "cluster_id": "0x0502", + "endpoint_attribute": "ias_wd", + "attributes": [] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:52:26:72:dc-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:52:26:72:dc:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "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:52:26:72:dc-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:26:72:dc:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "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:52:26:72:dc-1-1282-SirenLevel", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultSirenLevelSelectEntity", + "translation_key": "default_siren_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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:52:26:72:dc:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "SirenLevel", + "options": [ + "Low level sound", + "Medium level sound", + "High level sound", + "Very high level sound" + ] + }, + "state": { + "class_name": "DefaultSirenLevelSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:26:72:dc-1-1282-Strobe", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultStrobeSelectEntity", + "translation_key": "default_strobe", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:52:26:72:dc:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "Strobe", + "options": [ + "No Strobe", + "Strobe" + ] + }, + "state": { + "class_name": "DefaultStrobeSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:26:72:dc-1-1282-StrobeLevel", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultStrobeLevelSelectEntity", + "translation_key": "default_strobe_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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:52:26:72:dc:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "StrobeLevel", + "options": [ + "Low level strobe", + "Medium level strobe", + "High level strobe", + "Very high level strobe" + ] + }, + "state": { + "class_name": "DefaultStrobeLevelSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:26:72:dc-1-1282-WarningMode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "DefaultToneSelectEntity", + "translation_key": "default_siren_tone", + "translation_placeholders": null, + "device_class": null, + "state_class": null, + "entity_category": "config", + "entity_registry_enabled_default": true, + "enabled": true, + "primary": false, + "cluster_handlers": [ + { + "class_name": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:52:26:72:dc:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "WarningMode", + "options": [ + "Stop", + "Burglar", + "Fire", + "Emergency", + "Police Panic", + "Fire Panic", + "Emergency Panic" + ] + }, + "state": { + "class_name": "DefaultToneSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:26:72:dc-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:52:26:72:dc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "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:52:26:72:dc-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:52:26:72:dc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": null + } + } + ], + "siren": [ + { + "info_object": { + "fallback_name": "Siren", + "unique_id": "ab:cd:ef:12:52:26:72:dc-1", + "migrate_unique_ids": [], + "platform": "siren", + "class_name": "Siren", + "translation_key": null, + "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": "IasWdClusterHandler", + "generic_id": "cluster_handler_0x0502", + "endpoint_id": 1, + "cluster": { + "id": 1282, + "name": "IAS Warning Device", + "type": "server" + }, + "id": "1:0x0502", + "unique_id": "ab:cd:ef:12:52:26:72:dc:1:0x0502", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "available_tones": { + "1": "Burglar", + "2": "Fire", + "3": "Emergency", + "4": "Police Panic", + "5": "Fire Panic", + "6": "Emergency Panic" + }, + "supported_features": 31 + }, + "state": { + "class_name": "Siren", + "available": true, + "state": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:52:26:72:dc-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:26:72:dc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:52:26:72:dc", + "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/tyzb01-mtunwanm-ts011f.json b/tests/data/devices/tyzb01-mtunwanm-ts011f.json new file mode 100644 index 000000000..5fe6653ca --- /dev/null +++ b/tests/data/devices/tyzb01-mtunwanm-ts011f.json @@ -0,0 +1,324 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:34:72:86:1c", + "nwk": "0xFB70", + "manufacturer": "_TYZB01_mtunwanm", + "model": "TS011F", + "friendly_manufacturer": "_TYZB01_mtunwanm", + "friendly_model": "TS011F", + "name": "_TYZB01_mtunwanm TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:58.158519+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": "MAIN_POWER_OUTLET", + "id": 9 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 64 + }, + { + "id": "0x0014", + "name": "disable_local_config", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TYZB01_mtunwanm" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + } + ] + }, + { + "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": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:34:72:86: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:34:72:86:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:72:86: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:34:72:86: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:34:72:86:1c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:72:86:1c", + "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:34:72:86:1c-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:34:72:86:1c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:34:72:86:1c", + "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:34:72:86: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:34:72:86:1c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:72:86:1c", + "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/tz2000-k4yr34vv-sm0301.json b/tests/data/devices/tz2000-k4yr34vv-sm0301.json new file mode 100644 index 000000000..4592c04f7 --- /dev/null +++ b/tests/data/devices/tz2000-k4yr34vv-sm0301.json @@ -0,0 +1,663 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:27:35:c8:17", + "nwk": "0xF38E", + "manufacturer": "_TZ2000_k4yr34vv", + "model": "SM0301", + "friendly_manufacturer": "_TZ2000_k4yr34vv", + "friendly_model": "SM0301", + "name": "_TZ2000_k4yr34vv SM0301", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4692, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.998636+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": 4692, + "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": "SHADE", + "id": 512 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ2000_k4yr34vv" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "SM0301" + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "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": 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": "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", + "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": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4000", + "name": "start_up_current_level", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0100", + "endpoint_attribute": "shade", + "attributes": [ + { + "id": "0x0010", + "name": "closed_limit", + "zcl_type": "uint16", + "value": 17800 + }, + { + "id": "0x0012", + "name": "mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "motor_step_size", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "physical_closed_limit", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "status", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfc55", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc56", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:27:35:c8:17-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:27:35:c8:17:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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:27:35:c8:17-1", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Shade", + "translation_key": "shade", + "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": "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:27:35:c8:17: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:27:35:c8:17:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ShadeClusterHandler", + "generic_id": "cluster_handler_0x0100", + "endpoint_id": 1, + "cluster": { + "id": 256, + "name": "Shade Configuration", + "type": "server" + }, + "id": "1:0x0100", + "unique_id": "ab:cd:ef:12:27:35:c8:17:1:0x0100", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Shade", + "available": true, + "current_position": 100, + "is_closed": false, + "state": "open" + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:27:35:c8:17-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:27:35:c8:17:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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:27:35:c8:17-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:27:35:c8:17:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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": 0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:27:35:c8:17-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:27:35:c8:17:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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:27:35:c8: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:27:35:c8:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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:27:35:c8: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:27:35:c8:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8: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:27:35:c8: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:27:35:c8:17:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:27:35:c8:17", + "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-2putqrmw-ts011f.json b/tests/data/devices/tz3000-2putqrmw-ts011f.json new file mode 100644 index 000000000..37e322ad3 --- /dev/null +++ b/tests/data/devices/tz3000-2putqrmw-ts011f.json @@ -0,0 +1,858 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2b:c6:61:bc", + "nwk": "0x6ADB", + "manufacturer": "_TZ3000_2putqrmw", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_2putqrmw", + "friendly_model": "TS011F", + "name": "_TZ3000_2putqrmw TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.753463+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": 77 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_2putqrmw" + }, + { + "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": 516 + }, + { + "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": "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": "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": "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2b:c6:61: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:2b:c6:61:bc:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61: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:2b:c6:61:bc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61: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:2b:c6:61: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:2b:c6:61:bc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 5.16, + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61:bc-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:2b:c6:61:bc:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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:2b:c6:61: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:2b:c6:61:bc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:c6:61:bc", + "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-303avxxt-ts011f.json b/tests/data/devices/tz3000-303avxxt-ts011f.json new file mode 100644 index 000000000..5906d7ae4 --- /dev/null +++ b/tests/data/devices/tz3000-303avxxt-ts011f.json @@ -0,0 +1,1035 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fb:76:78:ad", + "nwk": "0x8305", + "manufacturer": "_TZ3000_303avxxt", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_303avxxt", + "friendly_model": "TS011F", + "name": "_TZ3000_303avxxt TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:58.940604+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 69 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_303avxxt" + }, + { + "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": "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": 0 + }, + { + "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": "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": 247 + }, + { + "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": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "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", + "unsupported": true + } + ] + } + ] + } + }, + "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" + ] + }, + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78: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:fb:76:78:ad:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78: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:fb:76:78: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:fb:76:78:ad:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 247.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fb:76:78:ad-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:fb:76:78:ad:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78:ad-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:fb:76:78:ad:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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:fb:76:78: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:fb:76:78:ad:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:76:78:ad", + "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-5e235jpa-ts0042.json b/tests/data/devices/tz3000-5e235jpa-ts0042.json new file mode 100644 index 000000000..58adea2ce --- /dev/null +++ b/tests/data/devices/tz3000-5e235jpa-ts0042.json @@ -0,0 +1,462 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "nwk": "0x6884", + "manufacturer": "_TZ3000_5e235jpa", + "model": "TS0042", + "friendly_manufacturer": "_TZ3000_5e235jpa", + "friendly_model": "TS0042", + "name": "_TZ3000_5e235jpa TS0042", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.233270+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_5e235jpa" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0042" + } + ] + }, + { + "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": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "endpoint_id": 2, + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "endpoint_id": 2, + "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:a1:e0:ec:6e-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:a1:e0:ec:6e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:e0:ec:6e", + "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-5fkufhn1-ts0502a.json b/tests/data/devices/tz3000-5fkufhn1-ts0502a.json new file mode 100644 index 000000000..8e2e2e021 --- /dev/null +++ b/tests/data/devices/tz3000-5fkufhn1-ts0502a.json @@ -0,0 +1,557 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:97:4b:44:fd", + "nwk": "0xB5E6", + "manufacturer": "_TZ3000_5fkufhn1", + "model": "TS0502A", + "friendly_manufacturer": "_TZ3000_5fkufhn1", + "friendly_model": "TS0502A", + "name": "_TZ3000_5fkufhn1 TS0502A", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.323577+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": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_5fkufhn1" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0502A" + } + ] + }, + { + "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", + "unsupported": true + }, + { + "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", + "unsupported": true + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 193 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 45874 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 19660 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:97:4b:44:fd-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:97:4b:44:fd:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:4b:44:fd", + "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:97:4b:44:fd-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:97:4b:44:fd: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:97:4b:44:fd: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:97:4b:44:fd:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:97:4b:44:fd", + "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": [ + 0.6999923704890516, + 0.29999237048905164 + ], + "color_temp": 193, + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:97:4b:44:fd-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:97:4b:44:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:4b:44:fd", + "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:97:4b:44:fd-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:97:4b:44:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:4b:44:fd", + "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:97:4b:44:fd-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:97:4b:44:fd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:4b:44:fd", + "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-6l1pjfqe-ts011f.json b/tests/data/devices/tz3000-6l1pjfqe-ts011f.json new file mode 100644 index 000000000..9d13ccd82 --- /dev/null +++ b/tests/data/devices/tz3000-6l1pjfqe-ts011f.json @@ -0,0 +1,885 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8e:a1:83:54", + "nwk": "0xEC7A", + "manufacturer": "_TZ3000_6l1pjfqe", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_6l1pjfqe", + "friendly_model": "TS011F", + "name": "_TZ3000_6l1pjfqe TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_CB_Metering", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.890382+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": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_6l1pjfqe" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + }, + { + "id": "0x000e", + "name": "product_label", + "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": "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": 23 + }, + { + "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": "0x0800", + "name": "ac_alarms_mask", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0603", + "name": "ac_current_divisor", + "zcl_type": "uint16", + "value": 1000 + }, + { + "id": "0x0602", + "name": "ac_current_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0802", + "name": "ac_current_overload", + "zcl_type": "int16", + "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": "0x0801", + "name": "ac_voltage_overload", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 450 + }, + { + "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": 3831 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 117 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "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": [] + } + ] + }, + "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", + "0x0402", + "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:8e:a1:83: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:8e:a1:83:54:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "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:8e:a1:83: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:8e:a1:83:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83: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:8e:a1:83: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:8e:a1:83:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83: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:8e:a1:83: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": "TuyaZBMeteringCluster", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:8e:a1:83:54:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 0.23, + "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:8e:a1:83: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:8e:a1:83:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 450.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8e:a1:83: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:8e:a1:83:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 3.831 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8e:a1:83: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:8e:a1:83:54:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 117.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8e:a1:83: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:8e:a1:83:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83:54", + "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:8e:a1:83: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:8e:a1:83:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8e:a1:83: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/tz3000-8nyaanzb-ts011f.json b/tests/data/devices/tz3000-8nyaanzb-ts011f.json new file mode 100644 index 000000000..04e929143 --- /dev/null +++ b/tests/data/devices/tz3000-8nyaanzb-ts011f.json @@ -0,0 +1,524 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0e:7a:44:0d", + "nwk": "0x18FE", + "manufacturer": "_TZ3000_8nyaanzb", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_8nyaanzb", + "friendly_model": "TS011F", + "name": "_TZ3000_8nyaanzb TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_TZ3000_2AC_var02", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.265380+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_8nyaanzb" + }, + { + "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": "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": [] + } + ] + }, + "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": "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": "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", + "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:0e:7a:44:0d-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:7a:44:0d:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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:0e:7a:44:0d-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:7a:44:0d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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:7a:44:0d-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:7a:44:0d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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:0e:7a:44:0d-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:0e:7a:44:0d:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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:0e:7a:44:0d-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:0e:7a:44:0d:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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:0e:7a:44:0d-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:7a:44:0d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0e:7a:44:0d", + "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-a37eix1s-ts0004.json b/tests/data/devices/tz3000-a37eix1s-ts0004.json new file mode 100644 index 000000000..e5cfb45d5 --- /dev/null +++ b/tests/data/devices/tz3000-a37eix1s-ts0004.json @@ -0,0 +1,800 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:83:aa:51:5f", + "nwk": "0xD6FB", + "manufacturer": "_TZ3000_a37eix1s", + "model": "TS0004", + "friendly_manufacturer": "_TZ3000_a37eix1s", + "friendly_model": "TS0004", + "name": "_TZ3000_a37eix1s TS0004", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000x.Switch_4G_GPP_Var2", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.273607+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_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_a37eix1s" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0004" + } + ] + }, + { + "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 + } + ] + }, + { + "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": [] + } + ] + }, + "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 + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "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 + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "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 + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "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": "TS0004", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [] + }, + "3": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [] + }, + "4": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "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:83:aa:51:5f-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:aa:51:5f:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:aa:51:5f-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:83:aa:51:5f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:83:aa:51:5f:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:83:aa:51:5f:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:83:aa:51:5f:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:aa:51:5f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:aa:51:5f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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:83:aa:51:5f-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:aa:51:5f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:aa:51:5f", + "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-a9buwvb7-ts0726.json b/tests/data/devices/tz3000-a9buwvb7-ts0726.json new file mode 100644 index 000000000..ec07a8234 --- /dev/null +++ b/tests/data/devices/tz3000-a9buwvb7-ts0726.json @@ -0,0 +1,904 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:97:a3:66:bf", + "nwk": "0x407B", + "manufacturer": "_TZ3000_a9buwvb7", + "model": "TS0726", + "friendly_manufacturer": "_TZ3000_a9buwvb7", + "friendly_model": "TS0726", + "name": "_TZ3000_a9buwvb7 TS0726", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.447359+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": "SCENE_SELECTOR", + "id": 4 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_a9buwvb7" + }, + { + "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": "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": 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": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "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": "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": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "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": "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": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "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": "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": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "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": "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": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "6": { + "profile_id": 260, + "device_type": { + "name": "SCENE_SELECTOR", + "id": 4 + }, + "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": "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": 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:97:a3:66: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:97:a3:66:bf:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66: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:97:a3:66: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:97:a3:66:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66: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:97:a3:66:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66:bf-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:97:a3:66:bf:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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:97:a3:66: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:97:a3:66:bf:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:a3:66:bf", + "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-adkvzooy-ts0042.json b/tests/data/devices/tz3000-adkvzooy-ts0042.json new file mode 100644 index 000000000..9d4490007 --- /dev/null +++ b/tests/data/devices/tz3000-adkvzooy-ts0042.json @@ -0,0 +1,436 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "nwk": "0x133E", + "manufacturer": "_TZ3000_adkvzooy", + "model": "TS0042", + "friendly_manufacturer": "_TZ3000_adkvzooy", + "friendly_model": "TS0042", + "name": "_TZ3000_adkvzooy TS0042", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.543036+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_adkvzooy" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0042" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "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:1b:0a:cb:cb-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:0a:cb:cb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "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:0a:cb:cb-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:0a:cb:cb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "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:0a:cb:cb-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:0a:cb:cb:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "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:1b:0a:cb:cb-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:1b:0a:cb:cb:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "endpoint_id": 2, + "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:1b:0a:cb:cb-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:1b:0a:cb:cb:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "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:1b:0a:cb:cb-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:1b:0a:cb:cb:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "endpoint_id": 2, + "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:1b:0a:cb:cb-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:0a:cb:cb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:0a:cb:cb", + "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-aghwaexm-ts0001.json b/tests/data/devices/tz3000-aghwaexm-ts0001.json new file mode 100644 index 000000000..a30f0660b --- /dev/null +++ b/tests/data/devices/tz3000-aghwaexm-ts0001.json @@ -0,0 +1,326 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a9:d3:9f:ef", + "nwk": "0x30C0", + "manufacturer": "_TZ3000_aghwaexm", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_aghwaexm", + "friendly_model": "TS0001", + "name": "_TZ3000_aghwaexm TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.205237+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_aghwaexm" + }, + { + "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": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:d3:9f: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:a9:d3:9f:ef:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:d3:9f:ef", + "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:a9:d3:9f:ef-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:a9:d3:9f:ef:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a9:d3:9f:ef", + "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:a9:d3:9f: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:a9:d3:9f:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:d3:9f:ef", + "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:d3:9f: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:a9:d3:9f:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:d3:9f:ef", + "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/tz3000-bjawzodf-ty0201.json b/tests/data/devices/tz3000-bjawzodf-ty0201.json new file mode 100644 index 000000000..247538500 --- /dev/null +++ b/tests/data/devices/tz3000-bjawzodf-ty0201.json @@ -0,0 +1,420 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2b:57:26:74", + "nwk": "0xF9BF", + "manufacturer": "_TZ3000_bjawzodf", + "model": "TY0201", + "friendly_manufacturer": "_TZ3000_bjawzodf", + "friendly_model": "TY0201", + "name": "_TZ3000_bjawzodf TY0201", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.247729+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_bjawzodf" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TY0201" + } + ] + }, + { + "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": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2360 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2b:57:26:74-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:2b:57:26:74:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26:74", + "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:2b:57:26: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:2b:57:26:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26: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:2b:57:26: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:2b:57:26:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26:74", + "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:2b:57:26:74-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:2b:57:26:74:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26:74", + "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:2b:57:26:74-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:2b:57:26:74:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.6 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2b:57:26: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:2b:57:26:74:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2b:57:26: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/tz3000-cfnprab5-ts011f.json b/tests/data/devices/tz3000-cfnprab5-ts011f.json new file mode 100644 index 000000000..4dec9d4bd --- /dev/null +++ b/tests/data/devices/tz3000-cfnprab5-ts011f.json @@ -0,0 +1,802 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:86:cf:95:48", + "nwk": "0x329B", + "manufacturer": "_TZ3000_cfnprab5", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_cfnprab5", + "friendly_model": "TS011F", + "name": "_TZ3000_cfnprab5 TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.022468+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": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "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": 3 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_cfnprab5" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS011F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 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": 1 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "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": 1 + } + ] + }, + { + "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": "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": 1 + } + ] + }, + { + "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": "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": 1 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + }, + "5": { + "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": 1 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:cf:95:48-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:cf:95:48:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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:86:cf:95:48-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:86:cf:95:48:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:cf:95:48-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:86:cf:95:48:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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": 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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:cf:95:48-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:86:cf:95:48:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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": 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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:cf:95:48-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:86:cf:95:48:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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": 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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:86:cf:95:48-5", + "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": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:86:cf:95:48:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "endpoint_id": 5, + "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:86:cf:95: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:86:cf:95:48:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95: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:86:cf:95: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:86:cf:95:48:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:86:cf:95:48", + "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/tz3000-cicwjqth-ts011f.json b/tests/data/devices/tz3000-cicwjqth-ts011f.json new file mode 100644 index 000000000..2f25d8da9 --- /dev/null +++ b/tests/data/devices/tz3000-cicwjqth-ts011f.json @@ -0,0 +1,772 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:0c:54:33", + "nwk": "0x7530", + "manufacturer": "_TZ3000_cicwjqth", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_cicwjqth", + "friendly_model": "TS011F", + "name": "_TZ3000_cicwjqth TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.617674+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": 116 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_cicwjqth" + }, + { + "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": "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": "0x0020", + "name": "active_register_tier_delivered", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "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", + "unsupported": true + }, + { + "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", + "unsupported": true + } + ] + }, + { + "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": 102 + }, + { + "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": "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": 1946234881 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:0c:54:33-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:0c:54:33:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54: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:8d:0c:54:33:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54: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:8d:0c:54:33:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54:33-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:0c:54:33:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54:33-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:8d:0c:54:33:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.102 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:0c:54:33-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:8d:0c:54:33:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54:33-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:8d:0c:54:33:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "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:8d:0c:54: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:8d:0c:54:33:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:0c:54:33", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x74013001", + "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-dbou1ap4-ts0505a.json b/tests/data/devices/tz3000-dbou1ap4-ts0505a.json new file mode 100644 index 000000000..2c70fde77 --- /dev/null +++ b/tests/data/devices/tz3000-dbou1ap4-ts0505a.json @@ -0,0 +1,586 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:90:7f:c5:7a", + "nwk": "0xAA8C", + "manufacturer": "_TZ3000_dbou1ap4", + "model": "TS0505A", + "friendly_manufacturer": "_TZ3000_dbou1ap4", + "friendly_model": "TS0505A", + "name": "_TZ3000_dbou1ap4 TS0505A", + "quirk_applied": true, + "quirk_class": "zhaquirks.lidl.rgbcct.RGBCCTLight", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.561107+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": "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": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "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": 140 + }, + { + "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": 25 + }, + { + "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", + "unsupported": true + }, + { + "id": "0x400b", + "name": "color_temp_physical_min", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0007", + "name": "color_temperature", + "zcl_type": "uint16", + "value": 291 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "models_info": [ + [ + "_TZ3000_dbou1ap4", + "TS0505A" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010d", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0300", + "0x1000" + ], + "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:90:7f:c5:7a-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:7f:c5:7a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:7f:c5:7a", + "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:90:7f:c5:7a-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:90:7f:c5:7a: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:90:7f:c5:7a: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:90:7f:c5:7a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:90:7f:c5:7a", + "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": 140, + "xy_color": [ + 0.0, + 0.0 + ], + "color_temp": 291, + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:90:7f:c5:7a-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:7f:c5:7a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:7f:c5:7a", + "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:7f:c5:7a-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:7f:c5:7a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:7f:c5:7a", + "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:90:7f:c5:7a-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:7f:c5:7a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:90:7f:c5:7a", + "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-dowj6gyi-ts0201.json b/tests/data/devices/tz3000-dowj6gyi-ts0201.json new file mode 100644 index 000000000..3c1bb0e84 --- /dev/null +++ b/tests/data/devices/tz3000-dowj6gyi-ts0201.json @@ -0,0 +1,472 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:51:b2:ae:04", + "nwk": "0x95F3", + "manufacturer": "_TZ3000_dowj6gyi", + "model": "TS0201", + "friendly_manufacturer": "_TZ3000_dowj6gyi", + "friendly_model": "TS0201", + "name": "_TZ3000_dowj6gyi TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.099820+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_dowj6gyi" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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": 2130 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5831 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:b2:ae: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:51:b2:ae:04:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae: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:51:b2:ae: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:51:b2:ae:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae: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:51:b2:ae: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:51:b2:ae:04:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae: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:51:b2:ae: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:51:b2:ae:04:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae: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.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:b2:ae:04-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:51:b2:ae:04:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 21.3 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:b2:ae:04-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:51:b2:ae:04:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae:04", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 58.31 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:51:b2:ae: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:51:b2:ae:04:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:51:b2:ae:04", + "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-e2uieqop-ts0001.json b/tests/data/devices/tz3000-e2uieqop-ts0001.json new file mode 100644 index 000000000..9658e8f3f --- /dev/null +++ b/tests/data/devices/tz3000-e2uieqop-ts0001.json @@ -0,0 +1,430 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:db:a7:b4:b5", + "nwk": "0xCBB7", + "manufacturer": "_TZ3000_e2uieqop", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_e2uieqop", + "friendly_model": "TS0001", + "name": "_TZ3000_e2uieqop TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.732313+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": 82 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_e2uieqop" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + }, + { + "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": [ + { + "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": [] + }, + { + "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": 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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:db:a7:b4:b5-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:db:a7:b4:b5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:db:a7:b4:b5", + "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:db:a7:b4:b5-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:db:a7:b4:b5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:db:a7:b4:b5", + "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:db:a7:b4:b5-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:db:a7:b4:b5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:db:a7:b4:b5", + "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:db:a7:b4:b5-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:db:a7:b4:b5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:db:a7:b4:b5", + "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:db:a7:b4:b5-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:db:a7:b4:b5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:db:a7:b4:b5", + "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-eamtuojw-ts0201.json b/tests/data/devices/tz3000-eamtuojw-ts0201.json new file mode 100644 index 000000000..f460ad125 --- /dev/null +++ b/tests/data/devices/tz3000-eamtuojw-ts0201.json @@ -0,0 +1,421 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ab:fc:51:44", + "nwk": "0x8AFE", + "manufacturer": "_TZ3000_eamtuojw", + "model": "TS0201", + "friendly_manufacturer": "_TZ3000_eamtuojw", + "friendly_model": "TS0201", + "name": "_TZ3000_eamtuojw TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4151, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.699326+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": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_eamtuojw" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "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": 65 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:fc:51: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:ab:fc:51:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51: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:ab:fc:51: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:ab:fc:51:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51: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:ab:fc:51: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:ab:fc:51:44:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 0.0, + "battery_voltage": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:fc:51:44-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:ab:fc:51:44:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51:44", + "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:ab:fc:51:44-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:ab:fc:51:44:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51:44", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ab:fc:51: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:ab:fc:51:44:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ab:fc:51:44", + "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-empogkya-ts0003.json b/tests/data/devices/tz3000-empogkya-ts0003.json new file mode 100644 index 000000000..2a3b91295 --- /dev/null +++ b/tests/data/devices/tz3000-empogkya-ts0003.json @@ -0,0 +1,674 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "nwk": "0x5407", + "manufacturer": "_TZ3000_empogkya", + "model": "TS0003", + "friendly_manufacturer": "_TZ3000_empogkya", + "friendly_model": "TS0003", + "name": "_TZ3000_empogkya TS0003", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000x.Switch_3G_GPP_Var2", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.336951+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_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_empogkya" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0003" + } + ] + }, + { + "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 + } + ] + }, + { + "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": [] + } + ] + }, + "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 + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "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 + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "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": "TS0003", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [] + }, + "3": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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:a4:f0:2a:e8-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:a4:f0:2a:e8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:f0:2a:e8", + "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-fdxihpp7-ts0001.json b/tests/data/devices/tz3000-fdxihpp7-ts0001.json new file mode 100644 index 000000000..1d4bcbcd9 --- /dev/null +++ b/tests/data/devices/tz3000-fdxihpp7-ts0001.json @@ -0,0 +1,838 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:22:a7:1c:c8", + "nwk": "0xC86B", + "manufacturer": "_TZ3000_fdxihpp7", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_fdxihpp7", + "friendly_model": "TS0001", + "name": "_TZ3000_fdxihpp7 TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": 98, + "rssi": null, + "last_seen": "2025-12-04T19:43:15.295597+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 100 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_fdxihpp7" + }, + { + "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", + "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": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:a7:1c: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:22:a7:1c:c8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "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:22:a7:1c:c8-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:22:a7:1c:c8:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "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:22:a7:1c: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:22:a7:1c:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 98 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:a7:1c: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:22:a7:1c:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c: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:22:a7:1c:c8-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:22:a7:1c:c8:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": null + }, + "state": { + "class_name": "SmartEnergySummation", + "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:22:a7:1c: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:22:a7:1c:c8:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "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:22:a7:1c:c8-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:22:a7:1c:c8:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "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:22:a7:1c:c8-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:22:a7:1c:c8:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:22:a7:1c:c8", + "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" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tz3000-gjrubzje-ts0001.json b/tests/data/devices/tz3000-gjrubzje-ts0001.json new file mode 100644 index 000000000..7aecaf354 --- /dev/null +++ b/tests/data/devices/tz3000-gjrubzje-ts0001.json @@ -0,0 +1,882 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "nwk": "0xAD94", + "manufacturer": "_TZ3000_gjrubzje", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_gjrubzje", + "friendly_model": "TS0001", + "name": "_TZ3000_gjrubzje TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.071293+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 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_gjrubzje" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "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": 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": "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": "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": "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:b2:ef: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:6b:b2:ef:b7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef: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:6b:b2:ef:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:b2:ef: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:6b:b2:ef:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef: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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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:6b:b2:ef:b7-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:6b:b2:ef:b7:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6b:b2:ef: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:6b:b2:ef:b7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:b2:ef:b7", + "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-isw9u95y-ts0201.json b/tests/data/devices/tz3000-isw9u95y-ts0201.json new file mode 100644 index 000000000..68f749770 --- /dev/null +++ b/tests/data/devices/tz3000-isw9u95y-ts0201.json @@ -0,0 +1,610 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ca:ae:e5:84", + "nwk": "0x2D2E", + "manufacturer": "_TZ3000_isw9u95y", + "model": "TS0201", + "friendly_manufacturer": "_TZ3000_isw9u95y", + "friendly_model": "TS0201", + "name": "_TZ3000_isw9u95y TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-11-04T09:29:22.099473+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": 74, + "maximum_incoming_transfer_size": 80, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 80, + "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_isw9u95y" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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": 0 + } + ] + }, + { + "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": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "84:71:27:ff:fe:c9:a6:bc" + }, + { + "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": 40 + } + ] + }, + { + "cluster_id": "0xe002", + "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": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "endpoint_id": 1, + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ca:ae:e5:84-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:ca:ae:e5:84:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ca:ae:e5:84", + "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/tz3000-j1xl73iw-ts130f.json b/tests/data/devices/tz3000-j1xl73iw-ts130f.json new file mode 100644 index 000000000..02233671b --- /dev/null +++ b/tests/data/devices/tz3000-j1xl73iw-ts130f.json @@ -0,0 +1,730 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e2:fe:70:54", + "nwk": "0x8B1B", + "manufacturer": "_TZ3000_j1xl73iw", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_j1xl73iw", + "friendly_model": "TS130F", + "name": "_TZ3000_j1xl73iw TS130F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130Double_GP_ESTC", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.875836+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "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": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0xf001", + "name": "calibration", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xf003", + "name": "calibration_time", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "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", + "value": 0 + }, + { + "id": "0xf002", + "name": "motor_reversal", + "zcl_type": "enum8", + "value": 0 + }, + { + "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 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "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": 70 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0xf001", + "name": "calibration", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xf003", + "name": "calibration_time", + "zcl_type": "uint16", + "value": 100 + }, + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "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", + "value": 0 + }, + { + "id": "0xf002", + "name": "motor_reversal", + "zcl_type": "enum8", + "value": 0 + }, + { + "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 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "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": { + "model": "TS130F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x0006", + "0x0102", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0x0102", + "0xe001" + ], + "output_clusters": [] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e2:fe:70:54-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:e2:fe:70:54:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e2:fe:70:54-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:e2:fe:70:54:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "endpoint_id": 2, + "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:e2:fe:70: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:e2:fe:70:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70: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:e2:fe:70: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:e2:fe:70:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "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:e2:fe:70: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": 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:e2:fe:70:54:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "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:e2:fe:70:54-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:e2:fe:70:54:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "endpoint_id": 2, + "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:e2:fe:70: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:e2:fe:70:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:fe:70:54", + "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-ja5osu5g-ts004f.json b/tests/data/devices/tz3000-ja5osu5g-ts004f.json new file mode 100644 index 000000000..fa2c55039 --- /dev/null +++ b/tests/data/devices/tz3000-ja5osu5g-ts004f.json @@ -0,0 +1,474 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a9:50:bd:12", + "nwk": "0x15CB", + "manufacturer": "_TZ3000_ja5osu5g", + "model": "TS004F", + "friendly_manufacturer": "_TZ3000_ja5osu5g", + "friendly_model": "TS004F", + "name": "_TZ3000_ja5osu5g TS004F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts004f.TuyaSmartRemote004FSK", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": 188, + "rssi": -64, + "last_seen": "2025-11-08T14:22:48.417658+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": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "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_ja5osu5g" + }, + { + "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", + "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": 176 + }, + { + "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": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "TS004X_cluster", + "attributes": [ + { + "id": "0x8004", + "name": "switch_mode", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "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", + "value": 65 + } + ] + }, + { + "cluster_id": "0x0300", + "endpoint_attribute": "light_color", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZ3000_kjfzuycl", + "TS004F" + ], + [ + "_TZ3000_ja5osu5g", + "TS004F" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0104", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0004", + "0x0006", + "0x1000", + "0xe001" + ], + "output_clusters": [ + "0x0019", + "0x000a", + "0x0003", + "0x0004", + "0x0006", + "0x0008", + "0x1000" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:50:bd:12-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:a9:50:bd:12:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:50:bd:12", + "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:a9:50:bd:12-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:50:bd:12:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:50:bd:12", + "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:a9:50:bd:12-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:50:bd:12:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:50:bd:12", + "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:a9:50:bd:12-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:50:bd:12:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a9:50:bd:12", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 88.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:a9:50:bd:12-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:50:bd:12:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:50:bd:12", + "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-kmsbwdol-ts130f.json b/tests/data/devices/tz3000-kmsbwdol-ts130f.json new file mode 100644 index 000000000..891b09a91 --- /dev/null +++ b/tests/data/devices/tz3000-kmsbwdol-ts130f.json @@ -0,0 +1,696 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:b7:7a:50", + "nwk": "0x7224", + "manufacturer": "_TZ3000_kmsbwdol", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_kmsbwdol", + "friendly_model": "TS130F", + "name": "_TZ3000_kmsbwdol TS130F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130Double_GP_ESTC", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:56.508624+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_kmsbwdol" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x4002", + "name": "off_wait_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "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": "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": 0 + }, + { + "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": "0x0001", + "name": "physical_closed_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "physical_closed_limit_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 + } + ] + }, + { + "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": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 100 + } + ] + }, + { + "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": "TS130F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x0006", + "0x0102", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0x0102", + "0xe001" + ], + "output_clusters": [] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:b7:7a:50-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:8d:b7:7a:50:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:b7:7a:50-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:8d:b7:7a:50:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "endpoint_id": 2, + "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:8d:b7:7a: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:8d:b7:7a:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "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:8d:b7:7a: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:8d:b7:7a:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a: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:8d:b7:7a:50-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:8d:b7:7a:50:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:b7:7a:50-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:8d:b7:7a:50:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "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:8d:b7:7a:50-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:8d:b7:7a:50:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "endpoint_id": 2, + "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:b7:7a: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:8d:b7:7a:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", + "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-kqvb5akv-ts0001.json b/tests/data/devices/tz3000-kqvb5akv-ts0001.json new file mode 100644 index 000000000..0adbb8bdd --- /dev/null +++ b/tests/data/devices/tz3000-kqvb5akv-ts0001.json @@ -0,0 +1,949 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c3:82:cb:22", + "nwk": "0xDB0A", + "manufacturer": "_TZ3000_kqvb5akv", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_kqvb5akv", + "friendly_model": "TS0001", + "name": "_TZ3000_kqvb5akv TS0001", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 200, + "rssi": null, + "last_seen": "2025-12-04T19:43:28.120339+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": "_TZ3000_kqvb5akv" + }, + { + "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": 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": 154 + }, + { + "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": 30 + }, + { + "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": 245 + }, + { + "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 + }, + { + "id": "0x0304", + "name": "total_active_power", + "zcl_type": "int32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "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 + } + ] + } + ] + }, + "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:c3:82:cb: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:c3:82:cb:22:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "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:c3:82:cb:22-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:c3:82:cb:22:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "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:c3:82:cb: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:c3:82:cb:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "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:c3:82:cb: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:c3:82:cb:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "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:82:cb:22-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:c3:82:cb:22:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 1.54, + "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:c3:82:cb:22-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:c3:82:cb:22:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 30.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:82:cb:22-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:c3:82:cb:22:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.245 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:82:cb:22-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:c3:82:cb:22:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 231.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c3:82:cb: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:c3:82:cb:22:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c3:82:cb:22", + "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/tz3000-lepzuhto-ts011f.json b/tests/data/devices/tz3000-lepzuhto-ts011f.json new file mode 100644 index 000000000..cd80bba08 --- /dev/null +++ b/tests/data/devices/tz3000-lepzuhto-ts011f.json @@ -0,0 +1,884 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1f:e8:29:50", + "nwk": "0x76C5", + "manufacturer": "_TZ3000_lepzuhto", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_lepzuhto", + "friendly_model": "TS011F", + "name": "_TZ3000_lepzuhto TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_CB_Metering", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.606282+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_lepzuhto" + }, + { + "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": "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": 5954 + }, + { + "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": 198 + }, + { + "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": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 1049 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 238 + }, + { + "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": [] + } + ] + }, + "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", + "0x0402", + "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:1f:e8:29: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:1f:e8:29:50:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "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:1f:e8:29: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:1f:e8:29:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "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:1f:e8:29: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:1f:e8:29:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29: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:1f:e8:29:50-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:1f:e8:29:50:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 59.54, + "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:1f:e8:29: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:1f:e8:29:50:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 198.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1f:e8:29:50-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:1f:e8:29:50:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "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:1f:e8:29:50-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:1f:e8:29:50:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 1.049 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1f:e8:29:50-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:1f:e8:29:50:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 238.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1f:e8:29:50-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:1f:e8:29:50:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "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:1f:e8:29: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:1f:e8:29:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:e8:29:50", + "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-lf56vpxj-ts0202.json b/tests/data/devices/tz3000-lf56vpxj-ts0202.json new file mode 100644 index 000000000..9f5f87da1 --- /dev/null +++ b/tests/data/devices/tz3000-lf56vpxj-ts0202.json @@ -0,0 +1,454 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:95:6b:8f:d1", + "nwk": "0xEB95", + "manufacturer": "_TZ3000_lf56vpxj", + "model": "TS0202", + "friendly_manufacturer": "_TZ3000_lf56vpxj", + "friendly_model": "TS0202", + "name": "_TZ3000_lf56vpxj TS0202", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.826816+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_lf56vpxj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0202" + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 127, + 138, + 30, + 46, + 0, + 75, + 18, + 0 + ] + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 13 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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:95:6b:8f:d1-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:95:6b:8f:d1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:6b:8f:d1", + "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-llfaquvp-ts0012.json b/tests/data/devices/tz3000-llfaquvp-ts0012.json new file mode 100644 index 000000000..49fdd076f --- /dev/null +++ b/tests/data/devices/tz3000-llfaquvp-ts0012.json @@ -0,0 +1,597 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fa:98:ca:b8", + "nwk": "0xDFF7", + "manufacturer": "_TZ3000_llfaquvp", + "model": "TS0012", + "friendly_manufacturer": "_TZ3000_llfaquvp", + "friendly_model": "TS0012", + "name": "_TZ3000_llfaquvp TS0012", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts001x.Tuya_Double_No_N_Plus", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.664378+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": 67 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_llfaquvp" + }, + { + "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": "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": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "value": 2 + }, + { + "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": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "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": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "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", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x0019", + "0x000a" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fa:98:ca:b8-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:fa:98:ca:b8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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:fa:98:ca:b8-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:fa:98:ca:b8:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fa:98:ca:b8-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:fa:98:ca:b8:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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:fa:98:ca:b8-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:fa:98:ca:b8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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:fa:98:ca:b8-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:fa:98:ca:b8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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:fa:98:ca:b8-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:fa:98:ca:b8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:98:ca:b8", + "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-lotmgthb-ts011f.json b/tests/data/devices/tz3000-lotmgthb-ts011f.json new file mode 100644 index 000000000..b81b2f1b2 --- /dev/null +++ b/tests/data/devices/tz3000-lotmgthb-ts011f.json @@ -0,0 +1,858 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e0:b1:51:a5", + "nwk": "0xE571", + "manufacturer": "_TZ3000_lotmgthb", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_lotmgthb", + "friendly_model": "TS011F", + "name": "_TZ3000_lotmgthb TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.669852+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": 192 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_lotmgthb" + }, + { + "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": 71 + }, + { + "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": "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": "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": 125 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:b1:51:a5-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:b1:51:a5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51: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:e0:b1:51:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:b1:51: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:e0:b1:51:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 0.71, + "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:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 125.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e0:b1:51:a5-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:e0:b1:51:a5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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:e0:b1:51: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:e0:b1:51:a5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:b1:51:a5", + "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-lrgccsxm-ts0013.json b/tests/data/devices/tz3000-lrgccsxm-ts0013.json new file mode 100644 index 000000000..6b46cc5fe --- /dev/null +++ b/tests/data/devices/tz3000-lrgccsxm-ts0013.json @@ -0,0 +1,589 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:67:c9:96:f3", + "nwk": "0xEF03", + "manufacturer": "_TZ3000_lrgccsxm", + "model": "TS0013", + "friendly_manufacturer": "_TZ3000_lrgccsxm", + "friendly_model": "TS0013", + "name": "_TZ3000_lrgccsxm TS0013", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.535436+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_lrgccsxm" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0013" + } + ] + }, + { + "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": [] + } + ] + }, + "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": [] + }, + "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 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:67:c9:96:f3-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:67:c9:96:f3:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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:67:c9:96:f3-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:67:c9:96:f3:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:67:c9:96:f3", + "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-ltiqubue-ts130f.json b/tests/data/devices/tz3000-ltiqubue-ts130f.json new file mode 100644 index 000000000..1960d7d42 --- /dev/null +++ b/tests/data/devices/tz3000-ltiqubue-ts130f.json @@ -0,0 +1,416 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:43:3b:68:f1", + "nwk": "0x96A6", + "manufacturer": "_TZ3000_ltiqubue", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_ltiqubue", + "friendly_model": "TS130F", + "name": "_TZ3000_ltiqubue TS130F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130FUL", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.165364+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_ltiqubue" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + } + ] + } + }, + "original_signature": { + "model": "TS130F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0102" + ], + "output_clusters": [ + "0x000a" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:3b:68:f1-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:43:3b:68:f1:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "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:43:3b:68:f1-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:43:3b:68:f1:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "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:43:3b:68:f1-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:43:3b:68:f1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "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:43:3b:68:f1-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:43:3b:68:f1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "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:43:3b:68:f1-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:43:3b:68:f1:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:43:3b:68:f1-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:43:3b:68:f1:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:43:3b:68:f1", + "endpoint_id": 1, + "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/tz3000-mg4dy6z6-ts0202.json b/tests/data/devices/tz3000-mg4dy6z6-ts0202.json new file mode 100644 index 000000000..c2508488d --- /dev/null +++ b/tests/data/devices/tz3000-mg4dy6z6-ts0202.json @@ -0,0 +1,505 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cd:66:75:56", + "nwk": "0x3312", + "manufacturer": "_TZ3000_mg4dy6z6", + "model": "TS0202", + "friendly_manufacturer": "_TZ3000_mg4dy6z6", + "friendly_model": "TS0202", + "name": "_TZ3000_mg4dy6z6 TS0202", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.434628+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_mg4dy6z6" + }, + { + "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": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 163, + 101, + 136, + 254, + 255, + 141, + 121, + 224 + ] + }, + { + "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", + "value": 0 + } + ] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cd:66:75:56-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:cd:66:75:56:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75:56-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:cd:66:75:56:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75: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:cd:66:75:56:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75: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:cd:66:75:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75: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:cd:66:75:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75:56-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:cd:66:75:56:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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:cd:66:75: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:cd:66:75:56:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cd:66:75:56", + "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-mgusv51k-ts0052.json b/tests/data/devices/tz3000-mgusv51k-ts0052.json new file mode 100644 index 000000000..9e478f5e4 --- /dev/null +++ b/tests/data/devices/tz3000-mgusv51k-ts0052.json @@ -0,0 +1,539 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:77:a4:24:d4", + "nwk": "0x3A98", + "manufacturer": "_TZ3000_mgusv51k", + "model": "TS0052", + "friendly_manufacturer": "_TZ3000_mgusv51k", + "friendly_model": "TS0052", + "name": "_TZ3000_mgusv51k TS0052", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 36, + "rssi": null, + "last_seen": "2025-11-28T15:41:40.658168+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": "_TZ3000_mgusv51k" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0052" + } + ] + }, + { + "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": "0x0008", + "endpoint_attribute": "level", + "attributes": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "value": 127 + }, + { + "id": "0x0014", + "name": "default_move_rate", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "max_level", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0002", + "name": "min_level", + "zcl_type": "uint8", + "value": 2 + }, + { + "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", + "value": 5000 + }, + { + "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": "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": 68 + } + ] + } + ] + }, + "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:77:a4:24:d4-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:77:a4:24:d4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "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:77:a4:24:d4-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:77:a4:24:d4: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:77:a4:24:d4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "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": 127, + "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:77:a4:24:d4-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:77:a4:24:d4:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "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": 5000 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:77:a4:24:d4-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:77:a4:24:d4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 36 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:77:a4:24:d4-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:77:a4:24:d4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "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:77:a4:24:d4-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:77:a4:24:d4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:77:a4:24:d4", + "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/tz3000-mkhkxx1p-ts0001.json b/tests/data/devices/tz3000-mkhkxx1p-ts0001.json new file mode 100644 index 000000000..fc60cb919 --- /dev/null +++ b/tests/data/devices/tz3000-mkhkxx1p-ts0001.json @@ -0,0 +1,880 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:36:44:eb:16", + "nwk": "0x45CD", + "manufacturer": "_TZ3000_mkhkxx1p", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_mkhkxx1p", + "friendly_model": "TS0001", + "name": "_TZ3000_mkhkxx1p TS0001", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.916851+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": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_mkhkxx1p" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + }, + { + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "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": 0 + }, + { + "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": "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": "0xe000", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "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": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:44:eb:16-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:44:eb:16:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:36:44:eb:16:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:44:eb:16:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:44:eb:16:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:36:44:eb:16:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:36:44:eb:16:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:36:44:eb:16:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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:36:44:eb:16-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:36:44:eb:16:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:36:44:eb:16-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:44:eb:16:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:36:44:eb:16", + "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/tz3000-npzfdcof-ts0001.json b/tests/data/devices/tz3000-npzfdcof-ts0001.json new file mode 100644 index 000000000..24fcb1542 --- /dev/null +++ b/tests/data/devices/tz3000-npzfdcof-ts0001.json @@ -0,0 +1,872 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:37:97:29:ff", + "nwk": "0xBDD4", + "manufacturer": "_TZ3000_npzfdcof", + "model": "TS0001", + "friendly_manufacturer": "_TZ3000_npzfdcof", + "friendly_model": "TS0001", + "name": "_TZ3000_npzfdcof TS0001", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.327632+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": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_npzfdcof" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0001" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "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": "0x0003", + "endpoint_attribute": "identify", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "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": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "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": "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": "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": 0 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:37:97:29: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:37:97:29:ff:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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:37:97:29:ff-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:37:97:29:ff:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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:37:97:29: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:37:97:29:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29: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:37:97:29: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:37:97:29:ff:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29: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:37:97:29:ff-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:37:97:29:ff:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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:37:97:29:ff-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:37:97:29:ff:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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:37:97:29:ff-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:37:97:29:ff:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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:37:97:29:ff-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:37:97:29:ff:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29:ff", + "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" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:37:97:29: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:37:97:29:ff:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:37:97:29: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-okaz9tjs-ts011f.json b/tests/data/devices/tz3000-okaz9tjs-ts011f.json new file mode 100644 index 000000000..97e44b206 --- /dev/null +++ b/tests/data/devices/tz3000-okaz9tjs-ts011f.json @@ -0,0 +1,817 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:44:63:a9:95", + "nwk": "0x12C0", + "manufacturer": "_TZ3000_okaz9tjs", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_okaz9tjs", + "friendly_model": "TS011F", + "name": "_TZ3000_okaz9tjs TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_v5", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4660, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.358054+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": "SMART_PLUG", + "id": 81 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_okaz9tjs" + }, + { + "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": "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "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": 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": 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": 239 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + }, + { + "cluster_id": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "original_signature": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x000a", + "0x0702", + "0x0b04", + "0x1000", + "0xe000", + "0xe001" + ], + "output_clusters": [] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:44:63:a9:95-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:44:63:a9:95:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "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:44:63:a9:95-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:44:63:a9:95:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 239.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:44:63:a9:95-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:44:63:a9:95:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:44:63:a9:95", + "endpoint_id": 1, + "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-pl5v1yyy-ts011f.json b/tests/data/devices/tz3000-pl5v1yyy-ts011f.json new file mode 100644 index 000000000..2cbaf4613 --- /dev/null +++ b/tests/data/devices/tz3000-pl5v1yyy-ts011f.json @@ -0,0 +1,1293 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:89:87:b0:a2", + "nwk": "0xB06A", + "manufacturer": "_TZ3000_pl5v1yyy", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_pl5v1yyy", + "friendly_model": "TS011F", + "name": "_TZ3000_pl5v1yyy TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 236, + "rssi": -41, + "last_seen": "2025-11-22T10:27:35.542050+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_pl5v1yyy" + }, + { + "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": "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": "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": "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 + } + ] + }, + { + "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": 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": "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": [] + }, + "3": { + "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": "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": [] + }, + "4": { + "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": "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": [] + }, + "5": { + "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": "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 236 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:89:87:b0:a2-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:89:87:b0:a2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -41 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:89:87:b0:a2-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:89:87:b0:a2:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-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:89:87:b0:a2:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-3", + "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:89:87:b0:a2:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-4", + "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:89:87:b0:a2:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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:89:87:b0:a2-5", + "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:89:87:b0:a2:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "endpoint_id": 5, + "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:89:87:b0:a2-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:89:87:b0:a2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:89:87:b0:a2", + "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-qa8s8vca-ts130f.json b/tests/data/devices/tz3000-qa8s8vca-ts130f.json new file mode 100644 index 000000000..899230adb --- /dev/null +++ b/tests/data/devices/tz3000-qa8s8vca-ts130f.json @@ -0,0 +1,431 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fb:49:87:24", + "nwk": "0x1021", + "manufacturer": "_TZ3000_qa8s8vca", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_qa8s8vca", + "friendly_model": "TS130F", + "name": "_TZ3000_qa8s8vca TS130F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.189732+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": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_qa8s8vca" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0015", + "name": "acceleration_time_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 + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fb:49:87:24-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:fb:49:87:24:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "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:fb:49:87:24-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:fb:49:87:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "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:fb:49:87:24-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:fb:49:87:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "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:fb:49:87:24-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:fb:49:87:24:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fb:49:87:24-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:fb:49:87:24:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "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:fb:49:87:24-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:fb:49:87:24:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:49:87:24", + "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-qqdbccb3-ts130f.json b/tests/data/devices/tz3000-qqdbccb3-ts130f.json new file mode 100644 index 000000000..7f0ea5204 --- /dev/null +++ b/tests/data/devices/tz3000-qqdbccb3-ts130f.json @@ -0,0 +1,391 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5a:e5:28:64", + "nwk": "0x87C1", + "manufacturer": "_TZ3000_qqdbccb3", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_qqdbccb3", + "friendly_model": "TS130F", + "name": "_TZ3000_qqdbccb3 TS130F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.765485+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": 10752, + "maximum_outgoing_transfer_size": 66, + "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": "_TZ3000_qqdbccb3" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "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": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:e5:28: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:5a:e5:28:64:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28:64", + "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:5a:e5:28:64-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": 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:5a:e5:28:64:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28:64", + "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:5a:e5:28: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:5a:e5:28:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28: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:5a:e5:28: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:5a:e5:28:64:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28: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:5a:e5:28:64-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:5a:e5:28:64:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28:64", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5a:e5:28: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:5a:e5:28:64:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5a:e5:28:64", + "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-r6buo8ba-ts011f.json b/tests/data/devices/tz3000-r6buo8ba-ts011f.json new file mode 100644 index 000000000..702be01eb --- /dev/null +++ b/tests/data/devices/tz3000-r6buo8ba-ts011f.json @@ -0,0 +1,812 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d7:9b:67:b6", + "nwk": "0xB8AC", + "manufacturer": "_TZ3000_r6buo8ba", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_r6buo8ba", + "friendly_model": "TS011F", + "name": "_TZ3000_r6buo8ba TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_v6", + "exposes_features": [], + "manufacturer_code": 0, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.494958+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": 80, + "server_mask": 10752, + "maximum_outgoing_transfer_size": 80, + "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": 160 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_r6buo8ba" + }, + { + "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": 9536 + }, + { + "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", + "unsupported": true + }, + { + "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": 1 + }, + { + "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": 45 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 245 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + } + ] + } + }, + "original_signature": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0702", + "0x0b04" + ], + "output_clusters": [ + "0x0003", + "0x0006", + "0x0019", + "0xe001" + ] + } + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 95.36, + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.045 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 245.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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:d7:9b:67:b6-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:d7:9b:67:b6:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d7:9b:67:b6", + "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-snq47izk-ts0013.json b/tests/data/devices/tz3000-snq47izk-ts0013.json new file mode 100644 index 000000000..49404d52f --- /dev/null +++ b/tests/data/devices/tz3000-snq47izk-ts0013.json @@ -0,0 +1,589 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "nwk": "0x3FD3", + "manufacturer": "_TZ3000_snq47izk", + "model": "TS0013", + "friendly_manufacturer": "_TZ3000_snq47izk", + "friendly_model": "TS0013", + "name": "_TZ3000_snq47izk TS0013", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.907798+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_snq47izk" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0013" + } + ] + }, + { + "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 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "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": [] + }, + "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 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:9d:2a: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:ce:9d:2a:9c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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:ce:9d:2a:9c-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:ce:9d:2a:9c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ce:9d:2a:9c-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:ce:9d:2a:9c:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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:ce:9d:2a:9c-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:ce:9d:2a:9c:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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:ce:9d:2a: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:ce:9d:2a:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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:9d:2a: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:ce:9d:2a:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a:9c", + "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:ce:9d:2a: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:ce:9d:2a:9c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ce:9d:2a: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/tz3000-u3oupgdy-ts0004.json b/tests/data/devices/tz3000-u3oupgdy-ts0004.json new file mode 100644 index 000000000..e8d08a072 --- /dev/null +++ b/tests/data/devices/tz3000-u3oupgdy-ts0004.json @@ -0,0 +1,1044 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:64:23:80:ed", + "nwk": "0xD5E1", + "manufacturer": "_TZ3000_u3oupgdy", + "model": "TS0004", + "friendly_manufacturer": "_TZ3000_u3oupgdy", + "friendly_model": "TS0004", + "name": "_TZ3000_u3oupgdy TS0004", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000x.Switch_4G_GPP", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.396838+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": 80 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_u3oupgdy" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0004" + }, + { + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "value": 1 + }, + { + "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": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "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": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "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": 80 + } + ] + } + ] + }, + "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": "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": 0 + }, + { + "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": [] + }, + "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": "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": 0 + }, + { + "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": [] + }, + "4": { + "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": "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": 0 + }, + { + "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": "TS0004", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "3": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "4": { + "profile_id": "0x0104", + "device_type": "0x0100", + "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:64:23:80:ed-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:64:23:80:ed:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:64:23:80:ed:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:64:23:80:ed:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:64:23:80:ed:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:64:23:80:ed:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:64:23:80:ed-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:64:23:80:ed:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:64:23:80:ed:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPowerOnState", + "options": [ + "Off", + "On", + "LastState" + ] + }, + "state": { + "class_name": "TuyaPowerOnStateSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:64:23:80:ed-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:23:80:ed:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:23:80:ed:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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:64:23:80:ed-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:23:80:ed:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:64:23:80:ed", + "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-vw8pawxa-ts130f.json b/tests/data/devices/tz3000-vw8pawxa-ts130f.json new file mode 100644 index 000000000..85c393592 --- /dev/null +++ b/tests/data/devices/tz3000-vw8pawxa-ts130f.json @@ -0,0 +1,481 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:47:c9:40:68", + "nwk": "0xBE40", + "manufacturer": "_TZ3000_vw8pawxa", + "model": "TS130F", + "friendly_manufacturer": "_TZ3000_vw8pawxa", + "friendly_model": "TS130F", + "name": "_TZ3000_vw8pawxa TS130F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.906394+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_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_vw8pawxa" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + } + ] + }, + { + "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": "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", + "unsupported": true + }, + { + "id": "0x0003", + "name": "current_position_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_position_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "deceleration_time_lift", + "zcl_type": "uint16", + "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": "0x0018", + "name": "intermediate_setpoints_lift", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0019", + "name": "intermediate_setpoints_tilt", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x0005", + "name": "number_of_actuations_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0006", + "name": "number_of_actuations_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0001", + "name": "physical_closed_limit_lift", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "physical_closed_limit_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "velocity_lift", + "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 + } + ] + }, + { + "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": 72 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:c9:40:68-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:47:c9:40:68:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:47:c9:40:68", + "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:47:c9:40: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:47:c9:40:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:c9:40: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:47:c9:40: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:47:c9:40:68:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:c9:40:68", + "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:47:c9:40:68-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:47:c9:40:68:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:47:c9:40:68", + "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:47:c9:40: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:47:c9:40:68:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:c9:40:68", + "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/tz3000-wcgyhnp3-ts0222.json b/tests/data/devices/tz3000-wcgyhnp3-ts0222.json new file mode 100644 index 000000000..959b06af5 --- /dev/null +++ b/tests/data/devices/tz3000-wcgyhnp3-ts0222.json @@ -0,0 +1,610 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "nwk": "0x47F7", + "manufacturer": "_TZ3000_wcgyhnp3", + "model": "TS0222", + "friendly_manufacturer": "_TZ3000_wcgyhnp3", + "friendly_model": "TS0222", + "name": "_TZ3000_wcgyhnp3 TS0222", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.205153+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": "LIGHT_SENSOR", + "id": 262 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_wcgyhnp3" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0222" + } + ] + }, + { + "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": 23011 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "00:12:4b:00:24:c0:50:36" + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 36 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 32769 + } + ] + } + ], + "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": 69 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:f9:d0:9a:b8-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:d0:9a:b8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:d0:9a:b8-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:d0:9a:b8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 200 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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:f9:d0:9a:b8-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:f9:d0:9a:b8:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f9:d0:9a:b8-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:d0:9a:b8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f9:d0:9a:b8", + "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/tz3000-wkai4ga5-ts0044.json b/tests/data/devices/tz3000-wkai4ga5-ts0044.json new file mode 100644 index 000000000..cadb675e8 --- /dev/null +++ b/tests/data/devices/tz3000-wkai4ga5-ts0044.json @@ -0,0 +1,684 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:03:34:3e:f1", + "nwk": "0x884C", + "manufacturer": "_TZ3000_wkai4ga5", + "model": "TS0044", + "friendly_manufacturer": "_TZ3000_wkai4ga5", + "friendly_model": "TS0044", + "name": "_TZ3000_wkai4ga5 TS0044", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.032393+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_wkai4ga5" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0044" + } + ] + }, + { + "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": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "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": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "REMOTE_CONTROL", + "id": 6 + }, + "in_clusters": [ + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [] + }, + { + "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:03:34:3e:f1-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:34:3e:f1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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:34:3e:f1-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:34:3e:f1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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:03:34:3e:f1-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:03:34:3e:f1:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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:03:34:3e:f1-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:03:34:3e:f1:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "endpoint_id": 2, + "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:03:34:3e:f1-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:03:34:3e:f1:3:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "endpoint_id": 3, + "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:03:34:3e:f1-4-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": 4, + "cluster": { + "id": 1, + "name": "Power Configuration", + "type": "server" + }, + "id": "4:0x0001", + "unique_id": "ab:cd:ef:12:03:34:3e:f1:4:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "endpoint_id": 4, + "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:03:34:3e:f1-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:03:34:3e:f1:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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:03:34:3e:f1-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:03:34:3e:f1:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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:03:34:3e:f1-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:03:34:3e:f1:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:03:34:3e:f1-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:03:34:3e:f1:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "endpoint_id": 4, + "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:03:34:3e:f1-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:34:3e:f1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:03:34:3e:f1", + "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-wkr3jqmr-ts0004.json b/tests/data/devices/tz3000-wkr3jqmr-ts0004.json new file mode 100644 index 000000000..fa938e385 --- /dev/null +++ b/tests/data/devices/tz3000-wkr3jqmr-ts0004.json @@ -0,0 +1,1117 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cf:6d:17:08", + "nwk": "0x6CF1", + "manufacturer": "_TZ3000_wkr3jqmr", + "model": "TS0004", + "friendly_manufacturer": "_TZ3000_wkr3jqmr", + "friendly_model": "TS0004", + "name": "_TZ3000_wkr3jqmr TS0004", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000x.Switch_4G_GPP", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.507241+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": 82 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0009", + "name": "generic_device_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_wkr3jqmr" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0004" + }, + { + "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": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "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": "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": 0 + }, + { + "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": "0xe000", + "endpoint_attribute": "tuya_manufacturer_specific_57344", + "attributes": [] + }, + { + "cluster_id": "0xe001", + "endpoint_attribute": "tuya_external_switch_type", + "attributes": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "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": "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": [] + }, + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "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": "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": [] + }, + "4": { + "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": "0x8001", + "name": "backlight_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "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": "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": "TS0004", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "3": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "4": { + "profile_id": "0x0104", + "device_type": "0x0100", + "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:cf:6d:17:08-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:cf:6d:17:08:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:cf:6d:17:08:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:cf:6d:17:08:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:cf:6d:17:08:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:cf:6d:17:08:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cf:6d:17:08-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:cf:6d:17:08:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:cf:6d:17:08:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:6d:17:08:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:6d:17:08-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:6d:17:08:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-1-6-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:cf:6d:17:08:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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:cf:6d:17:08-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:6d:17:08:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cf:6d:17:08", + "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-xabckq1v-ts004f.json b/tests/data/devices/tz3000-xabckq1v-ts004f.json new file mode 100644 index 000000000..89acafb62 --- /dev/null +++ b/tests/data/devices/tz3000-xabckq1v-ts004f.json @@ -0,0 +1,604 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:df:1d:21:23", + "nwk": "0xF631", + "manufacturer": "_TZ3000_xabckq1v", + "model": "TS004F", + "friendly_manufacturer": "_TZ3000_xabckq1v", + "friendly_model": "TS004F", + "name": "_TZ3000_xabckq1v TS004F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.258028+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": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "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_xabckq1v" + }, + { + "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", + "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": 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": "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": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + }, + "4": { + "profile_id": 260, + "device_type": { + "name": "NON_COLOR_CONTROLLER", + "id": 2080 + }, + "in_clusters": [ + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:df:1d:21:23-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:df:1d:21:23:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "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:df:1d:21: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:df:1d:21:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21: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:df:1d:21: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:df:1d:21:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "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:df:1d:21:23-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:df:1d:21:23:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "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:df:1d:21:23-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:df:1d:21:23:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "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:df:1d:21:23-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:df:1d:21:23:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:df:1d:21:23-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:df:1d:21:23:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "endpoint_id": 4, + "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:df:1d:21: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:df:1d:21:23:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:1d:21:23", + "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-xkap8wtb-ts000f.json b/tests/data/devices/tz3000-xkap8wtb-ts000f.json new file mode 100644 index 000000000..629bc9fee --- /dev/null +++ b/tests/data/devices/tz3000-xkap8wtb-ts000f.json @@ -0,0 +1,962 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:07:f0:0f:c0", + "nwk": "0x9B37", + "manufacturer": "_TZ3000_xkap8wtb", + "model": "TS000F", + "friendly_manufacturer": "_TZ3000_xkap8wtb", + "friendly_model": "TS000F", + "name": "_TZ3000_xkap8wtb TS000F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000f_switch.Tuya_1G_Wall_Switch_Metering", + "exposes_features": [], + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.741896+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": 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": "_TZ3000_xkap8wtb" + }, + { + "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": "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": 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": 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": 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": 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": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0508", + "name": "rms_current", + "zcl_type": "uint16", + "value": 66 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "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 + } + ] + }, + { + "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": [] + } + ] + }, + "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": "TS000F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "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:07:f0:0f:c0-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:f0:0f:c0:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:f0:0f:c0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:f0:0f:c0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:f0:0f:c0-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:07:f0:0f:c0:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.066 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f0:0f:c0-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:07:f0:0f:c0:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 231.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:07:f0:0f:c0-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:f0:0f:c0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:07:f0:0f:c0", + "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-xr3htd96-ts0201.json b/tests/data/devices/tz3000-xr3htd96-ts0201.json new file mode 100644 index 000000000..7735dc0e3 --- /dev/null +++ b/tests/data/devices/tz3000-xr3htd96-ts0201.json @@ -0,0 +1,472 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:65:20:2c:b5", + "nwk": "0xB370", + "manufacturer": "_TZ3000_xr3htd96", + "model": "TS0201", + "friendly_manufacturer": "_TZ3000_xr3htd96", + "friendly_model": "TS0201", + "name": "_TZ3000_xr3htd96 TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.073969+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_xr3htd96" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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": 2121 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5547 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:65:20:2c:b5-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:65:20:2c:b5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "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:65:20:2c:b5-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:65:20:2c:b5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "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:65:20:2c:b5-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:65:20:2c:b5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "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:65:20:2c:b5-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:65:20:2c:b5:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "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:65:20:2c:b5-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:65:20:2c:b5:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 21.21 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:65:20:2c:b5-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:65:20:2c:b5:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 55.47 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:65:20:2c:b5-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:65:20:2c:b5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:65:20:2c:b5", + "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-xxacnuab-ts0004.json b/tests/data/devices/tz3000-xxacnuab-ts0004.json new file mode 100644 index 000000000..dd11dbade --- /dev/null +++ b/tests/data/devices/tz3000-xxacnuab-ts0004.json @@ -0,0 +1,983 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0b:b6:c8:60", + "nwk": "0x5605", + "manufacturer": "_TZ3000_xxacnuab", + "model": "TS0004", + "friendly_manufacturer": "_TZ3000_xxacnuab", + "friendly_model": "TS0004", + "name": "_TZ3000_xxacnuab TS0004", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts000x.Switch_4G_GPP", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.759067+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": 82 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_xxacnuab" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0004" + }, + { + "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": "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": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x8002", + "name": "power_on_state", + "zcl_type": "enum8", + "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": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "value": 1 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "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": "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": 0 + }, + { + "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": [] + }, + "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": "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": 0 + }, + { + "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": [] + }, + "4": { + "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": "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": 0 + }, + { + "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": "TS0004", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0xe000", + "0xe001" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "2": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "3": { + "profile_id": "0x0104", + "device_type": "0x0100", + "input_clusters": [ + "0x0004", + "0x0005", + "0x0006", + "0xe001" + ], + "output_clusters": [] + }, + "4": { + "profile_id": "0x0104", + "device_type": "0x0100", + "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:0b:b6:c8: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:0b:b6:c8:60:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8: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:0b:b6:c8: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": 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:b6:c8:60:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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:0b:b6:c8:60-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:0b:b6:c8:60:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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:0b:b6:c8:60-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:0b:b6:c8:60:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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:0b:b6:c8:60-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:0b:b6:c8:60:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:b6:c8:60-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:0b:b6:c8:60:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaPowerOnState", + "options": [ + "Off", + "On", + "LastState" + ] + }, + "state": { + "class_name": "TuyaPowerOnStateSelectEntity", + "available": true, + "state": "Off" + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0b:b6:c8: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:0b:b6:c8:60:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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:0b:b6:c8: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:0b:b6:c8:60:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8:60", + "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:0b:b6:c8: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:0b:b6:c8:60:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0b:b6:c8: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/tz3000-ynmowqk2-ts011f.json b/tests/data/devices/tz3000-ynmowqk2-ts011f.json new file mode 100644 index 000000000..d7ff950c1 --- /dev/null +++ b/tests/data/devices/tz3000-ynmowqk2-ts011f.json @@ -0,0 +1,817 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:91:a9:a4:a5", + "nwk": "0x5040", + "manufacturer": "_TZ3000_ynmowqk2", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_ynmowqk2", + "friendly_model": "TS011F", + "name": "_TZ3000_ynmowqk2 TS011F", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.598840+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": 69 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_ynmowqk2" + }, + { + "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": 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": 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": "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": 235 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4: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:91:a9:a4:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4: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:91:a9:a4:a5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4:a5-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:91:a9:a4:a5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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:91:a9:a4: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:91:a9:a4:a5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:91:a9:a4:a5", + "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-ty0201.json b/tests/data/devices/tz3000-zl1kmjqx-ty0201.json new file mode 100644 index 000000000..c70f7db0e --- /dev/null +++ b/tests/data/devices/tz3000-zl1kmjqx-ty0201.json @@ -0,0 +1,427 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d2:4c:8b:b1", + "nwk": "0x71DE", + "manufacturer": "_TZ3000_zl1kmjqx", + "model": "TY0201", + "friendly_manufacturer": "_TZ3000_zl1kmjqx", + "friendly_model": "TY0201", + "name": "_TZ3000_zl1kmjqx TY0201", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.640892+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": "TY0201" + } + ] + }, + { + "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 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 32 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 1743 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:4c:8b: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:d2:4c:8b:b1:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b:b1", + "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:4c:8b: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:d2:4c:8b:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b: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:d2:4c:8b: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:d2:4c:8b:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b: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:d2:4c:8b: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:d2:4c:8b:b1:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b:b1", + "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, + "battery_voltage": 3.2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:4c:8b: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": 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:d2:4c:8b:b1:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b:b1", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 17.43 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:4c:8b: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:d2:4c:8b:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:4c:8b:b1", + "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-zv6x8bt2-ts011f.json b/tests/data/devices/tz3000-zv6x8bt2-ts011f.json new file mode 100644 index 000000000..da8962089 --- /dev/null +++ b/tests/data/devices/tz3000-zv6x8bt2-ts011f.json @@ -0,0 +1,1141 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:85:03:69:d5", + "nwk": "0xB25B", + "manufacturer": "_TZ3000_zv6x8bt2", + "model": "TS011F", + "friendly_manufacturer": "_TZ3000_zv6x8bt2", + "friendly_model": "TS011F", + "name": "_TZ3000_zv6x8bt2 TS011F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_CB_Metering", + "exposes_features": [ + "tuya.plug_on_off_attributes" + ], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 51, + "rssi": null, + "last_seen": "2025-11-30T14:25:14.849812+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 69 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3000_zv6x8bt2" + }, + { + "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": "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": 167 + }, + { + "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": 1415 + }, + { + "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": 6076 + }, + { + "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": 242 + }, + { + "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": [ + { + "id": "0xd030", + "name": "external_switch_type", + "zcl_type": "enum8", + "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", + "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": { + "model": "TS011F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x010a", + "input_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0402", + "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:85:03:69: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:85:03:69:d5:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:85:03:69:d5-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:85:03:69:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:85:03:69:d5-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:85:03:69:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:85:03:69: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:85:03:69:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 51 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:03:69: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:85:03:69:d5:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:03:69:d5-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:85:03:69:d5:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "PolledSmartEnergySummation", + "available": true, + "state": 1.67, + "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:85:03:69:d5-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:85:03:69:d5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 1415.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:03:69:d5-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:85:03:69:d5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 6.076 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:03:69:d5-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:85:03:69:d5:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 242.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:03:69:d5-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:85:03:69:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:85:03:69:d5-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:85:03:69:d5:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69:d5", + "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:85:03:69: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:85:03:69:d5:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:03:69: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/tz3210-3ulg9kpo-ts0021.json b/tests/data/devices/tz3210-3ulg9kpo-ts0021.json new file mode 100644 index 000000000..4793bbc11 --- /dev/null +++ b/tests/data/devices/tz3210-3ulg9kpo-ts0021.json @@ -0,0 +1,406 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:97:dd:c8:ba", + "nwk": "0x81A8", + "manufacturer": "_TZ3210_3ulg9kpo", + "model": "TS0021", + "friendly_manufacturer": "_TZ3210_3ulg9kpo", + "friendly_model": "TS0021", + "name": "_TZ3210_3ulg9kpo TS0021", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0021.TS0021", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.868769+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_3ulg9kpo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0021" + } + ] + }, + { + "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", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "bc:02:6e:ff:fe:56:58:de" + }, + { + "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": 21 + } + ] + }, + { + "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": { + "models_info": [ + [ + "_TZ3210_3ulg9kpo", + "TS0021" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0402", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0500", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:97:dd:c8:ba-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:97:dd:c8:ba:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:dd:c8:ba", + "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:97:dd:c8: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:97:dd:c8:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:dd:c8:ba", + "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:97:dd:c8: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:97:dd:c8:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:dd:c8:ba", + "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:97:dd:c8:ba-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:97:dd:c8:ba:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:97:dd:c8:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 0.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:97:dd:c8:ba-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:97:dd:c8:ba:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:97:dd:c8:ba", + "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-5rta89nj-ts0601.json b/tests/data/devices/tz3210-5rta89nj-ts0601.json new file mode 100644 index 000000000..03922ff5b --- /dev/null +++ b/tests/data/devices/tz3210-5rta89nj-ts0601.json @@ -0,0 +1,475 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:be:aa:be:f4", + "nwk": "0xB907", + "manufacturer": "_TZ3210_5rta89nj", + "model": "TS0601", + "friendly_manufacturer": "_TZ3210_5rta89nj", + "friendly_model": "TS0601", + "name": "_TZ3210_5rta89nj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.134538+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": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "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": "_TZ3210_5rta89nj" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 3 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "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": 0 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 85, + 126, + 139, + 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": 40 + } + ] + }, + { + "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:be:aa:be:f4-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:be:aa:be:f4:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be: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:aa:be: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:aa:be:f4:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be: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:aa:be: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:aa:be:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be: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:be:aa:be: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:aa:be:f4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be:f4", + "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:be:aa:be: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:aa:be:f4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be: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": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:be:aa:be: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:be:aa:be:f4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:be:aa:be: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/tz3210-dwytrmda-ts130f.json b/tests/data/devices/tz3210-dwytrmda-ts130f.json new file mode 100644 index 000000000..400bf302f --- /dev/null +++ b/tests/data/devices/tz3210-dwytrmda-ts130f.json @@ -0,0 +1,504 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:98:ad:85:85", + "nwk": "0x67E9", + "manufacturer": "_TZ3210_dwytrmda", + "model": "TS130F", + "friendly_manufacturer": "_TZ3210_dwytrmda", + "friendly_model": "TS130F", + "name": "_TZ3210_dwytrmda TS130F", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts130f.TuyaTS130FTOGP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.236557+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_dwytrmda" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS130F" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "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": 172 + }, + { + "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": 0 + }, + { + "id": "0x0004", + "name": "current_position_tilt", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0016", + "name": "deceleration_time_lift", + "zcl_type": "uint16", + "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": "0x0019", + "name": "intermediate_setpoints_tilt", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x8000", + "name": "motor_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xf002", + "name": "motor_reversal", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0xf000", + "name": "tuya_moving_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0014", + "name": "velocity_lift", + "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 + } + ] + } + ], + "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 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "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": { + "model": "TS130F", + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0202", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x0102" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + }, + "242": { + "profile_id": "0xa1e0", + "device_type": "0x0061", + "input_clusters": [], + "output_clusters": [ + "0x0021" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:ad:85:85-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": 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:98:ad:85:85:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:98:ad:85:85", + "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:98:ad:85:85-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:ad:85:85:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:ad:85:85", + "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:98:ad:85:85-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:ad:85:85:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:ad:85:85", + "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:98:ad:85:85-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:ad:85:85:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:ad:85:85", + "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/tz3210-hxtfthp5-ts0505b.json b/tests/data/devices/tz3210-hxtfthp5-ts0505b.json new file mode 100644 index 000000000..45f6f9de3 --- /dev/null +++ b/tests/data/devices/tz3210-hxtfthp5-ts0505b.json @@ -0,0 +1,611 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:99:d6:8f:73", + "nwk": "0xC918", + "manufacturer": "_TZ3210_hxtfthp5", + "model": "TS0505B", + "friendly_manufacturer": "_TZ3210_hxtfthp5", + "friendly_model": "TS0505B", + "name": "_TZ3210_hxtfthp5 TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.731642+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": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_hxtfthp5" + }, + { + "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", + "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": 25 + }, + { + "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": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 0 + }, + { + "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", + "value": 498 + } + ] + }, + { + "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": [] + } + ] + }, + "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:99:d6:8f:73-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:99:d6:8f:73:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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:99:d6:8f:73-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:99:d6:8f:73: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:99:d6:8f:73: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:99:d6:8f:73:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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, + 0.0 + ], + "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:99:d6:8f:73-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:99:d6:8f:73:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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": 498 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:99:d6:8f:73-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:99:d6:8f:73:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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:99:d6:8f:73-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:99:d6:8f:73:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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:99:d6:8f:73-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:99:d6:8f:73:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:99:d6:8f:73", + "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-ncw88jfq-ts0201.json b/tests/data/devices/tz3210-ncw88jfq-ts0201.json new file mode 100644 index 000000000..3bc605adf --- /dev/null +++ b/tests/data/devices/tz3210-ncw88jfq-ts0201.json @@ -0,0 +1,426 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:94:03:d8:01", + "nwk": "0xCAF3", + "manufacturer": "_TZ3210_ncw88jfq", + "model": "TS0201", + "friendly_manufacturer": "_TZ3210_ncw88jfq", + "friendly_model": "TS0201", + "name": "_TZ3210_ncw88jfq TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.780395+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": "_TZ3210_ncw88jfq" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2140 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 3710 + } + ] + }, + { + "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": 131 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:03:d8: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:94:03:d8:01:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8: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:94:03:d8: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:94:03:d8:01:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8: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:94:03:d8: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:94:03:d8:01:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8:01", + "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:94:03:d8:01-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:94:03:d8:01:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 21.4 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:03:d8:01-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:94:03:d8:01:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 37.1 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:94:03:d8: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:94:03:d8:01:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:94:03:d8:01", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000083", + "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-qkj7rujp-ts0201.json b/tests/data/devices/tz3210-qkj7rujp-ts0201.json new file mode 100644 index 000000000..3f8b52600 --- /dev/null +++ b/tests/data/devices/tz3210-qkj7rujp-ts0201.json @@ -0,0 +1,436 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cc:9b:48:fa", + "nwk": "0x3A33", + "manufacturer": "_TZ3210_qkj7rujp", + "model": "TS0201", + "friendly_manufacturer": "_TZ3210_qkj7rujp", + "friendly_model": "TS0201", + "name": "_TZ3210_qkj7rujp TS0201", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:58.282672+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_qkj7rujp" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0201" + } + ] + }, + { + "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": 0 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 0 + } + ] + }, + { + "cluster_id": "0xe002", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "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": 67 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "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:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "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:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.0, + "battery_voltage": 0.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "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:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 0.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:9b:48:fa-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:cc:9b:48:fa:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:9b:48:fa", + "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/tz3210-sixywxvy-ts0505b.json b/tests/data/devices/tz3210-sixywxvy-ts0505b.json new file mode 100644 index 000000000..8345eea7c --- /dev/null +++ b/tests/data/devices/tz3210-sixywxvy-ts0505b.json @@ -0,0 +1,586 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4e:e8:08:9c", + "nwk": "0x7703", + "manufacturer": "_TZ3210_sixywxvy", + "model": "TS0505B", + "friendly_manufacturer": "_TZ3210_sixywxvy", + "friendly_model": "TS0505B", + "name": "_TZ3210_sixywxvy TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.948553+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 101 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_sixywxvy" + }, + { + "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", + "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": 25 + }, + { + "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": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 254 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 22740 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 8978 + }, + { + "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": [] + } + ] + }, + "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:4e:e8:08: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:4e:e8:08:9c:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:e8:08:9c", + "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:4e:e8:08:9c-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:4e:e8:08:9c: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:4e:e8:08:9c: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:4e:e8:08:9c:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:4e:e8:08:9c", + "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.3469901579308766, + 0.1369954985885405 + ], + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4e:e8:08: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:4e:e8:08:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:e8:08:9c", + "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:e8:08: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:4e:e8:08:9c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:e8:08:9c", + "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:e8:08: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:4e:e8:08:9c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4e:e8:08: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/tz3210-ue9kyjnj-ts0502b.json b/tests/data/devices/tz3210-ue9kyjnj-ts0502b.json new file mode 100644 index 000000000..dd08d9373 --- /dev/null +++ b/tests/data/devices/tz3210-ue9kyjnj-ts0502b.json @@ -0,0 +1,596 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1e:71:5f:57", + "nwk": "0x8A21", + "manufacturer": "_TZ3210_ue9kyjnj", + "model": "TS0502B", + "friendly_manufacturer": "_TZ3210_ue9kyjnj", + "friendly_model": "TS0502B", + "name": "_TZ3210_ue9kyjnj TS0502B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": 124, + "rssi": -80, + "last_seen": "2025-11-04T12:12:32.577769+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": "COLOR_TEMPERATURE_LIGHT", + "id": 268 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_ue9kyjnj" + }, + { + "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": 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": 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": 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", + "value": 54196 + } + ] + }, + { + "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": 89 + } + ] + } + ] + }, + "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:1e:71:5f: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:1e:71:5f:57:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "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:1e:71:5f:57-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:1e:71:5f:57: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:1e:71:5f:57: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:1e:71:5f:57:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "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": 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" + ] + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:71:5f:57-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:1e:71:5f:57:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "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": 54196 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:71:5f: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:1e:71:5f:57:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "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:1e:71:5f: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:1e:71:5f:57:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -80 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1e:71:5f: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:1e:71:5f:57:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1e:71:5f:57", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x00000059", + "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-umi6vbsz-ts0505b.json b/tests/data/devices/tz3210-umi6vbsz-ts0505b.json new file mode 100644 index 000000000..deacfbd9d --- /dev/null +++ b/tests/data/devices/tz3210-umi6vbsz-ts0505b.json @@ -0,0 +1,618 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bf:34:ff:9a", + "nwk": "0xA08A", + "manufacturer": "_TZ3210_umi6vbsz", + "model": "TS0505B", + "friendly_manufacturer": "_TZ3210_umi6vbsz", + "friendly_model": "TS0505B", + "name": "_TZ3210_umi6vbsz TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:26:31.795503+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": "EXTENDED_COLOR_LIGHT", + "id": 269 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_umi6vbsz" + }, + { + "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", + "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", + "value": 25 + }, + { + "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": 469 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 16 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 241 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 0 + }, + { + "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", + "value": 450 + } + ] + }, + { + "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:bf:34:ff:9a-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:bf:34:ff:9a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff:9a", + "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:bf:34:ff:9a-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:bf:34:ff:9a: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:bf:34:ff:9a: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:bf:34:ff:9a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff:9a", + "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": 1, + "xy_color": [ + 0.0, + 0.0 + ], + "color_temp": 469, + "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:bf:34:ff:9a-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:bf:34:ff:9a:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff:9a", + "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": 450 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bf:34:ff: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:bf:34:ff:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff: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:bf:34:ff: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:bf:34:ff:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff:9a", + "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:bf:34:ff: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:bf:34:ff:9a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:34:ff:9a", + "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-up3pngle-ts0205.json b/tests/data/devices/tz3210-up3pngle-ts0205.json new file mode 100644 index 000000000..3a31ef282 --- /dev/null +++ b/tests/data/devices/tz3210-up3pngle-ts0205.json @@ -0,0 +1,453 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6a:a7:51:ae", + "nwk": "0x6A7E", + "manufacturer": "_TZ3210_up3pngle", + "model": "TS0205", + "friendly_manufacturer": "_TZ3210_up3pngle", + "friendly_model": "TS0205", + "name": "_TZ3210_up3pngle TS0205", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.787266+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": "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": [ + 161, + 89, + 7, + 255, + 255, + 46, + 33, + 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": 40 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "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": [] + }, + { + "cluster_id": "0x1000", + "endpoint_attribute": "lightlink", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6a:a7:51:ae-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:6a:a7:51:ae:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "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:6a:a7:51:ae-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:6a:a7:51:ae:1:0x0006", + "status": "CONFIGURED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "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:6a:a7:51:ae-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:a7:51:ae:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "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:a7:51:ae-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:a7:51:ae:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "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:a7:51:ae-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:a7:51:ae:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.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:6a:a7:51:ae-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:a7:51:ae:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6a:a7:51:ae", + "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-wuhzzfqg-ts0202.json b/tests/data/devices/tz3210-wuhzzfqg-ts0202.json new file mode 100644 index 000000000..6010fd3b3 --- /dev/null +++ b/tests/data/devices/tz3210-wuhzzfqg-ts0202.json @@ -0,0 +1,737 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6c:70:e7:59", + "nwk": "0x3BE1", + "manufacturer": "_TZ3210_wuhzzfqg", + "model": "TS0202", + "friendly_manufacturer": "_TZ3210_wuhzzfqg", + "friendly_model": "TS0202", + "name": "_TZ3210_wuhzzfqg TS0202", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.685965+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": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZ3210_wuhzzfqg" + }, + { + "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": 28 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "e0:79:8d:ff:fe:d3:6a:4c" + }, + { + "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": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 161 + } + ] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "TEMPERATURE_SENSOR", + "id": 770 + }, + "in_clusters": [ + { + "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": 28 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2217 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5508 + } + ] + } + ], + "out_clusters": [] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "LIGHT_SENSOR", + "id": 262 + }, + "in_clusters": [ + { + "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": 28 + } + ] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 9849 + } + ] + } + ], + "out_clusters": [] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:70:e7:59-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:6c:70:e7:59:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "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:6c:70:e7: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:6c:70:e7:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7: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:6c:70:e7: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:6c:70:e7:59:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "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:6c:70:e7:59-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:6c:70:e7:59:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "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.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:70:e7:59-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:6c:70:e7:59:2:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.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:6c:70:e7:59-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:6c:70:e7:59:2:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.17 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:70:e7:59-2-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": 2, + "cluster": { + "id": 1029, + "name": "Relative Humidity Measurement", + "type": "server" + }, + "id": "2:0x0405", + "unique_id": "ab:cd:ef:12:6c:70:e7:59:2:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 2, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 55.08 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:70:e7:59-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:6c:70:e7:59:3:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 3, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 100.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:6c:70:e7:59-3-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": 3, + "cluster": { + "id": 1024, + "name": "Illuminance Measurement", + "type": "server" + }, + "id": "3:0x0400", + "unique_id": "ab:cd:ef:12:6c:70:e7:59:3:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 3, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 10 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:70:e7: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:6c:70:e7:59:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:70:e7:59", + "endpoint_id": 1, + "available": true, + "group_id": null, + "supported_features": 7 + }, + "state": { + "class_name": "FirmwareUpdateEntity", + "available": true, + "installed_version": "0x000000a1", + "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-awarhusb-ts0225.json b/tests/data/devices/tz3218-awarhusb-ts0225.json new file mode 100644 index 000000000..8025f1da5 --- /dev/null +++ b/tests/data/devices/tz3218-awarhusb-ts0225.json @@ -0,0 +1,384 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:73:0b:43", + "nwk": "0xBD5B", + "manufacturer": "_TZ3218_awarhusb", + "model": "TS0225", + "friendly_manufacturer": "_TZ3218_awarhusb", + "friendly_model": "TS0225", + "name": "_TZ3218_awarhusb TS0225", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:40.021974+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_awarhusb" + }, + { + "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": [ + 52, + 66, + 7, + 255, + 255, + 46, + 33, + 0 + ] + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:73:0b:43-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:b1:73:0b:43:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:73:0b:43", + "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:b1:73:0b: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:b1:73:0b:43:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:73:0b:43", + "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:73:0b: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:b1:73:0b:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:73:0b: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:b1:73:0b: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:b1:73:0b:43:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:73:0b:43", + "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:73:0b:43-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:73:0b:43:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:73:0b:43", + "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/tzb210-417ikxay-ts0505b.json b/tests/data/devices/tzb210-417ikxay-ts0505b.json new file mode 100644 index 000000000..83b3fac1c --- /dev/null +++ b/tests/data/devices/tzb210-417ikxay-ts0505b.json @@ -0,0 +1,618 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:81:e7:c4:28", + "nwk": "0x9A2E", + "manufacturer": "_TZB210_417ikxay", + "model": "TS0505B", + "friendly_manufacturer": "_TZB210_417ikxay", + "friendly_model": "TS0505B", + "name": "_TZB210_417ikxay TS0505B", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.211174+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": "_TZB210_417ikxay" + }, + { + "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", + "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": 27 + }, + { + "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": 153 + }, + { + "id": "0x0000", + "name": "current_hue", + "zcl_type": "uint8", + "value": 197 + }, + { + "id": "0x0001", + "name": "current_saturation", + "zcl_type": "uint8", + "value": 104 + }, + { + "id": "0x0003", + "name": "current_x", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "current_y", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x4000", + "name": "enhanced_current_hue", + "zcl_type": "uint16", + "value": 50451 + }, + { + "id": "0x000f", + "name": "options", + "zcl_type": "map8", + "value": 0 + }, + { + "id": "0x4010", + "name": "start_up_color_temperature", + "zcl_type": "uint16", + "value": 153 + } + ] + }, + { + "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": 64 + } + ] + } + ] + }, + "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:81:e7:c4:28-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:e7:c4:28:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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:81:e7:c4:28-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:81:e7:c4:28: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:81:e7:c4:28: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:81:e7:c4:28:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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, + 0.0 + ], + "color_temp": 153, + "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:81:e7:c4:28-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:81:e7:c4:28:1:0x0300", + "status": "INITIALIZED", + "value_attribute": "current_x" + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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": 153 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:81:e7:c4:28-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:e7:c4:28:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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:e7:c4:28-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:e7:c4:28:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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:81:e7:c4:28-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:e7:c4:28:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:81:e7:c4:28", + "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/tze200-1n2zev06-ts0601.json b/tests/data/devices/tze200-1n2zev06-ts0601.json new file mode 100644 index 000000000..ee071c98a --- /dev/null +++ b/tests/data/devices/tze200-1n2zev06-ts0601.json @@ -0,0 +1,594 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bf:76:9d:e2", + "nwk": "0x6370", + "manufacturer": "_TZE200_1n2zev06", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_1n2zev06", + "friendly_model": "TS0601", + "name": "_TZE200_1n2zev06 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.965739+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_1n2zev06" + }, + { + "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": 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": "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 7 + } + ] + }, + { + "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": { + "select": [ + { + "info_object": { + "fallback_name": "Weather delay", + "unique_id": "ab:cd:ef:12:bf:76:9d:e2-1-weather_delay", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "weather_delay", + "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": "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:76:9d:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaValveWeatherDelay", + "options": [ + "Disabled", + "Delayed 24h", + "Delayed 48h", + "Delayed 72h" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bf:76:9d: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:bf:76:9d:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d: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:bf:76:9d: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:bf:76:9d:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d: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:bf:76:9d:e2-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": "TuyaValveWaterConsumedNoInstDemand", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:bf:76:9d:e2:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "L" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": null, + "device_type": "Water Metering", + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": "Last valve open duration", + "unique_id": "ab:cd:ef:12:bf:76:9d:e2-1-last_valve_open_duration", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "last_valve_open_duration", + "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:76:9d:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "min" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Time left", + "unique_id": "ab:cd:ef:12:bf:76:9d:e2-1-time_left", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "time_left", + "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:bf:76:9d:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "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": "Timer state", + "unique_id": "ab:cd:ef:12:bf:76:9d:e2-1-timer_state", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "timer_state", + "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:bf:76:9d:e2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d: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": null, + "unique_id": "ab:cd:ef:12:bf:76:9d:e2-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:bf:76:9d:e2:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "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:bf:76:9d:e2-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:76:9d:e2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bf:76:9d:e2", + "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-2ekuz3dz-ts0601.json b/tests/data/devices/tze200-2ekuz3dz-ts0601.json new file mode 100644 index 000000000..56cf5e701 --- /dev/null +++ b/tests/data/devices/tze200-2ekuz3dz-ts0601.json @@ -0,0 +1,252 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b0:68:9a:0a", + "nwk": "0x954E", + "manufacturer": "_TZE200_2ekuz3dz", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_2ekuz3dz", + "friendly_model": "TS0601", + "name": "_TZE200_2ekuz3dz TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.910516+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": "_TZE200_2ekuz3dz" + }, + { + "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": [] + } + ] + }, + "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:b0:68:9a: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:b0:68:9a:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b0:68:9a: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:b0:68:9a: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:b0:68:9a:0a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b0:68:9a: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:b0:68:9a: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:b0:68:9a:0a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b0:68:9a:0a", + "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-2gtsuokt-ts0601.json b/tests/data/devices/tze200-2gtsuokt-ts0601.json new file mode 100644 index 000000000..8b956d877 --- /dev/null +++ b/tests/data/devices/tze200-2gtsuokt-ts0601.json @@ -0,0 +1,336 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7c:f3:f3:1d", + "nwk": "0x5269", + "manufacturer": "_TZE200_2gtsuokt", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_2gtsuokt", + "friendly_model": "TS0601", + "name": "_TZE200_2gtsuokt TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.055225+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": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_2gtsuokt" + }, + { + "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": "0x0002", + "name": "stack_version", + "zcl_type": "uint8", + "value": 0 + }, + { + "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 + } + ] + }, + { + "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": "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:7c:f3:f3:1d-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:f3:f3:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:f3:f3:1d", + "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:f3:f3:1d-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:f3:f3:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:f3:f3:1d", + "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:7c:f3:f3:1d-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:7c:f3:f3:1d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:f3:f3:1d", + "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-2se8efxh-ts0601.json b/tests/data/devices/tze200-2se8efxh-ts0601.json new file mode 100644 index 000000000..4f222e75e --- /dev/null +++ b/tests/data/devices/tze200-2se8efxh-ts0601.json @@ -0,0 +1,424 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b1:bb:ba:02", + "nwk": "0x3C40", + "manufacturer": "_TZE200_2se8efxh", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_2se8efxh", + "friendly_model": "TS0601", + "name": "_TZE200_2se8efxh TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.035292+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_2se8efxh" + }, + { + "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": "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b1:bb:ba:02-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:bb:ba:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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:bb:ba:02-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:bb:ba:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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:bb:ba:02-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:b1:bb:ba:02:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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:b1:bb:ba:02-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:b1:bb:ba:02:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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:b1:bb:ba:02-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:b1:bb:ba:02:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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:b1:bb:ba:02-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:bb:ba:02:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b1:bb:ba:02", + "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-3t91nb6k-ts0601.json b/tests/data/devices/tze200-3t91nb6k-ts0601.json new file mode 100644 index 000000000..b5572eb19 --- /dev/null +++ b/tests/data/devices/tze200-3t91nb6k-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ee:04:18:fc", + "nwk": "0xC46E", + "manufacturer": "_TZE200_3t91nb6k", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_3t91nb6k", + "friendly_model": "TS0601", + "name": "_TZE200_3t91nb6k TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.539552+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_3t91nb6k" + }, + { + "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:ee:04:18: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:ee:04:18:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:04:18:fc", + "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:ee:04:18: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:ee:04:18:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:04:18:fc", + "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:ee:04:18: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:ee:04:18:fc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ee:04:18:fc", + "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-4utwozi2-ts0601.json b/tests/data/devices/tze200-4utwozi2-ts0601.json new file mode 100644 index 000000000..c20b44973 --- /dev/null +++ b/tests/data/devices/tze200-4utwozi2-ts0601.json @@ -0,0 +1,668 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ed:f9:81:44", + "nwk": "0xF615", + "manufacturer": "_TZE200_4utwozi2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_4utwozi2", + "friendly_model": "TS0601", + "name": "_TZE200_4utwozi2 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 220, + "rssi": -45, + "last_seen": "2025-11-14T21:33:17.794966+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_4utwozi2" + }, + { + "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:ed:f9:81:44-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:ed:f9:81:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81: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:ed:f9:81:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81: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:ed:f9:81:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81:44-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:ed:f9:81:44:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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:ed:f9:81: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:ed:f9:81:44:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ed:f9:81:44", + "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-4wxtg5y9-ts0601.json b/tests/data/devices/tze200-4wxtg5y9-ts0601.json new file mode 100644 index 000000000..245f1da8d --- /dev/null +++ b/tests/data/devices/tze200-4wxtg5y9-ts0601.json @@ -0,0 +1,294 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8b:f7:e2:fc", + "nwk": "0x25E6", + "manufacturer": "_TZE200_4wxtg5y9", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_4wxtg5y9", + "friendly_model": "TS0601", + "name": "_TZE200_4wxtg5y9 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.832638+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": 70 + }, + { + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_4wxtg5y9" + }, + { + "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": [] + } + ] + }, + "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:f7:e2: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:8b:f7:e2:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:f7:e2:fc", + "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:8b:f7:e2: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:8b:f7:e2:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:f7:e2:fc", + "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:f7:e2: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:8b:f7:e2:fc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:f7:e2:fc", + "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-68nvbio9-ts0601.json b/tests/data/devices/tze200-68nvbio9-ts0601.json new file mode 100644 index 000000000..e559fac3f --- /dev/null +++ b/tests/data/devices/tze200-68nvbio9-ts0601.json @@ -0,0 +1,449 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2e:21:db:80", + "nwk": "0xAE0B", + "manufacturer": "_TZE200_68nvbio9", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_68nvbio9", + "friendly_model": "TS0601", + "name": "_TZE200_68nvbio9 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.217643+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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": 72 + }, + { + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_68nvbio9" + }, + { + "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": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "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", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:21:db:80-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": 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:2e:21:db:80:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:2e:21:db:80", + "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:2e:21:db:80-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:2e:21:db:80:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:21:db:80", + "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:2e:21:db:80-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:2e:21:db:80:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:21:db:80", + "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:2e:21:db:80-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:2e:21:db:80:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:21:db:80", + "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-6rdj8dzm-ts0601.json b/tests/data/devices/tze200-6rdj8dzm-ts0601.json new file mode 100644 index 000000000..c8f548c53 --- /dev/null +++ b/tests/data/devices/tze200-6rdj8dzm-ts0601.json @@ -0,0 +1,661 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:00:a8:b8:ca", + "nwk": "0xE5AF", + "manufacturer": "_TZE200_6rdj8dzm", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_6rdj8dzm", + "friendly_model": "TS0601", + "name": "_TZE200_6rdj8dzm TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.475149+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_6rdj8dzm" + }, + { + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:00:a8:b8:ca-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:00:a8:b8:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8:ca-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:00:a8:b8:ca:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8:ca-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:00:a8:b8:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8: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:00:a8:b8:ca:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8: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:00:a8:b8: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:00:a8:b8:ca:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8: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:00:a8:b8:ca-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:00:a8:b8:ca:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8:ca-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:00:a8:b8:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8:ca-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:00:a8:b8:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8:ca-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:00:a8:b8:ca:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8:ca", + "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:00:a8:b8: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:00:a8:b8:ca:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:00:a8:b8: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-7bztmfm1-ts0601.json b/tests/data/devices/tze200-7bztmfm1-ts0601.json new file mode 100644 index 000000000..4f7c23358 --- /dev/null +++ b/tests/data/devices/tze200-7bztmfm1-ts0601.json @@ -0,0 +1,560 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c2:d5:da:b7", + "nwk": "0x1FFA", + "manufacturer": "_TZE200_7bztmfm1", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_7bztmfm1", + "friendly_model": "TS0601", + "name": "_TZE200_7bztmfm1 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.994052+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_7bztmfm1" + }, + { + "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": 70 + } + ] + } + ] + }, + "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:c2:d5:da: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:c2:d5:da:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da: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:c2:d5:da:b7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da: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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da:b7-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:c2:d5:da:b7:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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:c2:d5:da: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:c2:d5:da:b7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c2:d5:da:b7", + "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-7ytb3h8u-ts0601.json b/tests/data/devices/tze200-7ytb3h8u-ts0601.json new file mode 100644 index 000000000..bc866c6ed --- /dev/null +++ b/tests/data/devices/tze200-7ytb3h8u-ts0601.json @@ -0,0 +1,891 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a1:d9:6c:74", + "nwk": "0xBAE5", + "manufacturer": "_TZE200_7ytb3h8u", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_7ytb3h8u", + "friendly_model": "TS0601", + "name": "_TZE200_7ytb3h8u TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.716090+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": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_7ytb3h8u" + }, + { + "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": 400 + }, + { + "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": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 7 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef67", + "name": "irrigation_cycles", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0xef72", + "name": "irrigation_duration", + "zcl_type": "uint32", + "value": "00:00:00,0" + }, + { + "id": "0xef66", + "name": "irrigation_end_time", + "zcl_type": "string", + "value": "05:36:38" + }, + { + "id": "0xef69", + "name": "irrigation_interval", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0xef01", + "name": "irrigation_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef65", + "name": "irrigation_start_time", + "zcl_type": "string", + "value": "05:36:38" + }, + { + "id": "0xef68", + "name": "irrigation_target", + "zcl_type": "uint32", + "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": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "value": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Irrigation cycles", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_cycles", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_cycles", + "translation_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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "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": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Irrigation interval", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_interval", + "translation_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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 43200, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Irrigation target", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_target", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_target", + "translation_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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 43200, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Irrigation mode", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "irrigation_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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "GiexIrrigationMode", + "options": [ + "Duration", + "Capacity" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Duration" + } + }, + { + "info_object": { + "fallback_name": "Weather delay", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-weather_delay", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "weather_delay", + "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": "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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "GiexIrrigationWeatherDelay", + "options": [ + "NoDelay", + "TwentyFourHourDelay", + "FortyEightHourDelay", + "SeventyTwoHourDelay" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a1:d9:6c: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:a1:d9:6c:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c: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:a1:d9:6c: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:a1:d9:6c:74:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "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:a1:d9:6c:74-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:a1:d9:6c:74:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 200.0, + "battery_size": "AA", + "battery_quantity": 4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-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": "TuyaValveWaterConsumedNoInstDemand", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "L" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Water Metering", + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": "Irrigation duration", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_duration", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_duration", + "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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "s" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "00:00:00,0" + } + }, + { + "info_object": { + "fallback_name": "Irrigation end time", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_end_time", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_end_time", + "translation_placeholders": null, + "device_class": "timestamp", + "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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "05:36:38" + } + }, + { + "info_object": { + "fallback_name": "Irrigation start time", + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-1-irrigation_start_time", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_start_time", + "translation_placeholders": null, + "device_class": "timestamp", + "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:a1:d9:6c:74:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "05:36:38" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a1:d9:6c:74-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:a1:d9:6c:74:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "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:a1:d9:6c: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:a1:d9:6c:74:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a1:d9:6c:74", + "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-81isopgh-ts0601.json b/tests/data/devices/tze200-81isopgh-ts0601.json new file mode 100644 index 000000000..2ee0045fe --- /dev/null +++ b/tests/data/devices/tze200-81isopgh-ts0601.json @@ -0,0 +1,731 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:df:e1:f9:56", + "nwk": "0xBE36", + "manufacturer": "_TZE200_81isopgh", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_81isopgh", + "friendly_model": "TS0601", + "name": "_TZE200_81isopgh TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.912660+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": 72 + }, + { + "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": "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": "_TZE200_81isopgh" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "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": "0x0052", + "name": "battery_2_a_hr_rating", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0041", + "name": "battery_2_percentage_remaining", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": "0x0006", + "endpoint_attribute": "on_off", + "attributes": [ + { + "id": "0x0000", + "name": "on_off", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0x4001", + "name": "on_time", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "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": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 7 + } + ] + }, + { + "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": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "select": [ + { + "info_object": { + "fallback_name": "Weather delay", + "unique_id": "ab:cd:ef:12:df:e1:f9:56-1-weather_delay", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "weather_delay", + "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": "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:df:e1:f9:56:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaValveWeatherDelay", + "options": [ + "Disabled", + "Delayed 24h", + "Delayed 48h", + "Delayed 72h" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:df:e1:f9: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:df:e1:f9:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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:df:e1:f9: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:df:e1:f9:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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:df:e1:f9:56-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:df:e1:f9:56:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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": null, + "unique_id": "ab:cd:ef:12:df:e1:f9:56-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": "TuyaValveWaterConsumedNoInstDemand", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:df:e1:f9:56:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "L" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Water Metering", + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": "Last valve open duration", + "unique_id": "ab:cd:ef:12:df:e1:f9:56-1-last_valve_open_duration", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "last_valve_open_duration", + "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:df:e1:f9:56:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "min" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Time left", + "unique_id": "ab:cd:ef:12:df:e1:f9:56-1-time_left", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "time_left", + "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:df:e1:f9:56:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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": "Timer state", + "unique_id": "ab:cd:ef:12:df:e1:f9:56-1-timer_state", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "timer_state", + "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:df:e1:f9:56:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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": null, + "unique_id": "ab:cd:ef:12:df:e1:f9:56-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:df:e1:f9:56:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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:df:e1:f9: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:df:e1:f9:56:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:df:e1:f9:56", + "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-86nbew0j-ts0601.json b/tests/data/devices/tze200-86nbew0j-ts0601.json new file mode 100644 index 000000000..4e5ac9107 --- /dev/null +++ b/tests/data/devices/tze200-86nbew0j-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:0d:c5:16:fc", + "nwk": "0x0B79", + "manufacturer": "_TZE200_86nbew0j", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_86nbew0j", + "friendly_model": "TS0601", + "name": "_TZE200_86nbew0j TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.064633+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_86nbew0j" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:0d:c5:16: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:0d:c5:16:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:c5:16:fc", + "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:c5:16: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:0d:c5:16:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:c5:16:fc", + "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:0d:c5:16: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:0d:c5:16:fc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:0d:c5:16:fc", + "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-a0syesf5-ts0601.json b/tests/data/devices/tze200-a0syesf5-ts0601.json new file mode 100644 index 000000000..36bd4a6d3 --- /dev/null +++ b/tests/data/devices/tze200-a0syesf5-ts0601.json @@ -0,0 +1,344 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:68:ad:a9:bd", + "nwk": "0xAA9B", + "manufacturer": "_TZE200_a0syesf5", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_a0syesf5", + "friendly_model": "TS0601", + "name": "_TZE200_a0syesf5 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.019738+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_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "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": 2 + } + ] + }, + { + "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": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:68:ad:a9:bd-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:68:ad:a9:bd: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:68:ad:a9:bd:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:68:ad:a9:bd", + "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": true, + "brightness": 2, + "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:68:ad:a9:bd-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:68:ad:a9:bd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:68:ad:a9:bd", + "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:68:ad:a9:bd-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:68:ad:a9:bd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:68:ad:a9:bd", + "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:68:ad:a9:bd-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:68:ad:a9:bd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:68:ad:a9:bd", + "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-a1dia7ml-ts0601.json b/tests/data/devices/tze200-a1dia7ml-ts0601.json new file mode 100644 index 000000000..046bde5c0 --- /dev/null +++ b/tests/data/devices/tze200-a1dia7ml-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b7:bf:3b:5a", + "nwk": "0xE9D3", + "manufacturer": "_TZE200_a1dia7ml", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_a1dia7ml", + "friendly_model": "TS0601", + "name": "_TZE200_a1dia7ml TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.768045+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_a1dia7ml" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b7:bf:3b: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:b7:bf:3b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b7:bf:3b: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:b7:bf:3b: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:b7:bf:3b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b7:bf:3b: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:b7:bf:3b: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:b7:bf:3b:5a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b7:bf:3b:5a", + "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-abatw3kj-ts0601.json b/tests/data/devices/tze200-abatw3kj-ts0601.json new file mode 100644 index 000000000..ad825ec41 --- /dev/null +++ b/tests/data/devices/tze200-abatw3kj-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d4:15:fd:b1", + "nwk": "0xA1E3", + "manufacturer": "_TZE200_abatw3kj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_abatw3kj", + "friendly_model": "TS0601", + "name": "_TZE200_abatw3kj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.675786+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_abatw3kj" + }, + { + "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:d4:15:fd: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:d4:15:fd:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:15:fd: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:d4:15:fd: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:d4:15:fd:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:15:fd:b1", + "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:d4:15:fd: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:d4:15:fd:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:15:fd:b1", + "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-agumlajc-ts0601.json b/tests/data/devices/tze200-agumlajc-ts0601.json new file mode 100644 index 000000000..cc8e2d2fc --- /dev/null +++ b/tests/data/devices/tze200-agumlajc-ts0601.json @@ -0,0 +1,298 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fb:2b:64:9f", + "nwk": "0x11AB", + "manufacturer": "_TZE200_agumlajc", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_agumlajc", + "friendly_model": "TS0601", + "name": "_TZE200_agumlajc TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.772089+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": 65 + }, + { + "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": "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": "_TZE200_agumlajc" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [ + { + "id": "0xfffe", + "name": "reporting_status", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fb:2b:64: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:fb:2b:64:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:2b:64: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:fb:2b:64: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:fb:2b:64:9f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:2b:64: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:fb:2b:64: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:fb:2b:64:9f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fb:2b:64:9f", + "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-aoclfnxz-ts0601.json b/tests/data/devices/tze200-aoclfnxz-ts0601.json new file mode 100644 index 000000000..51da42c2b --- /dev/null +++ b/tests/data/devices/tze200-aoclfnxz-ts0601.json @@ -0,0 +1,650 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:33:78:02:42", + "nwk": "0xE6E0", + "manufacturer": "_TZE200_aoclfnxz", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_aoclfnxz", + "friendly_model": "TS0601", + "name": "_TZE200_aoclfnxz TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.866159+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": "THERMOSTAT", + "id": 769 + }, + "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_aoclfnxz" + }, + { + "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": "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": 1800 + }, + { + "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": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "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": "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:33:78:02:42-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:33:78:02:42:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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": 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": 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" + ] + } + ], + "select": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:33:78:02:42-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:33:78:02:42:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:33:78:02: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:33:78:02:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:78:02: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:33:78:02:42:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:78:02:42-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:33:78:02:42:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:33:78:02:42-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:33:78:02:42:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:33:78:02:42-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:33:78:02:42:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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:33:78:02: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:33:78:02:42:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:33:78:02:42", + "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-bcusnqt8-ts0601.json b/tests/data/devices/tze200-bcusnqt8-ts0601.json new file mode 100644 index 000000000..c1a1b30c6 --- /dev/null +++ b/tests/data/devices/tze200-bcusnqt8-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:88:c9:0a:e7", + "nwk": "0xBE6A", + "manufacturer": "_TZE200_bcusnqt8", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_bcusnqt8", + "friendly_model": "TS0601", + "name": "_TZE200_bcusnqt8 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.810128+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_bcusnqt8" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:88:c9:0a: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:88:c9:0a:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:c9:0a:e7", + "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:88:c9:0a: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:88:c9:0a:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:c9:0a:e7", + "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:88:c9:0a: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:88:c9:0a:e7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:c9:0a:e7", + "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-bvrlmajk-ts0601.json b/tests/data/devices/tze200-bvrlmajk-ts0601.json new file mode 100644 index 000000000..731b9d8e6 --- /dev/null +++ b/tests/data/devices/tze200-bvrlmajk-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:25:62:e5:8a", + "nwk": "0xB59B", + "manufacturer": "_TZE200_bvrlmajk", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_bvrlmajk", + "friendly_model": "TS0601", + "name": "_TZE200_bvrlmajk TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.955302+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_bvrlmajk" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:25:62:e5: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:25:62:e5:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:62:e5: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:25:62:e5: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:25:62:e5:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:62:e5: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:25:62:e5: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:25:62:e5:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:62:e5:8a", + "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-byzdayie-ts0601.json b/tests/data/devices/tze200-byzdayie-ts0601.json new file mode 100644 index 000000000..4d7a9dce0 --- /dev/null +++ b/tests/data/devices/tze200-byzdayie-ts0601.json @@ -0,0 +1,844 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d9:70:11:36", + "nwk": "0x6F79", + "manufacturer": "_TZE200_byzdayie", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_byzdayie", + "friendly_model": "TS0601", + "name": "_TZE200_byzdayie TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.464250+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": 66 + }, + { + "id": "0x0006", + "name": "date_code", + "zcl_type": "string", + "value": "" + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "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": "_TZE200_byzdayie" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0x000b", + "name": "product_url", + "zcl_type": "string", + "unsupported": true + }, + { + "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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "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 + } + ] + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 8994.84 + }, + { + "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", + "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", + "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": 184.8 + }, + { + "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": 1499 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 229.7 + }, + { + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:70:11:36-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:70:11:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "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:70:11:36-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:70:11:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "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:d9:70:11:36-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:d9:70:11:36:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 8994.84, + "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:d9:70:11:36-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:d9:70:11:36:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 184.8 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:70:11:36-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:d9:70:11:36:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 1.499 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:70:11:36-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:d9:70:11:36:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 229.7 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d9:70:11:36-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:d9:70:11:36:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "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:d9:70:11:36-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:70:11:36:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d9:70:11:36", + "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-cirvgep4-ts0601.json b/tests/data/devices/tze200-cirvgep4-ts0601.json new file mode 100644 index 000000000..1048750cb --- /dev/null +++ b/tests/data/devices/tze200-cirvgep4-ts0601.json @@ -0,0 +1,484 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "nwk": "0xC5AC", + "manufacturer": "_TZE200_cirvgep4", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_cirvgep4", + "friendly_model": "TS0601", + "name": "_TZE200_cirvgep4 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.654940+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_cirvgep4" + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2580 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 3400 + } + ] + }, + { + "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": 72 + } + ] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:3d:fa:1c:a8-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:3d:fa:1c:a8:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "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:3d:fa:1c: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:3d:fa:1c:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "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:3d:fa:1c: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:3d:fa:1c:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "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:3d:fa:1c: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:3d:fa:1c:a8:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "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:3d:fa:1c: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:3d:fa:1c:a8:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 25.8 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3d:fa:1c: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:3d:fa:1c:a8:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 34.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:3d:fa:1c:a8-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:3d:fa:1c:a8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3d:fa:1c:a8", + "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-cpbo62rn-ts0601.json b/tests/data/devices/tze200-cpbo62rn-ts0601.json new file mode 100644 index 000000000..7aea29e98 --- /dev/null +++ b/tests/data/devices/tze200-cpbo62rn-ts0601.json @@ -0,0 +1,348 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "nwk": "0xB9A4", + "manufacturer": "_TZE200_cpbo62rn", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_cpbo62rn", + "friendly_model": "TS0601", + "name": "_TZE200_cpbo62rn TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.296813+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_cpbo62rn" + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 44 + } + ] + }, + { + "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": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b3:c5:e5:3a-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": 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:b3:c5:e5:3a:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 56, + "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:b3:c5:e5:3a-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:b3:c5:e5:3a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "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:b3:c5:e5:3a-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:b3:c5:e5:3a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "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:b3:c5:e5:3a-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:b3:c5:e5:3a:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b3:c5:e5:3a-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:b3:c5:e5:3a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:c5:e5:3a", + "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-cpmgn2cf-ts0601.json b/tests/data/devices/tze200-cpmgn2cf-ts0601.json new file mode 100644 index 000000000..11ddf8424 --- /dev/null +++ b/tests/data/devices/tze200-cpmgn2cf-ts0601.json @@ -0,0 +1,1805 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e8:32:c6:e4", + "nwk": "0xECD7", + "manufacturer": "_TZE200_cpmgn2cf", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_cpmgn2cf", + "friendly_model": "TS0601", + "name": "_TZE200_cpmgn2cf TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.932351+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": [] + }, + { + "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": "0x0006", + "endpoint_attribute": "on_off", + "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", + "value": 350 + }, + { + "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", + "unsupported": true + }, + { + "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": 0 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "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": [] + } + ] + }, + "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", + "unsupported": true + }, + { + "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": 262144 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Valve State" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 98 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 100 + }, + { + "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": [] + }, + "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": "Temperature Calibration" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 9 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": -9 + }, + { + "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": [] + }, + "5": { + "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": 917504 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Boost Time" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 73 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 9999 + }, + { + "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": [] + }, + "6": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "7": { + "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": "Min. temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 15 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 5 + }, + { + "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": [] + }, + "8": { + "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": "Max. temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 35 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 15 + }, + { + "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": [] + }, + "9": { + "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": "Comfort temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 35 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 5 + }, + { + "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": [] + }, + "10": { + "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": "Eco temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 35 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 5 + }, + { + "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": [] + }, + "11": { + "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": "Away temperature" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 35 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": 5 + }, + { + "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": [] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "MoesThermostat", + "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:e8:32:c6:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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", + "comfort", + "eco", + "boost", + "Complex" + ], + "hvac_modes": [ + "heat" + ] + }, + "state": { + "class_name": "MoesThermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": null, + "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": 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": null, + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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": 35.0 + } + }, + { + "info_object": { + "fallback_name": "Eco temperature", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-10-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": 10, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "10:0x000d", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4:10:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 10, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Away temperature", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-11-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": 11, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "11:0x000d", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4:11:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 11, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Valve State", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-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:e8:32:c6:e4:3:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 3, + "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": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Temperature Calibration", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-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:e8:32:c6:e4:4:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 4, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": -9, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Boost Time", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-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:e8:32:c6:e4:5:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 5, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9999, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Min. temperature", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-7-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": 7, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "7:0x000d", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4:7:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 7, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 15, + "native_min_value": 5, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Max. temperature", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-8-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": 8, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "8:0x000d", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4:8:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 8, + "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": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Comfort temperature", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4-9-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": 9, + "cluster": { + "id": 13, + "name": "AnalogOutput", + "type": "server" + }, + "id": "9:0x000d", + "unique_id": "ab:cd:ef:12:e8:32:c6:e4:9:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 9, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 35, + "native_min_value": 5, + "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:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0204", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6: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:e8:32:c6:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6: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:e8:32:c6: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:e8:32:c6:e4:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6: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:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6:e4-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:e8:32:c6:e4:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6:e4-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:e8:32:c6:e4:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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:e8:32:c6:e4-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:e8:32:c6:e4:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "endpoint_id": 6, + "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:e8:32:c6: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:e8:32:c6:e4:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", + "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-dwcarsat-ts0601.json b/tests/data/devices/tze200-dwcarsat-ts0601.json new file mode 100644 index 000000000..903cd191a --- /dev/null +++ b/tests/data/devices/tze200-dwcarsat-ts0601.json @@ -0,0 +1,660 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:11:fa:9c:20", + "nwk": "0x2C73", + "manufacturer": "_TZE200_dwcarsat", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_dwcarsat", + "friendly_model": "TS0601", + "name": "_TZE200_dwcarsat TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.001378+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": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + }, + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2340 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 5750 + } + ] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 7e-06 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "single", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x042a", + "endpoint_attribute": "pm25", + "attributes": [] + }, + { + "cluster_id": "0x042b", + "endpoint_attribute": "formaldehyde_concentration", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 0.00089 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0003", + "name": "tolerance", + "zcl_type": "single", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x042e", + "endpoint_attribute": "voc_level", + "attributes": [ + { + "id": "0x0002", + "name": "max_measured_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "value": 0.0006799999999999999 + }, + { + "id": "0x0001", + "name": "min_measured_value", + "zcl_type": "single", + "unsupported": true + }, + { + "id": "0x0003", + "name": "tolerance", + "zcl_type": "single", + "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": [] + } + ] + }, + "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:11:fa:9c:20-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:fa:9c:20:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "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:fa:9c:20-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:fa:9c:20:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "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:11:fa:9c:20-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:11:fa:9c:20:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 23.4 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:fa:9c:20-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:11:fa:9c:20:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 57.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:fa:9c:20-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:11:fa:9c:20:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "CarbonDioxideConcentration", + "available": true, + "state": 7.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:fa:9c:20-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:11:fa:9c:20:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "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:11:fa:9c:20-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:11:fa:9c:20:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "ppm" + }, + "state": { + "class_name": "FormaldehydeConcentration", + "available": true, + "state": 890.0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:fa:9c:20-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:11:fa:9c:20:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "\u00b5g/m\u00b3" + }, + "state": { + "class_name": "VOCLevel", + "available": true, + "state": 679.9999999999999 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:fa:9c:20-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:fa:9c:20:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:fa:9c:20", + "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-eevqq1uv-ts0601.json b/tests/data/devices/tze200-eevqq1uv-ts0601.json new file mode 100644 index 000000000..341cd2020 --- /dev/null +++ b/tests/data/devices/tze200-eevqq1uv-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e7:77:2b:fd", + "nwk": "0x4C47", + "manufacturer": "_TZE200_eevqq1uv", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_eevqq1uv", + "friendly_model": "TS0601", + "name": "_TZE200_eevqq1uv TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.286002+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_eevqq1uv" + }, + { + "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:77:2b:fd-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:77:2b:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:77:2b:fd", + "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:77:2b:fd-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:77:2b:fd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:77:2b:fd", + "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:77:2b:fd-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:77:2b:fd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:77:2b:fd", + "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-ewxhg6o9-ts0601.json b/tests/data/devices/tze200-ewxhg6o9-ts0601.json new file mode 100644 index 000000000..947a4f616 --- /dev/null +++ b/tests/data/devices/tze200-ewxhg6o9-ts0601.json @@ -0,0 +1,782 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5e:6a:9a:13", + "nwk": "0xA759", + "manufacturer": "_TZE200_ewxhg6o9", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_ewxhg6o9", + "friendly_model": "TS0601", + "name": "_TZE200_ewxhg6o9 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.978902+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": 68 + }, + { + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_ewxhg6o9" + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 433.85 + }, + { + "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", + "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", + "unsupported": true + }, + { + "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", + "value": 10 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 52.8 + }, + { + "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": 466 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 238.1 + }, + { + "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 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0006", + "name": "image_upgrade_status", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:6a:9a: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:5e:6a:9a:13:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "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:5e:6a:9a: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:5e:6a:9a:13:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "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:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 4.3385, + "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:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 52.8 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.466 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 23.81 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", + "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:5e:6a:9a: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:5e:6a:9a:13:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:6a:9a: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/tze200-f1pvdgoh-ts0601.json b/tests/data/devices/tze200-f1pvdgoh-ts0601.json new file mode 100644 index 000000000..cbb2ffb34 --- /dev/null +++ b/tests/data/devices/tze200-f1pvdgoh-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6f:fa:d5:b9", + "nwk": "0xB27C", + "manufacturer": "_TZE200_f1pvdgoh", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_f1pvdgoh", + "friendly_model": "TS0601", + "name": "_TZE200_f1pvdgoh TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.348397+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": 66 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_f1pvdgoh" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6f:fa:d5:b9-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:fa:d5:b9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:fa:d5:b9", + "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:fa:d5:b9-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:fa:d5:b9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:fa:d5:b9", + "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:6f:fa:d5:b9-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:fa:d5:b9:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6f:fa:d5:b9", + "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-fvldku9h-ts0601.json b/tests/data/devices/tze200-fvldku9h-ts0601.json new file mode 100644 index 000000000..617f2eac5 --- /dev/null +++ b/tests/data/devices/tze200-fvldku9h-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f6:ec:90:fb", + "nwk": "0x4092", + "manufacturer": "_TZE200_fvldku9h", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_fvldku9h", + "friendly_model": "TS0601", + "name": "_TZE200_fvldku9h TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.829030+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_fvldku9h" + }, + { + "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:f6:ec:90: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:f6:ec:90:fb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f6:ec:90:fb", + "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:f6:ec:90: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:f6:ec:90:fb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f6:ec:90:fb", + "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:f6:ec:90: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:f6:ec:90:fb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f6:ec:90:fb", + "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-g9a3awaj-ts0601.json b/tests/data/devices/tze200-g9a3awaj-ts0601.json new file mode 100644 index 000000000..5cea98f6e --- /dev/null +++ b/tests/data/devices/tze200-g9a3awaj-ts0601.json @@ -0,0 +1,585 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5c:5d:1b:5a", + "nwk": "0x8453", + "manufacturer": "_TZE200_g9a3awaj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_g9a3awaj", + "friendly_model": "TS0601", + "name": "_TZE200_g9a3awaj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.830106+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "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": "_TZE200_g9a3awaj" + }, + { + "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", + "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", + "unsupported": true + }, + { + "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": 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", + "unsupported": true + }, + { + "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", + "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": 72 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:5d:1b:5a-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:5c:5d:1b:5a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b:5a", + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:5d:1b: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:5c:5d:1b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b: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:5c:5d:1b: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:5c:5d:1b:5a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b: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:5c:5d:1b:5a-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:5c:5d:1b:5a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b:5a", + "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:5c:5d:1b:5a-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:5c:5d:1b:5a:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b:5a", + "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:5c:5d:1b: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:5c:5d:1b:5a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:5d:1b:5a", + "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-gaj531w3-ts0601.json b/tests/data/devices/tze200-gaj531w3-ts0601.json new file mode 100644 index 000000000..7f059362c --- /dev/null +++ b/tests/data/devices/tze200-gaj531w3-ts0601.json @@ -0,0 +1,440 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:30:0c:e3:f9", + "nwk": "0x3F77", + "manufacturer": "_TZE200_gaj531w3", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_gaj531w3", + "friendly_model": "TS0601", + "name": "_TZE200_gaj531w3 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_cover.TuyaMoesCover0601", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.753390+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_gaj531w3" + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "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": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_vdiuwbkq", + "TS0601" + ], + [ + "_TZE200_zah67ekd", + "TS0601" + ], + [ + "_TZE200_nueqqe6k", + "TS0601" + ], + [ + "_TZE200_gubdgai2", + "TS0601" + ], + [ + "_TZE200_5sbebbzs", + "TS0601" + ], + [ + "_TZE200_hsgrhjpf", + "TS0601" + ], + [ + "_TZE200_68nvbio9", + "TS0601" + ], + [ + "_TZE200_ergbiejo", + "TS0601" + ], + [ + "_TZE200_nhyj64w2", + "TS0601" + ], + [ + "_TZE200_cf1sl3tj", + "TS0601" + ], + [ + "_TZE200_7eue9vhc", + "TS0601" + ], + [ + "_TZE200_bv1jcqqu", + "TS0601" + ], + [ + "_TZE200_nw1r9hp6", + "TS0601" + ], + [ + "_TZE200_gaj531w3", + "TS0601" + ], + [ + "_TZE200_icka1clh", + "TS0601" + ], + [ + "_TZE200_1vxgqfba", + "TS0601" + ], + [ + "_TZE200_fctwhugx", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:30:0c:e3:f9-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": 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:30:0c:e3:f9:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:30:0c:e3:f9", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:30:0c:e3:f9-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:30:0c:e3:f9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:30:0c:e3:f9", + "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:30:0c:e3:f9-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:30:0c:e3:f9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:30:0c:e3:f9", + "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:30:0c:e3:f9-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:30:0c:e3:f9:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:30:0c:e3:f9", + "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-gubdgai2-ts0601.json b/tests/data/devices/tze200-gubdgai2-ts0601.json new file mode 100644 index 000000000..5a9017cc5 --- /dev/null +++ b/tests/data/devices/tze200-gubdgai2-ts0601.json @@ -0,0 +1,360 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e5:a7:00:54", + "nwk": "0x5989", + "manufacturer": "_TZE200_gubdgai2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_gubdgai2", + "friendly_model": "TS0601", + "name": "_TZE200_gubdgai2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.998905+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_gubdgai2" + }, + { + "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": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 90 + } + ] + }, + { + "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": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:a7:00:54-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": 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:e5:a7:00:54:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:e5:a7:00:54", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": 10, + "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:e5:a7:00: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:e5:a7:00:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:a7:00: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:e5:a7:00: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:e5:a7:00:54:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:a7:00: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:e5:a7:00:54-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:e5:a7:00:54:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:e5:a7:00:54", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e5:a7:00: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:e5:a7:00:54:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e5:a7:00: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/tze200-hl0ss9oa-ts0225.json b/tests/data/devices/tze200-hl0ss9oa-ts0225.json new file mode 100644 index 000000000..a4609a591 --- /dev/null +++ b/tests/data/devices/tze200-hl0ss9oa-ts0225.json @@ -0,0 +1,406 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ea:02:c4:e2", + "nwk": "0xEC5D", + "manufacturer": "_TZE200_hl0ss9oa", + "model": "TS0225", + "friendly_manufacturer": "_TZE200_hl0ss9oa", + "friendly_model": "TS0225", + "name": "_TZE200_hl0ss9oa TS0225", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.132636+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_hl0ss9oa" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0225" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0004", + "name": "light_sensor_type", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 30648 + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 222, + 243, + 252, + 254, + 255, + 219, + 180, + 132 + ] + }, + { + "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": 13 + } + ] + }, + { + "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": [] + }, + "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:ea:02:c4: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:ea:02:c4:e2:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:02:c4:e2", + "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:ea:02:c4: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:ea:02:c4:e2:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:02:c4:e2", + "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:ea:02:c4: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:ea:02:c4:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:02:c4: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:ea:02:c4: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:ea:02:c4:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ea:02:c4: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:ea:02:c4: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:ea:02:c4:e2:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:ea:02:c4:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 1161 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-icka1clh-ts0601.json b/tests/data/devices/tze200-icka1clh-ts0601.json new file mode 100644 index 000000000..35e7a7c7f --- /dev/null +++ b/tests/data/devices/tze200-icka1clh-ts0601.json @@ -0,0 +1,440 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8b:0c:ae:49", + "nwk": "0xAC3C", + "manufacturer": "_TZE200_icka1clh", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_icka1clh", + "friendly_model": "TS0601", + "name": "_TZE200_icka1clh TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_cover.TuyaMoesCover0601", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.898176+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_icka1clh" + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "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": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_vdiuwbkq", + "TS0601" + ], + [ + "_TZE200_zah67ekd", + "TS0601" + ], + [ + "_TZE200_nueqqe6k", + "TS0601" + ], + [ + "_TZE200_gubdgai2", + "TS0601" + ], + [ + "_TZE200_5sbebbzs", + "TS0601" + ], + [ + "_TZE200_hsgrhjpf", + "TS0601" + ], + [ + "_TZE200_68nvbio9", + "TS0601" + ], + [ + "_TZE200_ergbiejo", + "TS0601" + ], + [ + "_TZE200_nhyj64w2", + "TS0601" + ], + [ + "_TZE200_cf1sl3tj", + "TS0601" + ], + [ + "_TZE200_7eue9vhc", + "TS0601" + ], + [ + "_TZE200_bv1jcqqu", + "TS0601" + ], + [ + "_TZE200_nw1r9hp6", + "TS0601" + ], + [ + "_TZE200_gaj531w3", + "TS0601" + ], + [ + "_TZE200_icka1clh", + "TS0601" + ], + [ + "_TZE200_1vxgqfba", + "TS0601" + ], + [ + "_TZE200_fctwhugx", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8b:0c:ae:49-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": 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:8b:0c:ae:49:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:8b:0c:ae:49", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8b:0c:ae: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:8b:0c:ae:49:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:0c:ae: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:8b:0c:ae: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:8b:0c:ae:49:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:0c:ae:49", + "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:0c:ae: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:8b:0c:ae:49:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8b:0c:ae:49", + "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-iuk8kupi-ts0601.json b/tests/data/devices/tze200-iuk8kupi-ts0601.json new file mode 100644 index 000000000..cba5265b3 --- /dev/null +++ b/tests/data/devices/tze200-iuk8kupi-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fa:ce:89:0c", + "nwk": "0x9D92", + "manufacturer": "_TZE200_iuk8kupi", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_iuk8kupi", + "friendly_model": "TS0601", + "name": "_TZE200_iuk8kupi TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.979162+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_iuk8kupi" + }, + { + "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": [] + } + ] + }, + "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:fa:ce:89:0c-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:fa:ce:89:0c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:ce:89:0c", + "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:fa:ce:89:0c-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:fa:ce:89:0c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:ce:89:0c", + "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:fa:ce:89:0c-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:fa:ce:89:0c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:ce:89:0c", + "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-js3mgbjb-ts0601.json b/tests/data/devices/tze200-js3mgbjb-ts0601.json new file mode 100644 index 000000000..71c31a2bf --- /dev/null +++ b/tests/data/devices/tze200-js3mgbjb-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6d:3e:31:b1", + "nwk": "0xF76A", + "manufacturer": "_TZE200_js3mgbjb", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_js3mgbjb", + "friendly_model": "TS0601", + "name": "_TZE200_js3mgbjb TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.254190+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_js3mgbjb" + }, + { + "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": 68 + } + ] + } + ] + }, + "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:6d:3e:31: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:6d:3e:31:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:3e:31: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:6d:3e:31: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:6d:3e:31:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:3e:31:b1", + "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:3e:31: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:6d:3e:31:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6d:3e:31:b1", + "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/tze200-jva8ink8-ts0601.json b/tests/data/devices/tze200-jva8ink8-ts0601.json new file mode 100644 index 000000000..260a05106 --- /dev/null +++ b/tests/data/devices/tze200-jva8ink8-ts0601.json @@ -0,0 +1,770 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9e:63:48:2b", + "nwk": "0xC942", + "manufacturer": "_TZE200_jva8ink8", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_jva8ink8", + "friendly_model": "TS0601", + "name": "_TZE200_jva8ink8 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.268115+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": "OCCUPANCY_SENSOR", + "id": 263 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 68 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_jva8ink8" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "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": "0x000c", + "endpoint_attribute": "analog_input", + "attributes": [ + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0.0 + } + ] + }, + { + "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": 3011.299956639812 + } + ] + }, + { + "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": 600 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef04", + "name": "detection_distance_max", + "zcl_type": "uint16", + "value": 600 + }, + { + "id": "0xef03", + "name": "detection_distance_min", + "zcl_type": "uint16", + "value": 60 + }, + { + "id": "0xef65", + "name": "find_switch", + "zcl_type": "bool", + "value": 1 + }, + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "2.0.9" + }, + { + "id": "0xef02", + "name": "move_sensitivity", + "zcl_type": "uint16", + "value": 7 + }, + { + "id": "0xef66", + "name": "presence_sensitivity", + "zcl_type": "uint16", + "value": 10 + }, + { + "id": "0xef06", + "name": "self_test", + "zcl_type": "enum8", + "value": 1 + } + ] + } + ], + "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:9e:63:48:2b-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:9e:63:48:2b:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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": 6.0 + } + }, + { + "info_object": { + "fallback_name": "Minimum range", + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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.6 + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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": 1.0 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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:9e:63:48:2b-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:9e:63:48:2b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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:9e:63:48:2b-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:9e:63:48:2b:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 2 + } + }, + { + "info_object": { + "fallback_name": "Target distance", + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:9e:63:48:2b-1-self_test", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test", + "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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "EnumSensor", + "available": true, + "state": "CheckSuccess" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "LED indicator", + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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": true, + "inverted": false + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:9e:63:48:2b-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:9e:63:48:2b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9e:63:48:2b", + "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-jwsjbxjs-ts0601.json b/tests/data/devices/tze200-jwsjbxjs-ts0601.json new file mode 100644 index 000000000..60f0a61df --- /dev/null +++ b/tests/data/devices/tze200-jwsjbxjs-ts0601.json @@ -0,0 +1,759 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:53:b6:3a:a2", + "nwk": "0xC1A7", + "manufacturer": "_TZE200_jwsjbxjs", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_jwsjbxjs", + "friendly_model": "TS0601", + "name": "_TZE200_jwsjbxjs TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaQuintupleSwitchGP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.239710+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 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_jwsjbxjs" + }, + { + "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": 70 + } + ] + } + ] + }, + "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": [] + }, + "5": { + "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_jwsjbxjs", + "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:53:b6:3a:a2-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:53:b6:3a:a2:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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:53:b6:3a:a2-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:53:b6:3a:a2:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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:53:b6:3a:a2-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:53:b6:3a:a2:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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:53:b6:3a:a2-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:53:b6:3a:a2:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:53:b6:3a:a2-5", + "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": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:53:b6:3a:a2:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "endpoint_id": 5, + "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:53:b6:3a:a2-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:b6:3a:a2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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:b6:3a:a2-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:b6:3a:a2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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:53:b6:3a:a2-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:b6:3a:a2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:53:b6:3a:a2", + "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-khozatfx-ts0601.json b/tests/data/devices/tze200-khozatfx-ts0601.json new file mode 100644 index 000000000..ffa7cd285 --- /dev/null +++ b/tests/data/devices/tze200-khozatfx-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b3:a4:6c:2b", + "nwk": "0xFE9C", + "manufacturer": "_TZE200_khozatfx", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_khozatfx", + "friendly_model": "TS0601", + "name": "_TZE200_khozatfx TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.586983+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": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_khozatfx" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b3:a4:6c:2b-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:b3:a4:6c:2b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:a4:6c:2b", + "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:b3:a4:6c:2b-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:b3:a4:6c:2b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:a4:6c:2b", + "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:b3:a4:6c:2b-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:b3:a4:6c:2b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b3:a4:6c:2b", + "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-kyfqmmyl-ts0601.json b/tests/data/devices/tze200-kyfqmmyl-ts0601.json new file mode 100644 index 000000000..d1626e923 --- /dev/null +++ b/tests/data/devices/tze200-kyfqmmyl-ts0601.json @@ -0,0 +1,541 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:b4:bb:95:b1", + "nwk": "0xA05D", + "manufacturer": "_TZE200_kyfqmmyl", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_kyfqmmyl", + "friendly_model": "TS0601", + "name": "_TZE200_kyfqmmyl TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaTripleSwitchVar03", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.313689+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_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 82 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_kyfqmmyl" + }, + { + "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": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "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": "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": [] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_kyfqmmyl", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0x000a", + "0xef00" + ], + "output_clusters": [ + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:bb:95:b1-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:b4:bb:95:b1:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95:b1", + "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:b4:bb:95:b1-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:b4:bb:95:b1:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95:b1", + "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:b4:bb:95:b1-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:b4:bb:95:b1:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95:b1", + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:b4:bb:95: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:b4:bb:95:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95: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:b4:bb:95: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:b4:bb:95:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95:b1", + "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:b4:bb:95: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:b4:bb:95:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:b4:bb:95:b1", + "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-la2c2uo9-ts0601.json b/tests/data/devices/tze200-la2c2uo9-ts0601.json new file mode 100644 index 000000000..2dd69d586 --- /dev/null +++ b/tests/data/devices/tze200-la2c2uo9-ts0601.json @@ -0,0 +1,344 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:84:73:2a:0e", + "nwk": "0xA997", + "manufacturer": "_TZE200_la2c2uo9", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_la2c2uo9", + "friendly_model": "TS0601", + "name": "_TZE200_la2c2uo9 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.719031+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_LIGHT", + "id": 256 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 68 + } + ] + }, + { + "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": 19 + } + ] + }, + { + "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": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:84:73:2a:0e-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:84:73:2a:0e: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:84:73:2a:0e:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:84:73:2a:0e", + "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": true, + "brightness": 19, + "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:84:73:2a: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:84:73:2a:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:73:2a: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:84:73:2a: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:84:73:2a:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:73:2a: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:84:73:2a: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:84:73:2a:0e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:84:73:2a: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/tze200-libht6ua-ts0601.json b/tests/data/devices/tze200-libht6ua-ts0601.json new file mode 100644 index 000000000..e25b39924 --- /dev/null +++ b/tests/data/devices/tze200-libht6ua-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:25:a7:64:05", + "nwk": "0x1C07", + "manufacturer": "_TZE200_libht6ua", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_libht6ua", + "friendly_model": "TS0601", + "name": "_TZE200_libht6ua TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.802290+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_libht6ua" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:25:a7:64: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:25:a7:64:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:a7:64: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:25:a7:64: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:25:a7:64:05:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:a7:64:05", + "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:25:a7:64: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:25:a7:64:05:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:25:a7:64:05", + "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-m9skfctm-ts0601.json b/tests/data/devices/tze200-m9skfctm-ts0601.json new file mode 100644 index 000000000..409add33d --- /dev/null +++ b/tests/data/devices/tze200-m9skfctm-ts0601.json @@ -0,0 +1,307 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ef:2f:91:36", + "nwk": "0x2544", + "manufacturer": "_TZE200_m9skfctm", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_m9skfctm", + "friendly_model": "TS0601", + "name": "_TZE200_m9skfctm TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.027854+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_m9skfctm" + }, + { + "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": "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": [] + } + ], + "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:ef:2f:91:36-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:ef:2f:91:36:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:2f:91:36", + "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:ef:2f:91:36-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:2f:91:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:2f:91:36", + "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:2f:91:36-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:2f:91:36:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:2f:91:36", + "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:2f:91:36-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:2f:91:36:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ef:2f:91:36", + "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-mgxy2d9f-ts0601.json b/tests/data/devices/tze200-mgxy2d9f-ts0601.json new file mode 100644 index 000000000..772d2d902 --- /dev/null +++ b/tests/data/devices/tze200-mgxy2d9f-ts0601.json @@ -0,0 +1,244 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:9c:35:bf:88", + "nwk": "0x4520", + "manufacturer": "_TZE200_mgxy2d9f", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_mgxy2d9f", + "friendly_model": "TS0601", + "name": "_TZE200_mgxy2d9f TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.260191+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_mgxy2d9f" + }, + { + "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:9c:35:bf: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:9c:35:bf:88:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9c:35:bf: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:9c:35:bf: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:9c:35:bf:88:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9c:35:bf: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:9c:35:bf: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:9c:35:bf:88:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:9c:35:bf:88", + "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-mja3fuja-ts0601.json b/tests/data/devices/tze200-mja3fuja-ts0601.json new file mode 100644 index 000000000..7c079416d --- /dev/null +++ b/tests/data/devices/tze200-mja3fuja-ts0601.json @@ -0,0 +1,504 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:59:63:f5:06", + "nwk": "0x7803", + "manufacturer": "_TZE200_mja3fuja", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_mja3fuja", + "friendly_model": "TS0601", + "name": "_TZE200_mja3fuja TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.231725+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": 64 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_mja3fuja" + }, + { + "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": "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": [] + } + ] + }, + "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:63:f5:06-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:63:f5:06:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x040d", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x042b", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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:63:f5:06-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:63:f5:06:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:59:63:f5:06", + "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-mz5y07w2-ts0601.json b/tests/data/devices/tze200-mz5y07w2-ts0601.json new file mode 100644 index 000000000..a6396abc8 --- /dev/null +++ b/tests/data/devices/tze200-mz5y07w2-ts0601.json @@ -0,0 +1,792 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7c:a1:1a:65", + "nwk": "0x84F0", + "manufacturer": "_TZE200_mz5y07w2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_mz5y07w2", + "friendly_model": "TS0601", + "name": "_TZE200_mz5y07w2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.244588+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_mz5y07w2" + }, + { + "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 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "value": 9 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Temperature Offset" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 6 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": -6 + }, + { + "id": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 0 + }, + { + "id": "0x006a", + "name": "resolution", + "zcl_type": "single", + "value": 1 + } + ] + }, + { + "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": 2880 + }, + { + "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": 500 + }, + { + "id": "0x001e", + "name": "running_mode", + "zcl_type": "enum8", + "value": 0 + }, + { + "id": "0x001c", + "name": "system_mode", + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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": 28.8, + "outdoor_temperature": null, + "target_temperature": null, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": null, + "hvac_mode": "off", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[0]/off", + "occupancy": null, + "occupied_cooling_setpoint": null, + "occupied_heating_setpoint": 500, + "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": "Temperature Offset", + "unique_id": "ab:cd:ef:12:7c:a1:1a:65-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:7c:a1:1a:65:1:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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": "AnalogOutputNumber", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7c:a1:1a: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:7c:a1:1a:65:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a: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:7c:a1:1a: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:7c:a1:1a:65:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:a1:1a:65-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:a1:1a:65:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a:65-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:7c:a1:1a:65:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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:7c:a1:1a: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:7c:a1:1a:65:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7c:a1:1a:65", + "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-nklqjk62-ts0601.json b/tests/data/devices/tze200-nklqjk62-ts0601.json new file mode 100644 index 000000000..30293682c --- /dev/null +++ b/tests/data/devices/tze200-nklqjk62-ts0601.json @@ -0,0 +1,246 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:34:58:0b:f7", + "nwk": "0xAC7D", + "manufacturer": "_TZE200_nklqjk62", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_nklqjk62", + "friendly_model": "TS0601", + "name": "_TZE200_nklqjk62 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.438791+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": [] + } + ] + }, + "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:58:0b:f7-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:58:0b:f7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:58:0b:f7", + "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:58:0b:f7-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:58:0b:f7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:58:0b:f7", + "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:58:0b:f7-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:58:0b:f7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:34:58:0b:f7", + "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-nojsjtj2-ts0601.json b/tests/data/devices/tze200-nojsjtj2-ts0601.json new file mode 100644 index 000000000..d71614b2a --- /dev/null +++ b/tests/data/devices/tze200-nojsjtj2-ts0601.json @@ -0,0 +1,343 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f4:9a:26:de", + "nwk": "0xC1B4", + "manufacturer": "_TZE200_nojsjtj2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_nojsjtj2", + "friendly_model": "TS0601", + "name": "_TZE200_nojsjtj2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:58.346121+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": 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_nojsjtj2" + }, + { + "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": 28 + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "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:f4:9a:26:de-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:f4:9a:26:de:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:9a:26:de", + "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:f4:9a:26:de-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:f4:9a:26:de:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:9a:26:de", + "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:f4:9a:26: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:f4:9a:26:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:9a:26: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:f4:9a:26: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:f4:9a:26:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:9a:26:de", + "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:f4:9a:26:de-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:f4:9a:26:de:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f4:9a:26:de", + "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.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-nyvavzbj-ts0601.json b/tests/data/devices/tze200-nyvavzbj-ts0601.json new file mode 100644 index 000000000..53367b748 --- /dev/null +++ b/tests/data/devices/tze200-nyvavzbj-ts0601.json @@ -0,0 +1,256 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fa:83:cd:d7", + "nwk": "0x0F97", + "manufacturer": "_TZE200_nyvavzbj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_nyvavzbj", + "friendly_model": "TS0601", + "name": "_TZE200_nyvavzbj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.946953+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_nyvavzbj" + }, + { + "id": "0x000c", + "name": "manufacturer_version_details", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + } + ] + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:fa:83:cd: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:fa:83:cd:d7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:83:cd: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:fa:83:cd: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:fa:83:cd:d7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:83:cd:d7", + "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:fa:83:cd: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:fa:83:cd:d7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fa:83:cd:d7", + "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-pl31aqf5-ts0601.json b/tests/data/devices/tze200-pl31aqf5-ts0601.json new file mode 100644 index 000000000..789592438 --- /dev/null +++ b/tests/data/devices/tze200-pl31aqf5-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cb:8d:08:24", + "nwk": "0xC3D9", + "manufacturer": "_TZE200_pl31aqf5", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_pl31aqf5", + "friendly_model": "TS0601", + "name": "_TZE200_pl31aqf5 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.863028+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_pl31aqf5" + }, + { + "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:cb:8d:08:24-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:8d:08:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:8d:08:24", + "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:8d:08:24-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:8d:08:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:8d:08:24", + "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:8d:08:24-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:8d:08:24:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cb:8d:08:24", + "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-pw7mji0l-ts0601.json b/tests/data/devices/tze200-pw7mji0l-ts0601.json new file mode 100644 index 000000000..04255dd44 --- /dev/null +++ b/tests/data/devices/tze200-pw7mji0l-ts0601.json @@ -0,0 +1,349 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1b:2f:89:a8", + "nwk": "0x431F", + "manufacturer": "_TZE200_pw7mji0l", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_pw7mji0l", + "friendly_model": "TS0601", + "name": "_TZE200_pw7mji0l TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.886181+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_pw7mji0l" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:2f:89:a8-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": 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:1b:2f:89:a8:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:1b:2f:89:a8", + "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:1b:2f:89: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:1b:2f:89:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:2f:89:a8", + "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:2f:89: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:1b:2f:89:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:2f:89:a8", + "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:2f:89:a8-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:1b:2f:89:a8:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:1b:2f:89:a8", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1b:2f:89:a8-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:2f:89:a8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1b:2f:89:a8", + "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-qhlxve78-ts0601.json b/tests/data/devices/tze200-qhlxve78-ts0601.json new file mode 100644 index 000000000..519271d5a --- /dev/null +++ b/tests/data/devices/tze200-qhlxve78-ts0601.json @@ -0,0 +1,305 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d5:5a:28:81", + "nwk": "0x50BD", + "manufacturer": "_TZE200_qhlxve78", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_qhlxve78", + "friendly_model": "TS0601", + "name": "_TZE200_qhlxve78 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.866815+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": 68 + }, + { + "id": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_qhlxve78" + }, + { + "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 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "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": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0x0005", + "name": "last_configured_by", + "zcl_type": "EUI64", + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d5:5a:28:81-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:d5:5a:28:81:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:5a:28:81", + "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:d5:5a:28:81-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:d5:5a:28:81:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:5a:28:81", + "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:d5:5a:28:81-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:d5:5a:28:81:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:5a:28:81", + "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-r32ctezx-ts0601.json b/tests/data/devices/tze200-r32ctezx-ts0601.json new file mode 100644 index 000000000..a4a7cc89d --- /dev/null +++ b/tests/data/devices/tze200-r32ctezx-ts0601.json @@ -0,0 +1,366 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:38:4a:57:6b", + "nwk": "0x4CCB", + "manufacturer": "_TZE200_r32ctezx", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_r32ctezx", + "friendly_model": "TS0601", + "name": "_TZE200_r32ctezx TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.683276+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": "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": [ + { + "id": "0x0000", + "name": "current_level", + "zcl_type": "uint8", + "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": 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": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:38:4a:57:6b-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:38:4a:57:6b: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:38:4a:57:6b:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:38:4a:57:6b", + "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": 0, + "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:38:4a:57: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:38:4a:57:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:4a:57: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:38:4a:57: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:38:4a:57:6b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:4a:57:6b", + "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:38:4a:57: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:38:4a:57:6b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:4a:57:6b", + "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-rccxox8p-ts0601.json b/tests/data/devices/tze200-rccxox8p-ts0601.json new file mode 100644 index 000000000..76a5197df --- /dev/null +++ b/tests/data/devices/tze200-rccxox8p-ts0601.json @@ -0,0 +1,295 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f8:f4:e6:c9", + "nwk": "0xE38C", + "manufacturer": "_TZE200_rccxox8p", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rccxox8p", + "friendly_model": "TS0601", + "name": "_TZE200_rccxox8p TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.956364+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 72 + } + ] + }, + { + "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": [] + } + ], + "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:f8:f4:e6:c9-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:f8:f4:e6:c9:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:f4:e6:c9", + "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:f8:f4:e6:c9-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:f8:f4:e6:c9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:f4:e6:c9", + "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:f8:f4:e6:c9-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:f8:f4:e6:c9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:f4:e6:c9", + "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:f8:f4:e6:c9-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:f8:f4:e6:c9:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f8:f4:e6:c9", + "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-rk1wojce-ts0601.json b/tests/data/devices/tze200-rk1wojce-ts0601.json new file mode 100644 index 000000000..092f86bdd --- /dev/null +++ b/tests/data/devices/tze200-rk1wojce-ts0601.json @@ -0,0 +1,244 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e2:32:83:5b", + "nwk": "0x13CE", + "manufacturer": "_TZE200_rk1wojce", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rk1wojce", + "friendly_model": "TS0601", + "name": "_TZE200_rk1wojce TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.046231+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_rk1wojce" + }, + { + "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:e2:32:83: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:e2:32:83:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:32:83: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:e2:32:83: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:e2:32:83:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:32:83:5b", + "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:e2:32:83: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:e2:32:83:5b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e2:32:83:5b", + "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-rks0sgb7-ts0601.json b/tests/data/devices/tze200-rks0sgb7-ts0601.json new file mode 100644 index 000000000..7e95eaee1 --- /dev/null +++ b/tests/data/devices/tze200-rks0sgb7-ts0601.json @@ -0,0 +1,242 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a9:ec:b3:fc", + "nwk": "0x3DD4", + "manufacturer": "_TZE200_rks0sgb7", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rks0sgb7", + "friendly_model": "TS0601", + "name": "_TZE200_rks0sgb7 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.251832+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_rks0sgb7" + }, + { + "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": [] + }, + { + "cluster_id": "0xff66", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a9:ec:b3: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:a9:ec:b3:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:ec:b3:fc", + "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:ec:b3: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:a9:ec:b3:fc:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:ec:b3:fc", + "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:a9:ec:b3: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:a9:ec:b3:fc:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a9:ec:b3:fc", + "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-rmymn92d-ts0601.json b/tests/data/devices/tze200-rmymn92d-ts0601.json new file mode 100644 index 000000000..d960bb700 --- /dev/null +++ b/tests/data/devices/tze200-rmymn92d-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1a:44:3f:67", + "nwk": "0xE20B", + "manufacturer": "_TZE200_rmymn92d", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rmymn92d", + "friendly_model": "TS0601", + "name": "_TZE200_rmymn92d TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.881007+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_rmymn92d" + }, + { + "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:1a:44:3f: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:1a:44:3f:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:44:3f: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:1a:44:3f: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:1a:44:3f:67:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:44:3f:67", + "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:1a:44:3f: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:1a:44:3f:67:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1a:44:3f:67", + "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-rtrmfadk-ts0601.json b/tests/data/devices/tze200-rtrmfadk-ts0601.json new file mode 100644 index 000000000..09015fe5a --- /dev/null +++ b/tests/data/devices/tze200-rtrmfadk-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:28:28:8c:ab", + "nwk": "0xEAFF", + "manufacturer": "_TZE200_rtrmfadk", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rtrmfadk", + "friendly_model": "TS0601", + "name": "_TZE200_rtrmfadk TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.268002+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_rtrmfadk" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:28:28:8c:ab-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:28:8c:ab:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:28:8c:ab", + "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:28:28:8c:ab-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:28:8c:ab:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:28:8c:ab", + "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:28:28:8c:ab-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:28:8c:ab:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:28:28:8c:ab", + "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-rxq4iti9-ts0601.json b/tests/data/devices/tze200-rxq4iti9-ts0601.json new file mode 100644 index 000000000..bb877d52d --- /dev/null +++ b/tests/data/devices/tze200-rxq4iti9-ts0601.json @@ -0,0 +1,912 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:44:6e:72:22", + "nwk": "0x9CB4", + "manufacturer": "_TZE200_rxq4iti9", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_rxq4iti9", + "friendly_model": "TS0601", + "name": "_TZE200_rxq4iti9 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:34.652864+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": [] + }, + { + "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": "0x000d", + "endpoint_attribute": "analog_output", + "attributes": [ + { + "id": "0x0100", + "name": "application_type", + "zcl_type": "uint32", + "value": 9 + }, + { + "id": "0x001c", + "name": "description", + "zcl_type": "string", + "value": "Temperature Offset" + }, + { + "id": "0x0075", + "name": "engineering_units", + "zcl_type": "enum16", + "value": 62 + }, + { + "id": "0x0041", + "name": "max_present_value", + "zcl_type": "single", + "value": 6 + }, + { + "id": "0x0045", + "name": "min_present_value", + "zcl_type": "single", + "value": -6 + }, + { + "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 + } + ] + }, + { + "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": 3000 + }, + { + "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": "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", + "unsupported": true + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "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": "0x0032", + "name": "setpoint_change_source_timestamp", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x001c", + "name": "system_mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0013", + "name": "unoccupied_cooling_setpoint", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x0014", + "name": "unoccupied_heating_setpoint", + "zcl_type": "int16", + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Error or battery low", + "unique_id": "ab:cd:ef:12:44:6e:72:22-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:44:6e:72:22:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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": "TuyaThermostatV2", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:44:6e:72:22:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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": "Temperature Offset", + "unique_id": "ab:cd:ef:12:44:6e:72:22-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:44:6e:72:22:1:0x000d", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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": "AnalogOutputNumber", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:44:6e:72:22-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:44:6e:72:22:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72: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:44:6e:72:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72: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:44:6e:72:22:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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:44:6e:72:22:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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:44:6e:72:22:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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:44:6e:72:22:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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:44:6e:72:22:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72:22-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:44:6e:72:22:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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:44:6e:72: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:44:6e:72:22:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:6e:72:22", + "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-s6hzw8g2-ts0601.json b/tests/data/devices/tze200-s6hzw8g2-ts0601.json new file mode 100644 index 000000000..091d8a985 --- /dev/null +++ b/tests/data/devices/tze200-s6hzw8g2-ts0601.json @@ -0,0 +1,237 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:2e:e7:1e:19", + "nwk": "0xDBA8", + "manufacturer": "_TZE200_s6hzw8g2", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_s6hzw8g2", + "friendly_model": "TS0601", + "name": "_TZE200_s6hzw8g2 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.518110+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_s6hzw8g2" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:2e:e7:1e:19-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:2e:e7:1e:19:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:e7:1e:19", + "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:2e:e7:1e:19-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:2e:e7:1e:19:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:e7:1e:19", + "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:2e:e7:1e:19-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:2e:e7:1e:19:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:2e:e7:1e:19", + "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-t1blo2bj-ts0601.json b/tests/data/devices/tze200-t1blo2bj-ts0601.json new file mode 100644 index 000000000..4f787d037 --- /dev/null +++ b/tests/data/devices/tze200-t1blo2bj-ts0601.json @@ -0,0 +1,530 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7b:12:28:a9", + "nwk": "0x42B7", + "manufacturer": "_TZE200_t1blo2bj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_t1blo2bj", + "friendly_model": "TS0601", + "name": "_TZE200_t1blo2bj TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.179924+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_WARNING_DEVICE", + "id": 1027 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 70 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0006", + "endpoint_attribute": "on_off", + "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": [] + } + ] + }, + "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": { + "number": [ + { + "info_object": { + "fallback_name": "Alarm duration", + "unique_id": "ab:cd:ef:12:7b:12:28:a9-1-alarm_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_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:7b:12:28:a9:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1800, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Alarm ringtone", + "unique_id": "ab:cd:ef:12:7b:12:28:a9-1-alarm_ringtone", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_ringtone", + "translation_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:7b:12:28:a9:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "NeoAlarmMelody18", + "options": [ + "Melody 01", + "Melody 02", + "Melody 03", + "Melody 04", + "Melody 05", + "Melody 06", + "Melody 07", + "Melody 08", + "Melody 09", + "Melody 10", + "Melody 11", + "Melody 12", + "Melody 13", + "Melody 14", + "Melody 15", + "Melody 16", + "Melody 17", + "Melody 18" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm volume", + "unique_id": "ab:cd:ef:12:7b:12:28:a9-1-alarm_volume", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_volume", + "translation_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:7b:12:28:a9:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "NeoAlarmVolume", + "options": [ + "Low", + "Medium", + "High" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:12:28:a9-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:12:28:a9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "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:12:28:a9-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:12:28:a9:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "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:7b:12:28:a9-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:7b:12:28:a9:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": "Siren on", + "unique_id": "ab:cd:ef:12:7b:12:28:a9-1-siren_on", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "siren_on", + "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:7b:12:28:a9:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "siren_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:7b:12:28:a9-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:12:28:a9:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:12:28:a9", + "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-t6gq6nju-ts0601.json b/tests/data/devices/tze200-t6gq6nju-ts0601.json new file mode 100644 index 000000000..ef338fb50 --- /dev/null +++ b/tests/data/devices/tze200-t6gq6nju-ts0601.json @@ -0,0 +1,318 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e3:0b:62:5b", + "nwk": "0x9BBE", + "manufacturer": "_TZE200_t6gq6nju", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_t6gq6nju", + "friendly_model": "TS0601", + "name": "_TZE200_t6gq6nju TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.458619+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": "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": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0010", + "name": "location_desc", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_t6gq6nju" + }, + { + "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": "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 + } + ] + }, + { + "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": [] + } + ] + }, + "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:e3:0b:62: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:e3:0b:62:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:0b:62: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:e3:0b:62: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:e3:0b:62:5b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:0b:62:5b", + "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:e3:0b:62: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:e3:0b:62:5b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:0b:62:5b", + "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-v1jqz5cy-ts0601.json b/tests/data/devices/tze200-v1jqz5cy-ts0601.json new file mode 100644 index 000000000..a18892f04 --- /dev/null +++ b/tests/data/devices/tze200-v1jqz5cy-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a4:97:18:07", + "nwk": "0x1CF3", + "manufacturer": "_TZE200_v1jqz5cy", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_v1jqz5cy", + "friendly_model": "TS0601", + "name": "_TZE200_v1jqz5cy TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.836532+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_v1jqz5cy" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a4:97:18:07-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:a4:97:18:07:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:97:18:07", + "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:a4:97:18:07-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:a4:97:18:07:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:97:18:07", + "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:a4:97:18:07-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:a4:97:18:07:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a4:97:18:07", + "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-v9hkz2yn-ts0601.json b/tests/data/devices/tze200-v9hkz2yn-ts0601.json new file mode 100644 index 000000000..15705f4cd --- /dev/null +++ b/tests/data/devices/tze200-v9hkz2yn-ts0601.json @@ -0,0 +1,1054 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "nwk": "0x11C2", + "manufacturer": "_TZE200_v9hkz2yn", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_v9hkz2yn", + "friendly_model": "TS0601", + "name": "_TZE200_v9hkz2yn TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.918149+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_v9hkz2yn" + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 2164 + }, + { + "id": "0x0001", + "name": "current_summ_received", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0304", + "name": "demand_formatting", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0302", + "name": "divisor", + "zcl_type": "uint24", + "value": 1000 + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0301", + "name": "multiplier", + "zcl_type": "uint24", + "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", + "value": 10 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 35 + }, + { + "id": "0x050d", + "name": "active_power_max", + "zcl_type": "int16", + "unsupported": true + }, + { + "id": "0x090b", + "name": "active_power_ph_b", + "zcl_type": "int16", + "value": 42 + }, + { + "id": "0x0a0b", + "name": "active_power_ph_c", + "zcl_type": "int16", + "value": 26 + }, + { + "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": 368 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0908", + "name": "rms_current_ph_b", + "zcl_type": "uint16", + "value": 758 + }, + { + "id": "0x0a08", + "name": "rms_current_ph_c", + "zcl_type": "uint16", + "value": 301 + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 2431 + }, + { + "id": "0x0507", + "name": "rms_voltage_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0905", + "name": "rms_voltage_ph_b", + "zcl_type": "uint16", + "value": 2416 + }, + { + "id": "0x0a05", + "name": "rms_voltage_ph_c", + "zcl_type": "uint16", + "value": 2417 + } + ] + }, + { + "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:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "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:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "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:f7:c5:4c:1d-1-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": 1, + "cluster": { + "id": 1794, + "name": "Metering", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "SmartEnergyMetering", + "available": true, + "state": null, + "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:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 2.164, + "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:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummationReceived", + "available": true, + "state": 0.0, + "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:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 35.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-active_power_ph_b", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementActivePowerPhB", + "translation_key": "active_power_ph_b", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementActivePowerPhB", + "available": true, + "state": 42.0 + }, + "extra_state_attributes": [ + "active_power_max_ph_b", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-active_power_ph_c", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementActivePowerPhC", + "translation_key": "active_power_ph_c", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "ElectricalMeasurementActivePowerPhC", + "available": true, + "state": 26.0 + }, + "extra_state_attributes": [ + "active_power_max_ph_c", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrent", + "available": true, + "state": 0.368 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-rms_current_ph_b", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrentPhB", + "translation_key": "rms_current_ph_b", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrentPhB", + "available": true, + "state": 0.758 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max_ph_b" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-rms_current_ph_c", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSCurrentPhC", + "translation_key": "rms_current_ph_c", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "A" + }, + "state": { + "class_name": "ElectricalMeasurementRMSCurrentPhC", + "available": true, + "state": 0.301 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_current_max_ph_c" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 243.1 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-rms_voltage_ph_b", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltagePhB", + "translation_key": "rms_voltage_ph_b", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltagePhB", + "available": true, + "state": 241.6 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max_ph_b" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-1-2820-rms_voltage_ph_c", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "ElectricalMeasurementRMSVoltagePhC", + "translation_key": "rms_voltage_ph_c", + "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:f7:c5:4c:1d:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltagePhC", + "available": true, + "state": 241.7 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max_ph_c" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f7:c5:4c:1d-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:f7:c5:4c:1d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f7:c5:4c:1d", + "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-vdiuwbkq-ts0601.json b/tests/data/devices/tze200-vdiuwbkq-ts0601.json new file mode 100644 index 000000000..30384c18c --- /dev/null +++ b/tests/data/devices/tze200-vdiuwbkq-ts0601.json @@ -0,0 +1,441 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6c:37:b4:92", + "nwk": "0x4479", + "manufacturer": "_TZE200_vdiuwbkq", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_vdiuwbkq", + "friendly_model": "TS0601", + "name": "_TZE200_vdiuwbkq TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_cover.TuyaMoesCover0601", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.201783+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_vdiuwbkq" + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "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", + "unsupported": true + } + ] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_vdiuwbkq", + "TS0601" + ], + [ + "_TZE200_zah67ekd", + "TS0601" + ], + [ + "_TZE200_nueqqe6k", + "TS0601" + ], + [ + "_TZE200_gubdgai2", + "TS0601" + ], + [ + "_TZE200_5sbebbzs", + "TS0601" + ], + [ + "_TZE200_hsgrhjpf", + "TS0601" + ], + [ + "_TZE200_68nvbio9", + "TS0601" + ], + [ + "_TZE200_ergbiejo", + "TS0601" + ], + [ + "_TZE200_nhyj64w2", + "TS0601" + ], + [ + "_TZE200_cf1sl3tj", + "TS0601" + ], + [ + "_TZE200_7eue9vhc", + "TS0601" + ], + [ + "_TZE200_bv1jcqqu", + "TS0601" + ], + [ + "_TZE200_nw1r9hp6", + "TS0601" + ], + [ + "_TZE200_gaj531w3", + "TS0601" + ], + [ + "_TZE200_icka1clh", + "TS0601" + ], + [ + "_TZE200_1vxgqfba", + "TS0601" + ], + [ + "_TZE200_fctwhugx", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:37:b4:92-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": 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:6c:37:b4:92:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:6c:37:b4:92", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:6c:37:b4: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:6c:37:b4:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:37:b4: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:6c:37:b4: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:6c:37:b4:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:37:b4:92", + "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:6c:37:b4: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:6c:37:b4:92:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6c:37:b4:92", + "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-viy9ihs7-ts0601.json b/tests/data/devices/tze200-viy9ihs7-ts0601.json new file mode 100644 index 000000000..b14ad4ab7 --- /dev/null +++ b/tests/data/devices/tze200-viy9ihs7-ts0601.json @@ -0,0 +1,886 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:44:77:fc:02", + "nwk": "0xECFF", + "manufacturer": "_TZE200_viy9ihs7", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_viy9ihs7", + "friendly_model": "TS0601", + "name": "_TZE200_viy9ihs7 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.592021+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_viy9ihs7" + }, + { + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Fault alarm", + "unique_id": "ab:cd:ef:12:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "WorkingDayV01", + "options": [ + "Disabled", + "Six One", + "Five Two", + "Seven" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:44:77:fc:02-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:44:77:fc:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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:44:77:fc:02-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:44:77:fc:02:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:44:77:fc:02", + "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-vuqzj1ej-ts0601.json b/tests/data/devices/tze200-vuqzj1ej-ts0601.json new file mode 100644 index 000000000..2f81aa865 --- /dev/null +++ b/tests/data/devices/tze200-vuqzj1ej-ts0601.json @@ -0,0 +1,547 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:29:18:c5:bf", + "nwk": "0x7135", + "manufacturer": "_TZE200_vuqzj1ej", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_vuqzj1ej", + "friendly_model": "TS0601", + "name": "_TZE200_vuqzj1ej TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4742, + "power_source": "Battery or Unknown", + "lqi": 216, + "rssi": -46, + "last_seen": "2025-11-15T20:20:57.053078+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_vuqzj1ej" + }, + { + "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": "0x0400", + "endpoint_attribute": "illuminance", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 25983 + } + ] + }, + { + "cluster_id": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2410 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 6550 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": "7c:c6:b6:ff:fe:c9:b8:d4" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:29:18:c5:bf-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:29:18:c5:bf:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "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:29:18:c5: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:29:18:c5:bf:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5: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:29:18:c5: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:29:18:c5:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "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:29:18:c5: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:29:18:c5:bf:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -46 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:29:18:c5: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:29:18:c5:bf:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5: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": 3.0 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:29:18:c5:bf-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:29:18:c5:bf:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "lx" + }, + "state": { + "class_name": "Illuminance", + "available": true, + "state": 396 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:29:18:c5: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": 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:29:18:c5:bf:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 24.1 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:29:18:c5:bf-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:29:18:c5:bf:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:29:18:c5:bf", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 65.5 + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file diff --git a/tests/data/devices/tze200-wktrysab-ts0601.json b/tests/data/devices/tze200-wktrysab-ts0601.json new file mode 100644 index 000000000..410524be6 --- /dev/null +++ b/tests/data/devices/tze200-wktrysab-ts0601.json @@ -0,0 +1,1002 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:69:86:20:44", + "nwk": "0xA74E", + "manufacturer": "_TZE200_wktrysab", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_wktrysab", + "friendly_model": "TS0601", + "name": "_TZE200_wktrysab TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.661803+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 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_wktrysab" + }, + { + "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", + "value": 1 + }, + { + "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": [] + } + ] + }, + "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", + "value": 1 + }, + { + "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", + "value": 1 + }, + { + "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", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "5": { + "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", + "value": 0 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "6": { + "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", + "value": 1 + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "7": { + "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": [] + }, + "8": { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:86:20:44-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:69:86:20:44:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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:69:86:20:44-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:69:86:20:44:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:86:20:44-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:69:86:20:44:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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": 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:69:86:20:44-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:69:86:20:44:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:69:86:20:44-5", + "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": 5, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "5:0x0006", + "unique_id": "ab:cd:ef:12:69:86:20:44:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "endpoint_id": 5, + "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:69:86:20:44-6", + "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": 6, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "6:0x0006", + "unique_id": "ab:cd:ef:12:69:86:20:44:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "endpoint_id": 6, + "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:69:86:20:44-7", + "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": 7, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "7:0x0006", + "unique_id": "ab:cd:ef:12:69:86:20:44:7:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "endpoint_id": 7, + "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:69:86:20:44-8", + "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": 8, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "8:0x0006", + "unique_id": "ab:cd:ef:12:69:86:20:44:8:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "endpoint_id": 8, + "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:69:86:20: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:69:86:20:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20: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:69:86:20: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:69:86:20:44:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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:69:86:20: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:69:86:20:44:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:69:86:20:44", + "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-xu4a5rhj-ts0601.json b/tests/data/devices/tze200-xu4a5rhj-ts0601.json new file mode 100644 index 000000000..7721b4a93 --- /dev/null +++ b/tests/data/devices/tze200-xu4a5rhj-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c1:14:90:9a", + "nwk": "0x8323", + "manufacturer": "_TZE200_xu4a5rhj", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_xu4a5rhj", + "friendly_model": "TS0601", + "name": "_TZE200_xu4a5rhj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.790343+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_xu4a5rhj" + }, + { + "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": [] + } + ] + }, + "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:c1:14:90: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:c1:14:90:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:14:90: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:c1:14:90: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:c1:14:90:9a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:14:90:9a", + "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:c1:14:90: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:c1:14:90:9a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:14:90:9a", + "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-yia0p3tr-ts0601.json b/tests/data/devices/tze200-yia0p3tr-ts0601.json new file mode 100644 index 000000000..9c5edfffd --- /dev/null +++ b/tests/data/devices/tze200-yia0p3tr-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:54:b9:8f:58", + "nwk": "0x1C6E", + "manufacturer": "_TZE200_yia0p3tr", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_yia0p3tr", + "friendly_model": "TS0601", + "name": "_TZE200_yia0p3tr TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.057386+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_yia0p3tr" + }, + { + "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:54:b9:8f:58-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:54:b9:8f:58:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:b9:8f:58", + "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:54:b9:8f:58-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:54:b9:8f:58:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:b9:8f:58", + "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:54:b9:8f:58-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:54:b9:8f:58:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:54:b9:8f:58", + "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-yojqa8xn-ts0601.json b/tests/data/devices/tze200-yojqa8xn-ts0601.json new file mode 100644 index 000000000..9207ce822 --- /dev/null +++ b/tests/data/devices/tze200-yojqa8xn-ts0601.json @@ -0,0 +1,641 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:22:ef:46:1f", + "nwk": "0x9173", + "manufacturer": "_TZE200_yojqa8xn", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_yojqa8xn", + "friendly_model": "TS0601", + "name": "_TZE200_yojqa8xn TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.702991+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_yojqa8xn" + }, + { + "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": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 549 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:ef:46:1f-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:22:ef:46:1f:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Preheat active", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-preheat_active", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "preheat_active", + "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:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "preheat_active" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Silence alarm", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-silence_alarm", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "silence_alarm", + "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:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "silence_alarm" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Alarm duration", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-alarm_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_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:22:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "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 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Alarm ringtone", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-alarm_ringtone", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_ringtone", + "translation_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:22:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaSirenRingtone", + "options": [ + "Ringtone 01", + "Ringtone 02", + "Ringtone 03", + "Ringtone 04", + "Ringtone 05" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:22:ef:46: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:22:ef:46:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "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:ef:46: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:22:ef:46:1f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "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": "% Lower explosive limit", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-lower_explosive_limit", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "lower_explosive_limit", + "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:22:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%LEL" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-self_test", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test", + "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:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "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": "Self test", + "unique_id": "ab:cd:ef:12:22:ef:46:1f-1-self_test_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "self_test_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:22:ef:46:1f:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "self_test_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:22:ef:46: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:22:ef:46:1f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:22:ef:46:1f", + "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-yvx5lh6k-ts0601.json b/tests/data/devices/tze200-yvx5lh6k-ts0601.json new file mode 100644 index 000000000..857dc813b --- /dev/null +++ b/tests/data/devices/tze200-yvx5lh6k-ts0601.json @@ -0,0 +1,399 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d5:91:a5:45", + "nwk": "0x920A", + "manufacturer": "_TZE200_yvx5lh6k", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_yvx5lh6k", + "friendly_model": "TS0601", + "name": "_TZE200_yvx5lh6k TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.096143+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": "_TZE200_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": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x040d", + "endpoint_attribute": "carbon_dioxide_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x042a", + "endpoint_attribute": "pm25", + "attributes": [] + }, + { + "cluster_id": "0x042b", + "endpoint_attribute": "formaldehyde_concentration", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "single", + "unsupported": true + } + ] + }, + { + "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": [] + } + ] + }, + "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:d5:91:a5: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:d5:91:a5:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:91:a5:45", + "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:d5:91:a5: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:d5:91:a5:45:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:91:a5:45", + "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:d5:91:a5:45-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:d5:91:a5:45:1:0x042a", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:d5:91:a5:45", + "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:d5:91:a5:45-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:d5:91:a5:45:1:0x042e", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:91:a5:45", + "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:d5:91:a5: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:d5:91:a5:45:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d5:91:a5: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/tze200-ztvwu4nk-ts0601.json b/tests/data/devices/tze200-ztvwu4nk-ts0601.json new file mode 100644 index 000000000..b4cd01adb --- /dev/null +++ b/tests/data/devices/tze200-ztvwu4nk-ts0601.json @@ -0,0 +1,243 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:4f:5e:45:8e", + "nwk": "0x2EF1", + "manufacturer": "_TZE200_ztvwu4nk", + "model": "TS0601", + "friendly_manufacturer": "_TZE200_ztvwu4nk", + "friendly_model": "TS0601", + "name": "_TZE200_ztvwu4nk TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.439303+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE200_ztvwu4nk" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:4f:5e:45:8e-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:5e:45:8e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:5e:45:8e", + "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:5e:45:8e-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:5e:45:8e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:5e:45:8e", + "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:5e:45:8e-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:5e:45:8e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:4f:5e:45:8e", + "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-1fuxihti-ts0601.json b/tests/data/devices/tze204-1fuxihti-ts0601.json new file mode 100644 index 000000000..e0ac5b275 --- /dev/null +++ b/tests/data/devices/tze204-1fuxihti-ts0601.json @@ -0,0 +1,369 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cc:1a:bc:50", + "nwk": "0xE150", + "manufacturer": "_TZE204_1fuxihti", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_1fuxihti", + "friendly_model": "TS0601", + "name": "_TZE204_1fuxihti TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:25.275705+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_1fuxihti" + }, + { + "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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0009", + "name": "current_position_tilt_percentage", + "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": [] + } + ] + }, + "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": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:1a:bc:50-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": 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:cc:1a:bc:50:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:cc:1a:bc:50", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:1a:bc: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:cc:1a:bc:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:1a:bc:50", + "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:cc:1a:bc: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:cc:1a:bc:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:1a:bc: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:cc:1a:bc:50-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:cc:1a:bc:50:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:cc:1a:bc:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:cc:1a:bc: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:cc:1a:bc:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:1a:bc:50", + "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-4fblxpma-ts0601.json b/tests/data/devices/tze204-4fblxpma-ts0601.json new file mode 100644 index 000000000..f4de8142f --- /dev/null +++ b/tests/data/devices/tze204-4fblxpma-ts0601.json @@ -0,0 +1,456 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:f4:04:0c:92", + "nwk": "0xD6F2", + "manufacturer": "_TZE204_4fblxpma", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_4fblxpma", + "friendly_model": "TS0601", + "name": "_TZE204_4fblxpma TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.760520+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 + } + ] + }, + { + "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", + "unsupported": true + }, + { + "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", + "unsupported": true + }, + { + "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": 2 + }, + { + "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": 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": 73 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:f4:04:0c: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:f4:04:0c:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:04:0c: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:f4:04:0c: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:f4:04:0c:92:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:04:0c: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:f4:04:0c:92-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:f4:04:0c:92:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:f4:04:0c:92", + "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:f4:04:0c: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:f4:04:0c:92:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:f4:04:0c:92", + "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:f4:04:0c: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:f4:04:0c:92:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:f4:04:0c:92", + "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-5toc8efa-ts0601.json b/tests/data/devices/tze204-5toc8efa-ts0601.json new file mode 100644 index 000000000..a3be27dea --- /dev/null +++ b/tests/data/devices/tze204-5toc8efa-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:88:70:df:86", + "nwk": "0xA4DE", + "manufacturer": "_TZE204_5toc8efa", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_5toc8efa", + "friendly_model": "TS0601", + "name": "_TZE204_5toc8efa TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.191328+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_5toc8efa" + }, + { + "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": [] + } + ] + }, + "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:88:70:df: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:88:70:df:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:70:df: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:88:70:df: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:88:70:df:86:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:70:df: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:88:70:df: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:88:70:df:86:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:88:70:df:86", + "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-7ytb3h8u-ts0601.json b/tests/data/devices/tze204-7ytb3h8u-ts0601.json new file mode 100644 index 000000000..c5e5dbb62 --- /dev/null +++ b/tests/data/devices/tze204-7ytb3h8u-ts0601.json @@ -0,0 +1,939 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:66:5d:86:4a", + "nwk": "0x3979", + "manufacturer": "_TZE204_7ytb3h8u", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_7ytb3h8u", + "friendly_model": "TS0601", + "name": "_TZE204_7ytb3h8u TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:56.349389+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": "0x0013", + "name": "alarm_mask", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_7ytb3h8u" + }, + { + "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": 160 + }, + { + "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": "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0020", + "name": "active_register_tier_delivered", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0019", + "name": "control_temperature", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 0 + }, + { + "id": "0x0400", + "name": "instantaneous_demand", + "zcl_type": "int24", + "unsupported": true + }, + { + "id": "0x0306", + "name": "metering_device_type", + "zcl_type": "map8", + "value": 2 + }, + { + "id": "0x0205", + "name": "remaining_battery_life_days", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0300", + "name": "unit_of_measure", + "zcl_type": "enum8", + "value": 7 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef67", + "name": "irrigation_cycles", + "zcl_type": "uint8", + "value": 0 + }, + { + "id": "0xef72", + "name": "irrigation_duration", + "zcl_type": "uint32", + "value": "00:00:06,0" + }, + { + "id": "0xef66", + "name": "irrigation_end_time", + "zcl_type": "string", + "value": "13:53:19" + }, + { + "id": "0xef69", + "name": "irrigation_interval", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0xef01", + "name": "irrigation_mode", + "zcl_type": "bool", + "value": 0 + }, + { + "id": "0xef65", + "name": "irrigation_start_time", + "zcl_type": "string", + "value": "13:53:13" + }, + { + "id": "0xef68", + "name": "irrigation_target", + "zcl_type": "uint32", + "value": 0 + }, + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.0" + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "number": [ + { + "info_object": { + "fallback_name": "Irrigation cycles", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_cycles", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_cycles", + "translation_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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "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": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Irrigation interval", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_interval", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_interval", + "translation_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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 43200, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + }, + { + "info_object": { + "fallback_name": "Irrigation target", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_target", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "irrigation_target", + "translation_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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 43200, + "native_min_value": 0, + "native_step": 1, + "native_unit_of_measurement": null + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": 0 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Irrigation mode", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "irrigation_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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "GiexIrrigationMode", + "options": [ + "Duration", + "Capacity" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": "Duration" + } + }, + { + "info_object": { + "fallback_name": "Weather delay", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-weather_delay", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "weather_delay", + "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": "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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "GiexIrrigationWeatherDelay", + "options": [ + "NoDelay", + "TwentyFourHourDelay", + "FortyEightHourDelay", + "SeventyTwoHourDelay" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:5d:86:4a-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:5d:86:4a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "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:5d:86:4a-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:5d:86:4a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "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:5d:86:4a-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:5d:86:4a:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": 80.0, + "battery_size": "AA", + "battery_quantity": 4 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:5d:86:4a-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": "TuyaValveWaterConsumedNoInstDemand", + "type": "server" + }, + "id": "1:0x0702", + "unique_id": "ab:cd:ef:12:66:5d:86:4a:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "L" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.0, + "device_type": "Water Metering", + "zcl_unit_of_measurement": 7 + }, + "extra_state_attributes": [ + "device_type", + "status", + "zcl_unit_of_measurement" + ] + }, + { + "info_object": { + "fallback_name": "Irrigation duration", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_duration", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_duration", + "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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "s" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "00:00:06,0" + } + }, + { + "info_object": { + "fallback_name": "Irrigation end time", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_end_time", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_end_time", + "translation_placeholders": null, + "device_class": "timestamp", + "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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "13:53:19" + } + }, + { + "info_object": { + "fallback_name": "Irrigation start time", + "unique_id": "ab:cd:ef:12:66:5d:86:4a-1-irrigation_start_time", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "irrigation_start_time", + "translation_placeholders": null, + "device_class": "timestamp", + "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:66:5d:86:4a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": "13:53:13" + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:66:5d:86:4a-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:66:5d:86:4a:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "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:66:5d:86:4a-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:5d:86:4a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:66:5d:86:4a", + "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-9yapgbuv-ts0601.json b/tests/data/devices/tze204-9yapgbuv-ts0601.json new file mode 100644 index 000000000..8d63e68b5 --- /dev/null +++ b/tests/data/devices/tze204-9yapgbuv-ts0601.json @@ -0,0 +1,466 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:3f:d8:c2:76", + "nwk": "0x1E96", + "manufacturer": "_TZE204_9yapgbuv", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_9yapgbuv", + "friendly_model": "TS0601", + "name": "_TZE204_9yapgbuv TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.512246+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_9yapgbuv" + }, + { + "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": "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": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:3f:d8:c2:76-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:3f:d8:c2:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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:3f:d8:c2:76-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:3f:d8:c2:76:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:3f:d8:c2:76", + "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-bkkmqmyo-ts0601.json b/tests/data/devices/tze204-bkkmqmyo-ts0601.json new file mode 100644 index 000000000..39d7bf97b --- /dev/null +++ b/tests/data/devices/tze204-bkkmqmyo-ts0601.json @@ -0,0 +1,881 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:83:e9:5e:8c", + "nwk": "0x442E", + "manufacturer": "_TZE204_bkkmqmyo", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_bkkmqmyo", + "friendly_model": "TS0601", + "name": "_TZE204_bkkmqmyo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.033573+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_bkkmqmyo" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + } + ] + }, + { + "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": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "value": 80 + }, + { + "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": 1000 + }, + { + "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": 4997 + }, + { + "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", + "value": 10 + }, + { + "id": "0x0600", + "name": "ac_voltage_multiplier", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x050b", + "name": "active_power", + "zcl_type": "int16", + "value": 10 + }, + { + "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", + "value": 372 + }, + { + "id": "0x0402", + "name": "power_multiplier", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x050e", + "name": "reactive_power", + "zcl_type": "int16", + "value": 22 + }, + { + "id": "0x050a", + "name": "rms_current_max", + "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": "0x0305", + "name": "total_reactive_power", + "zcl_type": "int32", + "value": 50 + } + ] + }, + { + "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:83:e9:5e:8c-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:e9:5e:8c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "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:83:e9:5e:8c-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:e9:5e:8c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "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:e9:5e:8c-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:e9:5e:8c:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummation", + "available": true, + "state": 0.08, + "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:e9:5e:8c-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:83:e9:5e:8c:1:0x0702", + "status": "INITIALIZED", + "value_attribute": "instantaneous_demand" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 3, + "unit": "kWh" + }, + "state": { + "class_name": "SmartEnergySummationReceived", + "available": true, + "state": 0.0, + "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:e9:5e:8c-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:e9:5e:8c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "W" + }, + "state": { + "class_name": "PolledElectricalMeasurement", + "available": true, + "state": 10.0 + }, + "extra_state_attributes": [ + "active_power_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:e9:5e:8c-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:83:e9:5e:8c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "Hz" + }, + "state": { + "class_name": "ElectricalMeasurementFrequency", + "available": true, + "state": 49.97 + }, + "extra_state_attributes": [ + "ac_frequency_max", + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:e9:5e:8c-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:83:e9:5e:8c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "%" + }, + "state": { + "class_name": "ElectricalMeasurementPowerFactor", + "available": true, + "state": 372 + }, + "extra_state_attributes": [ + "measurement_type" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:e9:5e:8c-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:83:e9:5e:8c:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "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" + ] + } + ], + "switch": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:83:e9:5e:8c-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:83:e9:5e:8c:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "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:83:e9:5e:8c-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:e9:5e:8c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", + "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-bxoo2swd-ts0601.json b/tests/data/devices/tze204-bxoo2swd-ts0601.json new file mode 100644 index 000000000..9a134c9f3 --- /dev/null +++ b/tests/data/devices/tze204-bxoo2swd-ts0601.json @@ -0,0 +1,491 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ba:5e:9c:07", + "nwk": "0x9318", + "manufacturer": "_TZE204_bxoo2swd", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_bxoo2swd", + "friendly_model": "TS0601", + "name": "_TZE204_bxoo2swd TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaDoubleSwitchDimmer", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.565073+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_LIGHT", + "id": 256 + }, + "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": "_TZE204_bxoo2swd" + }, + { + "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": [] + } + ] + }, + "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": [] + } + }, + "original_signature": { + "models_info": [ + [ + "_TZE200_e3oitdyu", + "TS0601" + ], + [ + "_TZE204_bxoo2swd", + "TS0601" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0051", + "input_clusters": [ + "0x0000", + "0x0004", + "0x0005", + "0xef00" + ], + "output_clusters": [ + "0x000a", + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:5e:9c:07-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:ba:5e:9c:07: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:5e:9c:07:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:5e:9c:07", + "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:ba:5e:9c:07-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:ba:5e:9c:07: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:ba:5e:9c:07:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:ba:5e:9c:07", + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:ba:5e:9c:07-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:5e:9c:07:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:5e:9c:07", + "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:5e:9c:07-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:5e:9c:07:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:5e:9c:07", + "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:5e:9c:07-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:5e:9c:07:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ba:5e:9c:07", + "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-chbyv06x-ts0601.json b/tests/data/devices/tze204-chbyv06x-ts0601.json new file mode 100644 index 000000000..9fa78f7f3 --- /dev/null +++ b/tests/data/devices/tze204-chbyv06x-ts0601.json @@ -0,0 +1,641 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:85:7c:cd:63", + "nwk": "0x069D", + "manufacturer": "_TZE204_chbyv06x", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_chbyv06x", + "friendly_model": "TS0601", + "name": "_TZE204_chbyv06x TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.179536+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_chbyv06x" + }, + { + "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": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 549 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:7c:cd:63-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:85:7c:cd:63:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Preheat active", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-preheat_active", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "preheat_active", + "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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "preheat_active" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Silence alarm", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-silence_alarm", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "silence_alarm", + "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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "silence_alarm" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Alarm duration", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-alarm_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "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 + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Alarm ringtone", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-alarm_ringtone", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_ringtone", + "translation_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:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaSirenRingtone", + "options": [ + "Ringtone 01", + "Ringtone 02", + "Ringtone 03", + "Ringtone 04", + "Ringtone 05" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:85:7c:cd:63-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:7c:cd:63:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "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:7c:cd:63-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:7c:cd:63:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "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": "% Lower explosive limit", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-lower_explosive_limit", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "lower_explosive_limit", + "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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%LEL" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-self_test", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test", + "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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "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": "Self test", + "unique_id": "ab:cd:ef:12:85:7c:cd:63-1-self_test_switch", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "self_test_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:85:7c:cd:63:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "self_test_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:85:7c:cd:63-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:7c:cd:63:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:85:7c:cd:63", + "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-cirvgep4-ts0601.json b/tests/data/devices/tze204-cirvgep4-ts0601.json new file mode 100644 index 000000000..84e159a54 --- /dev/null +++ b/tests/data/devices/tze204-cirvgep4-ts0601.json @@ -0,0 +1,491 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:46:04:97:a0", + "nwk": "0xCFC5", + "manufacturer": "_TZE204_cirvgep4", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_cirvgep4", + "friendly_model": "TS0601", + "name": "_TZE204_cirvgep4 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.753325+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_cirvgep4" + }, + { + "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": [] + } + ], + "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": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:46:04:97:a0-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:46:04:97:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97:a0", + "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:46:04:97: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:46:04:97:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97: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:46:04:97: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:46:04:97:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97: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:46:04:97:a0-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:46:04:97:a0:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97:a0", + "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:46:04:97: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:46:04:97:a0:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97:a0", + "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:46:04:97: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:46:04:97:a0:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97:a0", + "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:46:04:97: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:46:04:97:a0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:46:04:97:a0", + "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-cjbofhxw-ts0601.json b/tests/data/devices/tze204-cjbofhxw-ts0601.json new file mode 100644 index 000000000..75a991310 --- /dev/null +++ b/tests/data/devices/tze204-cjbofhxw-ts0601.json @@ -0,0 +1,532 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5e:f5:c9:72", + "nwk": "0x3DA7", + "manufacturer": "_TZE204_cjbofhxw", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_cjbofhxw", + "friendly_model": "TS0601", + "name": "_TZE204_cjbofhxw TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.739529+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_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": "0x0702", + "endpoint_attribute": "smartenergy_metering", + "attributes": [ + { + "id": "0x0000", + "name": "current_summ_delivered", + "zcl_type": "uint48", + "unsupported": true + }, + { + "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", + "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", + "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", + "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", + "unsupported": true + }, + { + "id": "0x050a", + "name": "rms_current_max", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0505", + "name": "rms_voltage", + "zcl_type": "uint16", + "value": 122 + }, + { + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:f5:c9:72-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:5e:f5:c9:72:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:f5:c9:72", + "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:5e:f5:c9:72-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:5e:f5:c9:72:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:f5:c9:72", + "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:5e:f5:c9:72-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:5e:f5:c9:72:1:0x0b04", + "status": "INITIALIZED", + "value_attribute": "ac_voltage_multiplier" + } + ], + "device_ieee": "ab:cd:ef:12:5e:f5:c9:72", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 1, + "unit": "V" + }, + "state": { + "class_name": "ElectricalMeasurementRMSVoltage", + "available": true, + "state": 122.0 + }, + "extra_state_attributes": [ + "measurement_type", + "rms_voltage_max" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5e:f5:c9:72-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:5e:f5:c9:72:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:f5:c9:72", + "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-dqolcpcp-ts0601.json b/tests/data/devices/tze204-dqolcpcp-ts0601.json new file mode 100644 index 000000000..a1e7fdbd8 --- /dev/null +++ b/tests/data/devices/tze204-dqolcpcp-ts0601.json @@ -0,0 +1,1183 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d2:57:29:bb", + "nwk": "0x67FC", + "manufacturer": "_TZE204_dqolcpcp", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_dqolcpcp", + "friendly_model": "TS0601", + "name": "_TZE204_dqolcpcp TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaSwitchX12GP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.709898+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": "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": "0x0008", + "name": "generic_device_class", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_dqolcpcp" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0002", + "name": "current_group", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x0004", + "name": "name_support", + "zcl_type": "map8", + "value": 0 + } + ] + }, + { + "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": [] + } + ] + }, + "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", + "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_SWITCH", + "id": 0 + }, + "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_SWITCH", + "id": 0 + }, + "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": [] + }, + "5": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "6": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "7": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "8": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "9": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "10": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "11": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "12": { + "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", + "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": [ + [ + "_TZE204_dqolcpcp", + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29: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:d2:57:29:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29: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:d2:57:29: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:d2:57:29:bb:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "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:57:29:bb-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:d2:57:29:bb:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "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:d2:57:29:bb-10-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": 10, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "10:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:10:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 10, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-11-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": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 11, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-12-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": 12, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "12:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:12:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 12, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "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:d2:57:29:bb-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:d2:57:29:bb:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 4, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 5, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 6, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-7-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": 7, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "7:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:7:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 7, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-8-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": 8, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "8:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:8:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 8, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d2:57:29:bb-9-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": 9, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "9:0x0006", + "unique_id": "ab:cd:ef:12:d2:57:29:bb:9:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "endpoint_id": 9, + "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:d2:57:29: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:d2:57:29:bb:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d2:57:29:bb", + "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-dtzziy1e-ts0601.json b/tests/data/devices/tze204-dtzziy1e-ts0601.json new file mode 100644 index 000000000..299e42652 --- /dev/null +++ b/tests/data/devices/tze204-dtzziy1e-ts0601.json @@ -0,0 +1,1058 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:39:6f:a3:20", + "nwk": "0x4EA2", + "manufacturer": "_TZE204_dtzziy1e", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_dtzziy1e", + "friendly_model": "TS0601", + "name": "_TZE204_dtzziy1e TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:59.382130+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_dtzziy1e" + }, + { + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:39:6f:a3:20-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:39:6f:a3:20:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:a3:20:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:6f:a3:20-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:a3:20:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:6f:a3:20-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:39:6f:a3:20:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:39:6f:a3:20:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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:39:6f:a3:20-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:a3:20:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:39:6f:a3:20", + "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-eekpf0ft-ts0601.json b/tests/data/devices/tze204-eekpf0ft-ts0601.json new file mode 100644 index 000000000..85d566e94 --- /dev/null +++ b/tests/data/devices/tze204-eekpf0ft-ts0601.json @@ -0,0 +1,274 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1f:0c:bc:56", + "nwk": "0x0C04", + "manufacturer": "_TZE204_eekpf0ft", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_eekpf0ft", + "friendly_model": "TS0601", + "name": "_TZE204_eekpf0ft TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -31, + "last_seen": "2025-10-06T16:45:10.980738+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": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_eekpf0ft" + }, + { + "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": "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 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1f:0c:bc: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:1f:0c:bc:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:0c:bc:56", + "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:1f:0c:bc: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:1f:0c:bc:56:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:0c:bc:56", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -31 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1f:0c:bc: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:1f:0c:bc:56:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1f:0c:bc:56", + "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-g2ki0ejr-ts0601.json b/tests/data/devices/tze204-g2ki0ejr-ts0601.json new file mode 100644 index 000000000..b774516ee --- /dev/null +++ b/tests/data/devices/tze204-g2ki0ejr-ts0601.json @@ -0,0 +1,237 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:47:a5:c0:28", + "nwk": "0xA335", + "manufacturer": "_TZE204_g2ki0ejr", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_g2ki0ejr", + "friendly_model": "TS0601", + "name": "_TZE204_g2ki0ejr TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.243059+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": "_TZE204_g2ki0ejr" + }, + { + "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": [] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:47:a5:c0:28-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:47:a5:c0:28:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:a5:c0:28", + "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:47:a5:c0:28-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:47:a5:c0:28:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:a5:c0:28", + "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:47:a5:c0:28-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:47:a5:c0:28:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:47:a5:c0:28", + "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-guvc7pdy-ts0601.json b/tests/data/devices/tze204-guvc7pdy-ts0601.json new file mode 100644 index 000000000..2679adca9 --- /dev/null +++ b/tests/data/devices/tze204-guvc7pdy-ts0601.json @@ -0,0 +1,374 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d4:fe:8a:21", + "nwk": "0xC208", + "manufacturer": "_TZE204_guvc7pdy", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_guvc7pdy", + "friendly_model": "TS0601", + "name": "_TZE204_guvc7pdy TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.002707+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": "WINDOW_COVERING_DEVICE", + "id": 514 + }, + "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_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": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [ + { + "id": "0x0007", + "name": "config_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0008", + "name": "current_position_lift_percentage", + "zcl_type": "uint8", + "unsupported": true + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "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": 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": { + "cover": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:fe:8a:21-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": 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:d4:fe:8a:21:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:d4:fe:8a:21", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Cover", + "available": true, + "current_position": null, + "current_tilt_position": null, + "state": null, + "is_opening": null, + "is_closing": null, + "is_closed": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d4:fe:8a: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:d4:fe:8a:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:fe:8a: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:d4:fe:8a: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:d4:fe:8a:21:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:fe:8a:21", + "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:d4:fe:8a: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:d4:fe:8a:21:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:fe:8a:21", + "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-hlx9tnzb-ts0601.json b/tests/data/devices/tze204-hlx9tnzb-ts0601.json new file mode 100644 index 000000000..2c1cc8cdc --- /dev/null +++ b/tests/data/devices/tze204-hlx9tnzb-ts0601.json @@ -0,0 +1,378 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:15:a1:f1:a8", + "nwk": "0x9FE6", + "manufacturer": "_TZE204_hlx9tnzb", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_hlx9tnzb", + "friendly_model": "TS0601", + "name": "_TZE204_hlx9tnzb TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.309439+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 + } + ] + }, + { + "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", + "unsupported": true + }, + { + "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": 2 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0007", + "name": "manufacturer_id", + "zcl_type": "uint16", + "value": 4417 + } + ] + } + ] + }, + "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": { + "light": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:15:a1:f1:a8-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:15:a1:f1:a8: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:15:a1:f1:a8:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:15:a1:f1:a8", + "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": 2, + "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:15:a1:f1: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:15:a1:f1:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:a1:f1:a8", + "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:15:a1:f1: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:15:a1:f1:a8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:a1:f1:a8", + "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:15:a1:f1:a8-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:a1:f1:a8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:15:a1:f1:a8", + "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-ijxvkhd0-ts0601.json b/tests/data/devices/tze204-ijxvkhd0-ts0601.json new file mode 100644 index 000000000..c21599954 --- /dev/null +++ b/tests/data/devices/tze204-ijxvkhd0-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:78:4c:6e:1d", + "nwk": "0xA7C0", + "manufacturer": "_TZE204_ijxvkhd0", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ijxvkhd0", + "friendly_model": "TS0601", + "name": "_TZE204_ijxvkhd0 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.168113+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_ijxvkhd0" + }, + { + "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": [] + } + ] + }, + "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:78:4c:6e:1d-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:78:4c:6e:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:78:4c:6e:1d", + "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:78:4c:6e:1d-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:78:4c:6e:1d:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:78:4c:6e:1d", + "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:78:4c:6e:1d-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:78:4c:6e:1d:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:78:4c:6e:1d", + "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-k7mfgaen-ts0601.json b/tests/data/devices/tze204-k7mfgaen-ts0601.json new file mode 100644 index 000000000..93ea86c00 --- /dev/null +++ b/tests/data/devices/tze204-k7mfgaen-ts0601.json @@ -0,0 +1,598 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:1d:f6:05:38", + "nwk": "0xE3FC", + "manufacturer": "_TZE204_k7mfgaen", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_k7mfgaen", + "friendly_model": "TS0601", + "name": "_TZE204_k7mfgaen TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.568017+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": "0x0012", + "name": "device_enabled", + "zcl_type": "bool", + "unsupported": true + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_k7mfgaen" + }, + { + "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": 1 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 2 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Charging", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-charge_state", + "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": "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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "charge_state" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Alarm duration", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-alarm_duration", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "alarm_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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 60, + "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": "Alarm mode", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-alarm_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaSirenState", + "options": [ + "Sound", + "Light", + "Sound and light", + "Normal" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm ringtone", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-alarm_ringtone", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_ringtone", + "translation_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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaSirenRingtoneV02", + "options": [ + "Ringtone 01", + "Ringtone 02", + "Ringtone 03", + "Ringtone 04", + "Ringtone 05", + "Ringtone 06", + "Ringtone 07", + "Ringtone 08", + "Door", + "Water", + "Temperature", + "Entered", + "Left" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Alarm volume", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-alarm_volume", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "alarm_volume", + "translation_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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "TuyaAlarmVolume", + "options": [ + "Low", + "Medium", + "High", + "Mute" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:1d:f6:05:38-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:1d:f6:05:38:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "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:1d:f6:05:38-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:1d:f6:05:38:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "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": "Siren on", + "unique_id": "ab:cd:ef:12:1d:f6:05:38-1-siren_on", + "migrate_unique_ids": [], + "platform": "switch", + "class_name": "ConfigurableAttributeSwitch", + "translation_key": "siren_on", + "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:1d:f6:05:38:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "siren_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:1d:f6:05:38-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:1d:f6:05:38:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:1d:f6:05:38", + "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-kobbcyum-ts0601.json b/tests/data/devices/tze204-kobbcyum-ts0601.json new file mode 100644 index 000000000..3e6319994 --- /dev/null +++ b/tests/data/devices/tze204-kobbcyum-ts0601.json @@ -0,0 +1,306 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5e:76:55:79", + "nwk": "0x5CDE", + "manufacturer": "_TZE204_kobbcyum", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_kobbcyum", + "friendly_model": "TS0601", + "name": "_TZE204_kobbcyum TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.610821+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_kobbcyum" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x0007", + "name": "power_source", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x000a", + "name": "product_code", + "zcl_type": "octstr", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "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 + } + ] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "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:5e:76:55:79-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:5e:76:55:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:76:55:79", + "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:5e:76:55:79-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:5e:76:55:79:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:76:55:79", + "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:5e:76:55:79-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:5e:76:55:79:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5e:76:55:79", + "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-kyhbrfyl-ts0601.json b/tests/data/devices/tze204-kyhbrfyl-ts0601.json new file mode 100644 index 000000000..385d7d6ec --- /dev/null +++ b/tests/data/devices/tze204-kyhbrfyl-ts0601.json @@ -0,0 +1,598 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "nwk": "0x743E", + "manufacturer": "_TZE204_kyhbrfyl", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_kyhbrfyl", + "friendly_model": "TS0601", + "name": "_TZE204_kyhbrfyl TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.010871+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_kyhbrfyl" + }, + { + "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": "0x0055", + "name": "present_value", + "zcl_type": "single", + "value": 1.06 + } + ] + }, + { + "cluster_id": "0x0406", + "endpoint_attribute": "occupancy", + "attributes": [ + { + "id": "0x0000", + "name": "occupancy", + "zcl_type": "map8", + "value": 1 + } + ] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": "tuya_manufacturer", + "attributes": [ + { + "id": "0xef00", + "name": "mcu_version", + "zcl_type": "uint48", + "value": "1.0.10" + } + ] + } + ], + "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:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": true + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 600, + "native_min_value": 150, + "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:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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": "Presence sensitivity", + "unique_id": "ab:cd:ef:12:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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": "Radar sensitivity", + "unique_id": "ab:cd:ef:12:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c7:bc: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:8d:c7:bc:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc: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:8d:c7:bc: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:8d:c7:bc:8a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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": "Human motion state", + "unique_id": "ab:cd:ef:12:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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:8d:c7:bc:8a-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:8d:c7:bc:8a:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:8d:c7:bc: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:8d:c7:bc:8a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:8d:c7:bc:8a", + "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-lsanae15-ts0601.json b/tests/data/devices/tze204-lsanae15-ts0601.json new file mode 100644 index 000000000..441ff110c --- /dev/null +++ b/tests/data/devices/tze204-lsanae15-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:71:3e:33:41", + "nwk": "0xF465", + "manufacturer": "_TZE204_lsanae15", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_lsanae15", + "friendly_model": "TS0601", + "name": "_TZE204_lsanae15 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.548630+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_lsanae15" + }, + { + "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:71:3e:33: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:71:3e:33:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:3e:33: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:71:3e:33: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:71:3e:33:41:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:3e:33: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:71:3e:33: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:71:3e:33:41:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:71:3e:33:41", + "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-lzriup1j-ts0601.json b/tests/data/devices/tze204-lzriup1j-ts0601.json new file mode 100644 index 000000000..006bdccfe --- /dev/null +++ b/tests/data/devices/tze204-lzriup1j-ts0601.json @@ -0,0 +1,901 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e0:67:39:b1", + "nwk": "0xCA3E", + "manufacturer": "_TZE204_lzriup1j", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_lzriup1j", + "friendly_model": "TS0601", + "name": "_TZE204_lzriup1j TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:39.901334+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_lzriup1j" + }, + { + "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": [] + } + ] + }, + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39: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:e0:67:39:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39: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:e0:67:39: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:e0:67:39:b1:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39: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:e0:67:39: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": "TuyaThermostat", + "type": "server" + }, + "id": "1:0x0201", + "unique_id": "ab:cd:ef:12:e0:67:39:b1:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39:b1-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:e0:67:39:b1:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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:e0:67:39: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:e0:67:39:b1:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e0:67:39:b1", + "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-mpbki2zm-ts0601.json b/tests/data/devices/tze204-mpbki2zm-ts0601.json new file mode 100644 index 000000000..27e39a0ca --- /dev/null +++ b/tests/data/devices/tze204-mpbki2zm-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:fd:bc:e2:8f", + "nwk": "0x32D0", + "manufacturer": "_TZE204_mpbki2zm", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_mpbki2zm", + "friendly_model": "TS0601", + "name": "_TZE204_mpbki2zm TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:33.987309+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_mpbki2zm" + }, + { + "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": [] + } + ] + }, + "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:fd:bc:e2: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:fd:bc:e2:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:bc:e2: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:fd:bc:e2: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:fd:bc:e2:8f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:bc:e2:8f", + "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:fd:bc:e2: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:fd:bc:e2:8f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:fd:bc:e2:8f", + "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-muvkrjr5-ts0601.json b/tests/data/devices/tze204-muvkrjr5-ts0601.json new file mode 100644 index 000000000..c8a272d7e --- /dev/null +++ b/tests/data/devices/tze204-muvkrjr5-ts0601.json @@ -0,0 +1,539 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d6:86:58:4b", + "nwk": "0xB905", + "manufacturer": "_TZE204_muvkrjr5", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_muvkrjr5", + "friendly_model": "TS0601", + "name": "_TZE204_muvkrjr5 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.776439+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_muvkrjr5" + }, + { + "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": "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": [] + } + ] + }, + "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:d6:86:58:4b-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:d6:86:58:4b:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "LED indicator", + "unique_id": "ab:cd:ef:12:d6:86:58:4b-1-find_switch", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "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:d6:86:58:4b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "find_switch" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Maximum range", + "unique_id": "ab:cd:ef:12:d6:86:58:4b-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:d6:86:58:4b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 6.0, + "native_min_value": 1.5, + "native_step": 0.75, + "native_unit_of_measurement": "m" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Fading time", + "unique_id": "ab:cd:ef:12:d6:86:58:4b-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:d6:86:58:4b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1799, + "native_min_value": 3, + "native_step": 1, + "native_unit_of_measurement": "s" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:d6:86:58:4b-1-motion_sensitivity", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "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:d6:86:58:4b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 90, + "native_min_value": 68, + "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:d6:86:58: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:d6:86:58:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "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:d6:86:58: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:d6:86:58:4b:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "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:d6:86:58:4b-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:d6:86:58:4b:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:d6:86:58: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:d6:86:58:4b:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d6:86:58:4b", + "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-p3lqqy2r-ts0601.json b/tests/data/devices/tze204-p3lqqy2r-ts0601.json new file mode 100644 index 000000000..0c1009d7f --- /dev/null +++ b/tests/data/devices/tze204-p3lqqy2r-ts0601.json @@ -0,0 +1,1021 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a0:ed:73:76", + "nwk": "0x7A7E", + "manufacturer": "_TZE204_p3lqqy2r", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_p3lqqy2r", + "friendly_model": "TS0601", + "name": "_TZE204_p3lqqy2r TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:21.545632+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": "0x0003", + "name": "hw_version", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_p3lqqy2r" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0601" + }, + { + "id": "0x4000", + "name": "sw_build_id", + "zcl_type": "string", + "unsupported": true + } + ] + }, + { + "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": [] + } + ] + } + }, + "original_signature": {}, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": "Open window detection", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-window_detection", + "migrate_unique_ids": [], + "platform": "binary_sensor", + "class_name": "BinarySensor", + "translation_key": "window_detection", + "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "window_detection" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "climate": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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": "Local temperature calibration", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 9, + "native_min_value": -9, + "native_step": 1, + "native_unit_of_measurement": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Regulator set point", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-regulator_set_point", + "migrate_unique_ids": [], + "platform": "number", + "class_name": "NumberConfigurationEntity", + "translation_key": "regulator_set_point", + "translation_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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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": "\u00b0C" + }, + "state": { + "class_name": "NumberConfigurationEntity", + "available": true, + "state": null + } + } + ], + "select": [ + { + "info_object": { + "fallback_name": "Preset mode", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "PresetModeV01", + "options": [ + "Manual", + "Home", + "Away" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Regulator period", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-regulator_period", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "regulator_period", + "translation_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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "RegulatorPeriod", + "options": [ + " 15 min", + " 30 min", + " 45 min", + " 60 min", + " 90 min" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Sensor mode", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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": "Thermostat mode", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-thermostat_mode", + "migrate_unique_ids": [], + "platform": "select", + "class_name": "ZCLEnumSelectEntity", + "translation_key": "thermostat_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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "enum": "ThermostatMode", + "options": [ + "Regulator", + "Thermostat" + ] + }, + "state": { + "class_name": "ZCLEnumSelectEntity", + "available": true, + "state": null + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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:a0:ed:73:76-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:a0:ed:73:76:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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:a0:ed:73:76-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:a0:ed:73:76:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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": "Current", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-current", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "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": "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "A" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Energy", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-energy", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": null, + "translation_placeholders": null, + "device_class": "energy", + "state_class": "total", + "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "kWh" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Floor temperature", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-local_temperature_floor", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "translation_key": "local_temperature_floor", + "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": "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Power", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-power", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "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": "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "W" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Voltage", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-1-voltage", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "Sensor", + "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": "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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "V" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "switch": [ + { + "info_object": { + "fallback_name": "Child lock", + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a0:ed:73:76-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:a0:ed:73:76:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a0:ed:73:76", + "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-ptaqh9tk-ts0601.json b/tests/data/devices/tze204-ptaqh9tk-ts0601.json new file mode 100644 index 000000000..cd83721d2 --- /dev/null +++ b/tests/data/devices/tze204-ptaqh9tk-ts0601.json @@ -0,0 +1,400 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:dc:de:8e:6f", + "nwk": "0xDFBB", + "manufacturer": "_TZE204_ptaqh9tk", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ptaqh9tk", + "friendly_model": "TS0601", + "name": "_TZE204_ptaqh9tk TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaSingleSwitchGP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.086902+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_ptaqh9tk" + }, + { + "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": [] + } + ] + }, + "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_d0ypnbvn", + "TS0601" + ], + [ + "_TZE200_gbagoilo", + "TS0601" + ], + [ + "_TZE204_6fk3gewc", + "TS0601" + ], + [ + "_TZE204_d0ypnbvn", + "TS0601" + ], + [ + "_TZE204_ptaqh9tk", + "TS0601" + ], + [ + "_TZE204_v5xjyphj", + "TS0601" + ], + [ + "_TZE204_gbagoilo", + "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:dc:de:8e:6f-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:dc:de:8e:6f:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:dc:de:8e:6f", + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:dc:de:8e: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:dc:de:8e:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:de:8e: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:dc:de:8e: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:dc:de:8e:6f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:de:8e:6f", + "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:dc:de:8e: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:dc:de:8e:6f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:dc:de:8e:6f", + "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-rhblgy0z-ts0601.json b/tests/data/devices/tze204-rhblgy0z-ts0601.json new file mode 100644 index 000000000..e5c03482f --- /dev/null +++ b/tests/data/devices/tze204-rhblgy0z-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:01:e4:99:90", + "nwk": "0xE180", + "manufacturer": "_TZE204_rhblgy0z", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_rhblgy0z", + "friendly_model": "TS0601", + "name": "_TZE204_rhblgy0z TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:23.278670+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_rhblgy0z" + }, + { + "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": [] + } + ] + }, + "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:01:e4:99:90-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:99:90:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:99:90", + "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:01:e4:99:90-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:99:90:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:99:90", + "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:01:e4:99:90-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:99:90:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:01:e4:99:90", + "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-sooucan5-ts0601.json b/tests/data/devices/tze204-sooucan5-ts0601.json new file mode 100644 index 000000000..129472c18 --- /dev/null +++ b/tests/data/devices/tze204-sooucan5-ts0601.json @@ -0,0 +1,693 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:32:23:3b:c2", + "nwk": "0xC81B", + "manufacturer": "_TZE204_sooucan5", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_sooucan5", + "friendly_model": "TS0601", + "name": "_TZE204_sooucan5 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:39:38.533955+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_sooucan5" + }, + { + "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": [] + } + ] + }, + "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:32:23:3b:c2-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:32:23:3b:c2:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:23:3b:c2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:23:3b:c2-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:23:3b:c2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:23:3b:c2-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:32:23:3b:c2:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "m" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + }, + { + "info_object": { + "fallback_name": "Self test result", + "unique_id": "ab:cd:ef:12:32:23:3b:c2-1-self_test", + "migrate_unique_ids": [], + "platform": "sensor", + "class_name": "EnumSensor", + "translation_key": "self_test", + "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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:32:23:3b:c2:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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:32:23:3b:c2-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:23:3b:c2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:32:23:3b:c2", + "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-srmahpwl-ts0601.json b/tests/data/devices/tze204-srmahpwl-ts0601.json new file mode 100644 index 000000000..4ce971b47 --- /dev/null +++ b/tests/data/devices/tze204-srmahpwl-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:61:85:0a:53", + "nwk": "0x9DC6", + "manufacturer": "_TZE204_srmahpwl", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_srmahpwl", + "friendly_model": "TS0601", + "name": "_TZE204_srmahpwl TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.958816+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_srmahpwl" + }, + { + "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": [] + } + ] + }, + "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:61:85:0a:53-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:61:85:0a:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:85:0a:53", + "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:61:85:0a:53-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:61:85:0a:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:85:0a:53", + "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:61:85:0a:53-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:61:85:0a:53:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:85:0a:53", + "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-sxm7l9xa-ts0601.json b/tests/data/devices/tze204-sxm7l9xa-ts0601.json new file mode 100644 index 000000000..fa978c8ed --- /dev/null +++ b/tests/data/devices/tze204-sxm7l9xa-ts0601.json @@ -0,0 +1,640 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:40:cd:6c:6c", + "nwk": "0x9205", + "manufacturer": "_TZE204_sxm7l9xa", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_sxm7l9xa", + "friendly_model": "TS0601", + "name": "_TZE204_sxm7l9xa TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.546623+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_sxm7l9xa" + }, + { + "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": [] + } + ] + }, + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Detection delay", + "unique_id": "ab:cd:ef:12:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "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": "Maximum range", + "unique_id": "ab:cd:ef:12:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 950, + "native_min_value": 0, + "native_step": 15, + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 950, + "native_min_value": 0, + "native_step": 15, + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1500, + "native_min_value": 1, + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:40:cd:6c: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:40:cd:6c:6c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c: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:40:cd:6c: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:40:cd:6c:6c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "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:40:cd:6c:6c-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:40:cd:6c:6c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "cm" + }, + "state": { + "class_name": "Sensor", + "available": true, + "state": null + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:40:cd:6c: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:40:cd:6c:6c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:cd:6c:6c", + "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-tagezcph-ts0601.json b/tests/data/devices/tze204-tagezcph-ts0601.json new file mode 100644 index 000000000..ba5173018 --- /dev/null +++ b/tests/data/devices/tze204-tagezcph-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:49:f4:f9:87", + "nwk": "0x21D2", + "manufacturer": "_TZE204_tagezcph", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_tagezcph", + "friendly_model": "TS0601", + "name": "_TZE204_tagezcph TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 100, + "rssi": -75, + "last_seen": "2025-12-05T20:36:51.504572+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_tagezcph" + }, + { + "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:49:f4:f9: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:49:f4:f9:87:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:f4:f9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 100 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:49:f4:f9: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:49:f4:f9:87:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:f4:f9:87", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -75 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:49:f4:f9: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:49:f4:f9:87:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:49:f4:f9:87", + "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-ue3rzddr-ts0601.json b/tests/data/devices/tze204-ue3rzddr-ts0601.json new file mode 100644 index 000000000..eb0ee57ad --- /dev/null +++ b/tests/data/devices/tze204-ue3rzddr-ts0601.json @@ -0,0 +1,258 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:cc:a0:21:17", + "nwk": "0xDF2C", + "manufacturer": "_TZE204_ue3rzddr", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ue3rzddr", + "friendly_model": "TS0601", + "name": "_TZE204_ue3rzddr TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:22.110829+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_ue3rzddr" + }, + { + "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": [] + } + ] + }, + "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:cc:a0:21: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:cc:a0:21:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:a0:21:17", + "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:cc:a0:21: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:cc:a0:21:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:a0:21: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:cc:a0:21: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:cc:a0:21:17:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:cc:a0:21:17", + "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-vjpaih9f-ts0601.json b/tests/data/devices/tze204-vjpaih9f-ts0601.json new file mode 100644 index 000000000..841a66752 --- /dev/null +++ b/tests/data/devices/tze204-vjpaih9f-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5c:57:ce:53", + "nwk": "0x3A30", + "manufacturer": "_TZE204_vjpaih9f", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_vjpaih9f", + "friendly_model": "TS0601", + "name": "_TZE204_vjpaih9f TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 168, + "rssi": -69, + "last_seen": "2025-11-07T18:58:07.652627+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_vjpaih9f" + }, + { + "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 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:57:ce:53-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:57:ce:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:57:ce:53", + "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:5c:57:ce:53-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:57:ce:53:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:57:ce:53", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -69 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:5c:57:ce:53-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:57:ce:53:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:57:ce:53", + "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-vmcgja59-ts0601.json b/tests/data/devices/tze204-vmcgja59-ts0601.json new file mode 100644 index 000000000..e061f0361 --- /dev/null +++ b/tests/data/devices/tze204-vmcgja59-ts0601.json @@ -0,0 +1,1402 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:31:d2:60:17", + "nwk": "0xA139", + "manufacturer": "_TZE204_vmcgja59", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_vmcgja59", + "friendly_model": "TS0601", + "name": "_TZE204_vmcgja59 TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_switch.TuyaSwitchX16GP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.304160+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 74 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_vmcgja59" + }, + { + "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": [] + } + ] + }, + "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", + "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_SWITCH", + "id": 0 + }, + "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_SWITCH", + "id": 0 + }, + "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": [] + }, + "5": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "6": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "7": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "8": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "9": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "10": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "11": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "12": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "13": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "14": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "15": { + "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", + "unsupported": true + }, + { + "id": "0x4003", + "name": "start_up_on_off", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ], + "out_clusters": [] + }, + "16": { + "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", + "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": [ + [ + "_TZE204_vmcgja59", + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60: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:31:d2:60:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "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:31:d2:60: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:31:d2:60:17:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "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:31:d2:60:17-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:31:d2:60:17:1:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "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:31:d2:60:17-10-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": 10, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "10:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:10:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 10, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-11-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": 11, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "11:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:11:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 11, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-12-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": 12, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "12:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:12:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 12, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-13-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": 13, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "13:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:13:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 13, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-14-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": 14, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "14:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:14:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 14, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-15-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": 15, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "15:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:15:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 15, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-16-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": 16, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "16:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:16:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 16, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:2:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "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:31:d2:60:17-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:31:d2:60:17:3:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 3, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:4:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 4, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:5:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 5, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:6:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 6, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-7-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": 7, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "7:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:7:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 7, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-8-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": 8, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "8:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:8:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 8, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Switch", + "state": false, + "available": true + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:31:d2:60:17-9-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": 9, + "cluster": { + "id": 6, + "name": "On/Off", + "type": "server" + }, + "id": "9:0x0006", + "unique_id": "ab:cd:ef:12:31:d2:60:17:9:0x0006", + "status": "INITIALIZED", + "value_attribute": "on_off" + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "endpoint_id": 9, + "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:31:d2:60: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:31:d2:60:17:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:31:d2:60:17", + "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-x8fp01wi-ts0601.json b/tests/data/devices/tze204-x8fp01wi-ts0601.json new file mode 100644 index 000000000..ced8e979e --- /dev/null +++ b/tests/data/devices/tze204-x8fp01wi-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:ec:1f:25:23", + "nwk": "0xBCEE", + "manufacturer": "_TZE204_x8fp01wi", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_x8fp01wi", + "friendly_model": "TS0601", + "name": "_TZE204_x8fp01wi TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.341504+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_x8fp01wi" + }, + { + "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:ec:1f:25: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:ec:1f:25:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:1f:25: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:ec:1f:25: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:ec:1f:25:23:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:1f:25: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:ec:1f:25: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:ec:1f:25:23:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:ec:1f:25: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-x9usygq1-ts0601.json b/tests/data/devices/tze204-x9usygq1-ts0601.json new file mode 100644 index 000000000..b686395fa --- /dev/null +++ b/tests/data/devices/tze204-x9usygq1-ts0601.json @@ -0,0 +1,250 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:92:c5:79:50", + "nwk": "0xB1F9", + "manufacturer": "_TZE204_x9usygq1", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_x9usygq1", + "friendly_model": "TS0601", + "name": "_TZE204_x9usygq1 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.675028+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_x9usygq1" + }, + { + "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 + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:92:c5:79: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:92:c5:79:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:c5:79:50", + "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:c5:79: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:92:c5:79:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:c5:79:50", + "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:c5:79: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:92:c5:79:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:92:c5:79:50", + "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-xu4a5rhj-ts0601.json b/tests/data/devices/tze204-xu4a5rhj-ts0601.json new file mode 100644 index 000000000..daf59e79e --- /dev/null +++ b/tests/data/devices/tze204-xu4a5rhj-ts0601.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:95:4f:58:7f", + "nwk": "0x38B5", + "manufacturer": "_TZE204_xu4a5rhj", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_xu4a5rhj", + "friendly_model": "TS0601", + "name": "_TZE204_xu4a5rhj TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 120, + "rssi": -70, + "last_seen": "2025-11-03T20:50:37.858781+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_xu4a5rhj" + }, + { + "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:95:4f:58: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:95:4f:58:7f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:4f:58:7f", + "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:95:4f:58: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:95:4f:58:7f:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:4f:58:7f", + "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:95:4f:58: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:95:4f:58:7f:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:95:4f:58: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-yjjdcqsq-ts0601.json b/tests/data/devices/tze204-yjjdcqsq-ts0601.json new file mode 100644 index 000000000..03adf9964 --- /dev/null +++ b/tests/data/devices/tze204-yjjdcqsq-ts0601.json @@ -0,0 +1,493 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:40:2d:94:5c", + "nwk": "0xAD40", + "manufacturer": "_TZE204_yjjdcqsq", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_yjjdcqsq", + "friendly_model": "TS0601", + "name": "_TZE204_yjjdcqsq TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.builder.EnchantedDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:36.115431+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": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 73 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_yjjdcqsq" + }, + { + "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": 100 + }, + { + "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": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2650 + } + ] + }, + { + "cluster_id": "0x0405", + "endpoint_attribute": "humidity", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "uint16", + "value": 4900 + } + ] + }, + { + "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": { + "select": [ + { + "info_object": { + "fallback_name": "Display unit", + "unique_id": "ab:cd:ef:12:40:2d:94:5c-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:40:2d:94:5c:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "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:40:2d:94:5c-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:40:2d:94:5c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "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:40:2d:94:5c-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:40:2d:94:5c:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "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:40:2d:94:5c-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:40:2d:94:5c:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "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": 2 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:40:2d:94:5c-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:40:2d:94:5c:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 26.5 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:40:2d:94:5c-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:40:2d:94:5c:1:0x0405", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "%" + }, + "state": { + "class_name": "Humidity", + "available": true, + "state": 49.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:40:2d:94:5c-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:40:2d:94:5c:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:40:2d:94:5c", + "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-zenj4lxv-ts0601.json b/tests/data/devices/tze204-zenj4lxv-ts0601.json new file mode 100644 index 000000000..4729961d4 --- /dev/null +++ b/tests/data/devices/tze204-zenj4lxv-ts0601.json @@ -0,0 +1,526 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:17:c8:fd:c8", + "nwk": "0xBC08", + "manufacturer": "_TZE204_zenj4lxv", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_zenj4lxv", + "friendly_model": "TS0601", + "name": "_TZE204_zenj4lxv TS0601", + "quirk_applied": true, + "quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaDoubleSwitchDimmerGP", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.814499+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_zenj4lxv" + }, + { + "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": [] + } + ] + }, + "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": [] + }, + "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_fjjbhx9d", + "TS0601" + ], + [ + "_TZE200_gwkapsoq", + "TS0601" + ], + [ + "_TZE204_zenj4lxv", + "TS0601" + ], + [ + "_TZE204_o9gyszw2", + "TS0601" + ], + [ + "_TZE204_jtbgusdc", + "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:17:c8:fd:c8-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:17:c8:fd:c8: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:17:c8:fd:c8:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:17:c8:fd:c8", + "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:17:c8:fd:c8-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:17:c8:fd:c8: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:17:c8:fd:c8:2:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:17:c8:fd:c8", + "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" + ] + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:17:c8:fd: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:17:c8:fd:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:c8:fd: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:17:c8:fd: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:17:c8:fd:c8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:c8:fd: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:17:c8:fd: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:17:c8:fd:c8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:17:c8:fd:c8", + "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-ztqnh5cg-ts0601.json b/tests/data/devices/tze204-ztqnh5cg-ts0601.json new file mode 100644 index 000000000..33c0d7fab --- /dev/null +++ b/tests/data/devices/tze204-ztqnh5cg-ts0601.json @@ -0,0 +1,726 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "nwk": "0x67F5", + "manufacturer": "_TZE204_ztqnh5cg", + "model": "TS0601", + "friendly_manufacturer": "_TZE204_ztqnh5cg", + "friendly_model": "TS0601", + "name": "_TZE204_ztqnh5cg TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:55.855319+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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE204_ztqnh5cg" + }, + { + "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": "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": [ + { + "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": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0003", + "name": "scene_valid", + "zcl_type": "bool", + "value": 0 + } + ] + }, + { + "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:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "occupancy" + }, + "state": { + "class_name": "Occupancy", + "available": true, + "state": false + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": "Detection delay", + "unique_id": "ab:cd:ef:12:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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": "Fading time", + "unique_id": "ab:cd:ef:12:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "endpoint_id": 1, + "available": true, + "group_id": null, + "mode": "auto", + "native_max_value": 1500, + "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": "Motion sensitivity", + "unique_id": "ab:cd:ef:12:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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:e7:7d:1a: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:e7:7d:1a:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a: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:e7:7d:1a: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:e7:7d:1a:a0:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a: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:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0x0400", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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:e7:7d:1a:a0-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:e7:7d:1a:a0:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a:a0", + "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:e7:7d:1a: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:e7:7d:1a:a0:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:7d:1a: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/tze284-0zaf1cr8-ts0601.json b/tests/data/devices/tze284-0zaf1cr8-ts0601.json new file mode 100644 index 000000000..670b3ecab --- /dev/null +++ b/tests/data/devices/tze284-0zaf1cr8-ts0601.json @@ -0,0 +1,419 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:98:e3:82:b6", + "nwk": "0xCFFA", + "manufacturer": "_TZE284_0zaf1cr8", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_0zaf1cr8", + "friendly_model": "TS0601", + "name": "_TZE284_0zaf1cr8 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.522351+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": "IAS_ZONE", + "id": 1026 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0001", + "name": "app_version", + "zcl_type": "uint8", + "value": 67 + } + ] + }, + { + "cluster_id": "0x0001", + "endpoint_attribute": "power", + "attributes": [ + { + "id": "0x0033", + "name": "battery_quantity", + "zcl_type": "uint8", + "value": 1 + }, + { + "id": "0x0034", + "name": "battery_rated_voltage", + "zcl_type": "uint8", + "value": 30 + }, + { + "id": "0x0031", + "name": "battery_size", + "zcl_type": "enum8", + "value": 8 + } + ] + }, + { + "cluster_id": "0x0004", + "endpoint_attribute": "groups", + "attributes": [] + }, + { + "cluster_id": "0x0005", + "endpoint_attribute": "scenes", + "attributes": [] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "unsupported": true + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 40 + } + ] + }, + { + "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": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:e3:82:b6-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:98:e3:82:b6:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "zone_status" + }, + "state": { + "class_name": "IASZone", + "available": true, + "state": false + } + }, + { + "info_object": { + "fallback_name": "Battery low", + "unique_id": "ab:cd:ef:12:98:e3:82:b6-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:98:e3:82:b6:1:0xef00", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "attribute_name": "battery_low" + }, + "state": { + "class_name": "BinarySensor", + "available": true, + "state": false + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:e3:82:b6-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:e3:82:b6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "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:98:e3:82:b6-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:e3:82:b6:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "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:98:e3:82:b6-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:98:e3:82:b6:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "CR123A", + "battery_quantity": 1 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:98:e3:82:b6-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:e3:82:b6:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:98:e3:82:b6", + "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-6hrnp30w-ts0601.json b/tests/data/devices/tze284-6hrnp30w-ts0601.json new file mode 100644 index 000000000..610bde9e9 --- /dev/null +++ b/tests/data/devices/tze284-6hrnp30w-ts0601.json @@ -0,0 +1,516 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:61:38:1f:0e", + "nwk": "0x55C2", + "manufacturer": "_TZE284_6hrnp30w", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_6hrnp30w", + "friendly_model": "TS0601", + "name": "_TZE284_6hrnp30w TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-11-08T06:50:29.717291+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": "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": "_TZE284_6hrnp30w" + }, + { + "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": "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": "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": "0xed00", + "endpoint_attribute": null, + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [ + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0006", + "name": "standard_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x0009", + "name": "valid_until_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": 80 + }, + { + "id": "0x0003", + "name": "current_zigbee_stack_version", + "zcl_type": "uint16", + "value": 2 + }, + { + "id": "0x0004", + "name": "downloaded_file_version", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x0005", + "name": "downloaded_zigbee_stack_version", + "zcl_type": "uint16", + "value": 65535 + }, + { + "id": "0x0001", + "name": "file_offset", + "zcl_type": "uint32", + "value": 4294967295 + }, + { + "id": "0x000a", + "name": "image_stamp", + "zcl_type": "uint32", + "unsupported": true + }, + { + "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": 4417 + }, + { + "id": "0x0009", + "name": "minimum_block_req_delay", + "zcl_type": "uint16", + "value": 0 + }, + { + "id": "0x000b", + "name": "upgrade_activation_policy", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x000c", + "name": "upgrade_timeout_policy", + "zcl_type": "enum8", + "unsupported": true + } + ] + } + ] + } + }, + "zha_lib_entities": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:61:38:1f: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:61:38:1f:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:38:1f: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:61:38:1f: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:61:38:1f:0e:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:38:1f: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:61:38:1f: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:61:38:1f:0e:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:61:38:1f:0e", + "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-fzo2pocs-ts0601.json b/tests/data/devices/tze284-fzo2pocs-ts0601.json new file mode 100644 index 000000000..787bc63c8 --- /dev/null +++ b/tests/data/devices/tze284-fzo2pocs-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:d4:9c:af:cd", + "nwk": "0x19F3", + "manufacturer": "_TZE284_fzo2pocs", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_fzo2pocs", + "friendly_model": "TS0601", + "name": "_TZE284_fzo2pocs TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:32.617910+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": 68 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_fzo2pocs" + }, + { + "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:d4:9c:af: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:d4:9c:af:cd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:9c:af:cd", + "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:d4:9c:af: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:d4:9c:af:cd:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:9c:af:cd", + "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:d4:9c:af: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:d4:9c:af:cd:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:d4:9c:af: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-g2e6cpnw-ts0601.json b/tests/data/devices/tze284-g2e6cpnw-ts0601.json new file mode 100644 index 000000000..5b313b82f --- /dev/null +++ b/tests/data/devices/tze284-g2e6cpnw-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:5c:ed:8a:ef", + "nwk": "0xCD2B", + "manufacturer": "_TZE284_g2e6cpnw", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_g2e6cpnw", + "friendly_model": "TS0601", + "name": "_TZE284_g2e6cpnw TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:27:24.589467+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_g2e6cpnw" + }, + { + "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:5c:ed:8a: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:5c:ed:8a:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:ed:8a:ef", + "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:ed:8a: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:5c:ed:8a:ef:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:ed:8a:ef", + "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:5c:ed:8a:ef-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:ed:8a:ef:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:5c:ed:8a:ef", + "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-hodyryli-ts0601.json b/tests/data/devices/tze284-hodyryli-ts0601.json new file mode 100644 index 000000000..c03fefa59 --- /dev/null +++ b/tests/data/devices/tze284-hodyryli-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e6:20:71:50", + "nwk": "0x3C22", + "manufacturer": "_TZE284_hodyryli", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_hodyryli", + "friendly_model": "TS0601", + "name": "_TZE284_hodyryli TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 255, + "rssi": -33, + "last_seen": "2025-11-14T01:32:40.846964+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_hodyryli" + }, + { + "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:e6:20:71: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:e6:20:71:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e6:20:71:50", + "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:e6:20:71: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:e6:20:71:50:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e6:20:71:50", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -33 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e6:20:71: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:e6:20:71:50:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e6:20:71:50", + "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-idvyees9-ts0601.json b/tests/data/devices/tze284-idvyees9-ts0601.json new file mode 100644 index 000000000..e9e1e18a0 --- /dev/null +++ b/tests/data/devices/tze284-idvyees9-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:a2:4b:d7:95", + "nwk": "0x41E7", + "manufacturer": "_TZE284_idvyees9", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_idvyees9", + "friendly_model": "TS0601", + "name": "_TZE284_idvyees9 TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 255, + "rssi": -49, + "last_seen": "2025-11-10T16:25:28.045497+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_idvyees9" + }, + { + "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:a2:4b:d7:95-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:4b:d7:95:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:4b:d7:95", + "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:a2:4b:d7:95-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:4b:d7:95:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:4b:d7:95", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -49 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:a2:4b:d7:95-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:4b:d7:95:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:a2:4b:d7:95", + "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-o9ofysmo-ts0601.json b/tests/data/devices/tze284-o9ofysmo-ts0601.json new file mode 100644 index 000000000..e810fa942 --- /dev/null +++ b/tests/data/devices/tze284-o9ofysmo-ts0601.json @@ -0,0 +1,255 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:6b:ff:c5:80", + "nwk": "0xD1F5", + "manufacturer": "_TZE284_o9ofysmo", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_o9ofysmo", + "friendly_model": "TS0601", + "name": "_TZE284_o9ofysmo TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 109, + "rssi": null, + "last_seen": "2025-12-01T08:48:26.471569+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_o9ofysmo" + }, + { + "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:6b:ff:c5:80-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:ff:c5:80:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:ff:c5:80", + "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:6b:ff:c5:80-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:ff:c5:80:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:ff:c5:80", + "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:ff:c5:80-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:ff:c5:80:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:6b:ff:c5:80", + "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-pcdmj88b-ts0601.json b/tests/data/devices/tze284-pcdmj88b-ts0601.json new file mode 100644 index 000000000..a8d97d69e --- /dev/null +++ b/tests/data/devices/tze284-pcdmj88b-ts0601.json @@ -0,0 +1,249 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7b:62:e5:e2", + "nwk": "0xEAE2", + "manufacturer": "_TZE284_pcdmj88b", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_pcdmj88b", + "friendly_model": "TS0601", + "name": "_TZE284_pcdmj88b TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": 156, + "rssi": -72, + "last_seen": "2025-11-18T10:44:57.521217+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_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": "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:7b:62:e5: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:7b:62:e5:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:62:e5:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "LQISensor", + "available": true, + "state": 156 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:62:e5: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:7b:62:e5:e2:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:62:e5:e2", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "dBm" + }, + "state": { + "class_name": "RSSISensor", + "available": true, + "state": -72 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7b:62:e5:e2-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:62:e5:e2:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7b:62:e5:e2", + "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-rlytpmij-ts0601.json b/tests/data/devices/tze284-rlytpmij-ts0601.json new file mode 100644 index 000000000..4129438da --- /dev/null +++ b/tests/data/devices/tze284-rlytpmij-ts0601.json @@ -0,0 +1,270 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:11:d8:40:d8", + "nwk": "0x54C8", + "manufacturer": "_TZE284_rlytpmij", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_rlytpmij", + "friendly_model": "TS0601", + "name": "_TZE284_rlytpmij TS0601", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": 164, + "rssi": -59, + "last_seen": "2025-11-21T15:59:03.626313+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": 81 + }, + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "_TZE284_rlytpmij" + }, + { + "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": 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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:11:d8:40:d8-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:d8:40:d8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:d8:40:d8", + "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:11:d8:40:d8-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:d8:40:d8:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:d8:40:d8", + "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:11:d8:40:d8-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:d8:40:d8:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:11:d8:40:d8", + "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-sgabhwa6-ts0601.json b/tests/data/devices/tze284-sgabhwa6-ts0601.json new file mode 100644 index 000000000..f4b7c5410 --- /dev/null +++ b/tests/data/devices/tze284-sgabhwa6-ts0601.json @@ -0,0 +1,570 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e7:63:0a:df", + "nwk": "0xB658", + "manufacturer": "_TZE284_sgabhwa6", + "model": "TS0601", + "friendly_manufacturer": "_TZE284_sgabhwa6", + "friendly_model": "TS0601", + "name": "_TZE284_sgabhwa6 TS0601", + "quirk_applied": true, + "quirk_class": "zigpy.quirks.v2.CustomDeviceV2", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.110078+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_sgabhwa6" + }, + { + "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": [ + { + "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": "0x0005", + "name": "last_configured_by", + "zcl_type": "EUI64", + "unsupported": true + }, + { + "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": [] + }, + { + "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": [ + { + "id": "0xfffd", + "name": "cluster_revision", + "zcl_type": "uint16", + "value": 1 + }, + { + "id": "0x0004", + "name": "dst_end", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0005", + "name": "dst_shift", + "zcl_type": "int32", + "unsupported": true + }, + { + "id": "0x0003", + "name": "dst_start", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0008", + "name": "last_set_time", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x0007", + "name": "local_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0xfffe", + "name": "reporting_status", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0006", + "name": "standard_time", + "zcl_type": "uint32", + "unsupported": true + }, + { + "id": "0x0000", + "name": "time", + "zcl_type": "UTC", + "unsupported": true + }, + { + "id": "0x0001", + "name": "time_status", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0002", + "name": "time_zone", + "zcl_type": "int32", + "unsupported": true + }, + { + "id": "0x0009", + "name": "valid_until_time", + "zcl_type": "UTC", + "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": { + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:e7:63:0a: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:e7:63:0a:df:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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:63:0a: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:e7:63:0a:df:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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:e7:63:0a:df-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:e7:63:0a:df:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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:e7:63:0a:df-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:e7:63:0a:df:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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:e7:63:0a:df-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:e7:63:0a:df:1:0x0408", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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:e7:63:0a:df-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:63:0a:df:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e7:63:0a:df", + "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/tze600-iypcp4py-ts0105.json b/tests/data/devices/tze600-iypcp4py-ts0105.json new file mode 100644 index 000000000..f9bc35796 --- /dev/null +++ b/tests/data/devices/tze600-iypcp4py-ts0105.json @@ -0,0 +1,295 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:e3:fb:03:e7", + "nwk": "0xCBA9", + "manufacturer": "_TZE600_iypcp4py", + "model": "TS0105", + "friendly_manufacturer": "_TZE600_iypcp4py", + "friendly_model": "TS0105", + "name": "_TZE600_iypcp4py TS0105", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4107, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.125289+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": 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": "_TZE600_iypcp4py" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0105" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0xef00", + "endpoint_attribute": null, + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "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:e3:fb:03:e7-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:e3:fb:03:e7:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:fb:03:e7", + "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:e3:fb:03: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:e3:fb:03:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:fb:03:e7", + "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:e3:fb:03: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:e3:fb:03:e7:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:fb:03:e7", + "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:e3:fb:03: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:e3:fb:03:e7:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:e3:fb:03:e7", + "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/tze608-c75zqghm-ts0603.json b/tests/data/devices/tze608-c75zqghm-ts0603.json new file mode 100644 index 000000000..3fd343814 --- /dev/null +++ b/tests/data/devices/tze608-c75zqghm-ts0603.json @@ -0,0 +1,312 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:38:20:4f:1a", + "nwk": "0x27FF", + "manufacturer": "_TZE608_c75zqghm", + "model": "TS0603", + "friendly_manufacturer": "_TZE608_c75zqghm", + "friendly_model": "TS0603", + "name": "_TZE608_c75zqghm TS0603", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4417, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:25:35.482599+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": "_TZE608_c75zqghm" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "TS0603" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "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": 64 + } + ] + } + ] + }, + "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:38:20:4f:1a-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:38:20:4f:1a:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:20:4f:1a", + "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:38:20:4f: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:38:20:4f:1a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:20:4f: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:38:20:4f: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:38:20:4f:1a:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:20:4f:1a", + "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:38:20:4f:1a-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:38:20:4f:1a:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:38:20:4f:1a", + "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/uiot-uiot-windowcovring2-0402.json b/tests/data/devices/uiot-uiot-windowcovring2-0402.json new file mode 100644 index 000000000..73d0b4b1c --- /dev/null +++ b/tests/data/devices/uiot-uiot-windowcovring2-0402.json @@ -0,0 +1,878 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:c1:6d:31:24", + "nwk": "0xD24F", + "manufacturer": "UIOT", + "model": "UIOT-WindowCovring2[04,02]", + "friendly_manufacturer": "UIOT", + "friendly_model": "UIOT-WindowCovring2[04,02]", + "name": "UIOT UIOT-WindowCovring2[04,02]", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4657, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:56:57.397793+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": 4657, + "maximum_buffer_size": 127, + "maximum_incoming_transfer_size": 100, + "server_mask": 0, + "maximum_outgoing_transfer_size": 100, + "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": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "UIOT" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "UIOT-WindowCovring2[04,02]" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [ + { + "id": "0x0002", + "name": "current_file_version", + "zcl_type": "uint32", + "unsupported": true + } + ] + }, + { + "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": 0 + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xfe00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [] + }, + { + "cluster_id": "0xfe00", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "2": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "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": 0 + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "WINDOW_COVERING_CONTROLLER", + "id": 515 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "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": 0 + }, + { + "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": "0x0017", + "name": "window_covering_mode", + "zcl_type": "map8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "window_covering_type", + "zcl_type": "enum8", + "value": 0 + } + ] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0x0102", + "endpoint_attribute": "window_covering", + "attributes": [] + }, + { + "cluster_id": "0xffff", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c1:6d:31:24-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:c1:6d:31:24:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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:c1:6d:31:24-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": 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:c1:6d:31:24:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c1:6d:31:24-2-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": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:c1:6d:31:24:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "endpoint_id": 2, + "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 + } + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c1:6d:31:24-3-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": false, + "cluster_handlers": [ + { + "class_name": "WindowCoveringClusterHandler", + "generic_id": "cluster_handler_0x0102", + "endpoint_id": 3, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "3:0x0102", + "unique_id": "ab:cd:ef:12:c1:6d:31:24:3:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "endpoint_id": 3, + "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:c1:6d:31:24-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:c1:6d:31:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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:c1:6d:31:24-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:c1:6d:31:24:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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:c1:6d:31:24-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:c1:6d:31:24:1:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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:c1:6d:31:24-2-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": 2, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "2:0x0102", + "unique_id": "ab:cd:ef:12:c1:6d:31:24:2:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "endpoint_id": 2, + "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:c1:6d:31:24-3-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": 3, + "cluster": { + "id": 258, + "name": "Window Covering", + "type": "server" + }, + "id": "3:0x0102", + "unique_id": "ab:cd:ef:12:c1:6d:31:24:3:0x0102", + "status": "INITIALIZED", + "value_attribute": "current_position_lift_percentage" + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "endpoint_id": 3, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "WindowCoveringTypeSensor", + "available": true, + "state": "Rollershade" + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:c1:6d:31:24-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": "OtaClusterHandler", + "generic_id": "cluster_handler_0x0019", + "endpoint_id": 1, + "cluster": { + "id": 25, + "name": "Ota", + "type": "server" + }, + "id": "1:0x0019", + "unique_id": "ab:cd:ef:12:c1:6d:31:24:1:0x0019", + "status": "INITIALIZED", + "value_attribute": null + }, + { + "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:c1:6d:31:24:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:c1:6d:31:24", + "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/unk-manufacturer-unk-model.json b/tests/data/devices/unk-manufacturer-unk-model.json new file mode 100644 index 000000000..5f8115221 --- /dev/null +++ b/tests/data/devices/unk-manufacturer-unk-model.json @@ -0,0 +1,498 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:bb:85:b4:de", + "nwk": "0xC94A", + "manufacturer": "unk_manufacturer", + "model": "unk_model", + "friendly_manufacturer": "unk_manufacturer", + "friendly_model": "unk_model", + "name": "unk_manufacturer unk_model", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4368, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T00:48:17.797358+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": 4368, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": { + "name": "SHADE", + "id": 512 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "unsupported": true + }, + { + "id": "0x0005", + "name": "model", + "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": "0x0001", + "name": "current_scene", + "zcl_type": "uint8", + "value": 0 + } + ] + }, + { + "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": "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", + "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": "0x000a", + "endpoint_attribute": "time", + "attributes": [] + }, + { + "cluster_id": "0x0015", + "endpoint_attribute": "commissioning", + "attributes": [] + }, + { + "cluster_id": "0x0100", + "endpoint_attribute": "shade", + "attributes": [ + { + "id": "0x0010", + "name": "closed_limit", + "zcl_type": "uint16", + "value": 1312 + }, + { + "id": "0x0012", + "name": "mode", + "zcl_type": "enum8", + "unsupported": true + }, + { + "id": "0x0001", + "name": "motor_step_size", + "zcl_type": "uint8", + "unsupported": true + }, + { + "id": "0x0000", + "name": "physical_closed_limit", + "zcl_type": "uint16", + "unsupported": true + }, + { + "id": "0x0002", + "name": "status", + "zcl_type": "map8", + "value": 9 + } + ] + }, + { + "cluster_id": "0xfc20", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + }, + { + "cluster_id": "0xfc21", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + }, + { + "cluster_id": "0xfc20", + "endpoint_attribute": "manufacturer_specific", + "attributes": [] + } + ] + } + }, + "zha_lib_entities": { + "button": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bb:85:b4:de-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:bb:85:b4:de:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bb:85:b4:de", + "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:bb:85:b4:de-1", + "migrate_unique_ids": [], + "platform": "cover", + "class_name": "Shade", + "translation_key": "shade", + "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": "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:bb:85:b4:de: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:bb:85:b4:de:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + }, + { + "class_name": "ShadeClusterHandler", + "generic_id": "cluster_handler_0x0100", + "endpoint_id": 1, + "cluster": { + "id": 256, + "name": "Shade Configuration", + "type": "server" + }, + "id": "1:0x0100", + "unique_id": "ab:cd:ef:12:bb:85:b4:de:1:0x0100", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bb:85:b4:de", + "endpoint_id": 1, + "available": true, + "group_id": null + }, + "state": { + "class_name": "Shade", + "available": true, + "current_position": 0, + "is_closed": true, + "state": "closed" + } + } + ], + "number": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bb:85:b4:de-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:bb:85:b4:de:1:0x0008", + "status": "INITIALIZED", + "value_attribute": "current_level" + } + ], + "device_ieee": "ab:cd:ef:12:bb:85:b4:de", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:bb:85:b4: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:bb:85:b4:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bb:85:b4: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:bb:85:b4: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:bb:85:b4:de:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:bb:85:b4:de", + "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/visonic-mct-340-sma.json b/tests/data/devices/visonic-mct-340-sma.json new file mode 100644 index 000000000..e03194224 --- /dev/null +++ b/tests/data/devices/visonic-mct-340-sma.json @@ -0,0 +1,539 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:80:a4:c3:ba", + "nwk": "0xFD81", + "manufacturer": "Visonic", + "model": "MCT-340 SMA", + "friendly_manufacturer": "Visonic", + "friendly_model": "MCT-340 SMA", + "name": "Visonic MCT-340 SMA", + "quirk_applied": true, + "quirk_class": "zhaquirks.visonic.mct340.MCT340", + "exposes_features": [], + "manufacturer_code": 4113, + "power_source": "Battery or Unknown", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:27.292527+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": 4113, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "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": "Visonic" + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "MCT-340 SMA" + } + ] + }, + { + "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": 2 + }, + { + "id": "0x0020", + "name": "battery_voltage", + "zcl_type": "uint8", + "value": 28 + } + ] + }, + { + "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": "0x0402", + "endpoint_attribute": "temperature", + "attributes": [ + { + "id": "0x0000", + "name": "measured_value", + "zcl_type": "int16", + "value": 2200 + } + ] + }, + { + "cluster_id": "0x0500", + "endpoint_attribute": "ias_zone", + "attributes": [ + { + "id": "0x0010", + "name": "cie_addr", + "zcl_type": "EUI64", + "value": [ + 110, + 210, + 211, + 254, + 255, + 141, + 121, + 224 + ] + }, + { + "id": "0x0000", + "name": "zone_state", + "zcl_type": "enum8", + "value": 1 + }, + { + "id": "0x0002", + "name": "zone_status", + "zcl_type": "map16", + "value": 32 + }, + { + "id": "0x0001", + "name": "zone_type", + "zcl_type": "enum16", + "value": 21 + } + ] + }, + { + "cluster_id": "0x0b05", + "endpoint_attribute": "diagnostic", + "attributes": [] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0019", + "endpoint_attribute": "ota", + "attributes": [] + } + ] + } + }, + "original_signature": { + "models_info": [ + [ + "Visonic", + "MCT-340 E" + ], + [ + "Visonic", + "MCT-340 SMA" + ] + ], + "endpoints": { + "1": { + "profile_id": "0x0104", + "device_type": "0x0402", + "input_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0402", + "0x0500", + "0x0020", + "0x0b05" + ], + "output_clusters": [ + "0x0019" + ] + } + } + }, + "zha_lib_entities": { + "binary_sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:80:a4:c3:ba-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:80:a4:c3:ba:1:0x0500", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "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:80:a4:c3: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:80:a4:c3:ba:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "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:80:a4:c3: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:80:a4:c3:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "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:80:a4:c3: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:80:a4:c3:ba:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "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:80:a4:c3:ba-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:80:a4:c3:ba:1:0x0001", + "status": "INITIALIZED", + "value_attribute": "battery_voltage" + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": 0, + "unit": "%" + }, + "state": { + "class_name": "Battery", + "available": true, + "state": null, + "battery_size": "Other", + "battery_quantity": 1, + "battery_voltage": 2.8 + }, + "extra_state_attributes": [ + "battery_quantity", + "battery_size", + "battery_voltage" + ] + }, + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:80:a4:c3:ba-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:80:a4:c3:ba:1:0x0402", + "status": "INITIALIZED", + "value_attribute": "measured_value" + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": "\u00b0C" + }, + "state": { + "class_name": "Temperature", + "available": true, + "state": 22.0 + } + } + ], + "update": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:80:a4:c3:ba-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:80:a4:c3:ba:1:0x0019_CLIENT", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:80:a4:c3:ba", + "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/zehnder-group-vaux-andigny-alcantara2-d1-00p1-02z1-00.json b/tests/data/devices/zehnder-group-vaux-andigny-alcantara2-d1-00p1-02z1-00.json new file mode 100644 index 000000000..52c43edb3 --- /dev/null +++ b/tests/data/devices/zehnder-group-vaux-andigny-alcantara2-d1-00p1-02z1-00.json @@ -0,0 +1,796 @@ +{ + "version": 1, + "ieee": "ab:cd:ef:12:7f:49:22:da", + "nwk": "0xD3DA", + "manufacturer": "ZEHNDER GROUP VAUX ANDIGNY ", + "model": "ALCANTARA2 D1.00P1.02Z1.00", + "friendly_manufacturer": "ZEHNDER GROUP VAUX ANDIGNY ", + "friendly_model": "ALCANTARA2 D1.00P1.02Z1.00", + "name": "ZEHNDER GROUP VAUX ANDIGNY ALCANTARA2 D1.00P1.02Z1.00", + "quirk_applied": false, + "quirk_class": "zigpy.device.Device", + "exposes_features": [], + "manufacturer_code": 4098, + "power_source": "Mains", + "lqi": null, + "rssi": null, + "last_seen": "2025-12-11T01:40:26.272121+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": "THERMOSTAT", + "id": 769 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [ + { + "id": "0x0004", + "name": "manufacturer", + "zcl_type": "string", + "value": "ZEHNDER GROUP VAUX ANDIGNY " + }, + { + "id": "0x0005", + "name": "model", + "zcl_type": "string", + "value": "ALCANTARA2 D1.00P1.02Z1.00" + } + ] + }, + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "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", + "value": 2800 + }, + { + "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": 700 + }, + { + "id": "0x001b", + "name": "ctrl_sequence_of_oper", + "zcl_type": "enum8", + "value": 2 + }, + { + "id": "0x0000", + "name": "local_temperature", + "zcl_type": "int16", + "value": 700 + }, + { + "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", + "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", + "value": 1 + }, + { + "id": "0x0011", + "name": "occupied_cooling_setpoint", + "zcl_type": "int16", + "value": 2600 + }, + { + "id": "0x0012", + "name": "occupied_heating_setpoint", + "zcl_type": "int16", + "value": 700 + }, + { + "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": 4 + }, + { + "id": "0x0029", + "name": "running_state", + "zcl_type": "map16", + "value": 0 + }, + { + "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", + "value": 800 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "attributes": [] + } + ] + }, + "2": { + "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": [] + } + ] + }, + "3": { + "profile_id": 260, + "device_type": { + "name": "LEVEL_CONTROL_SWITCH", + "id": 1 + }, + "in_clusters": [ + { + "cluster_id": "0x0000", + "endpoint_attribute": "basic", + "attributes": [] + }, + { + "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 + }, + { + "id": "0x006f", + "name": "status_flags", + "zcl_type": "map8", + "value": 0 + } + ] + } + ], + "out_clusters": [ + { + "cluster_id": "0x0003", + "endpoint_attribute": "identify", + "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:7f:49:22:da-2-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": 2, + "cluster": { + "id": 1030, + "name": "Occupancy Sensing", + "type": "server" + }, + "id": "2:0x0406", + "unique_id": "ab:cd:ef:12:7f:49:22:da:2:0x0406", + "status": "INITIALIZED", + "value_attribute": "occupancy" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "endpoint_id": 2, + "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:7f:49:22:da-3-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": 3, + "cluster": { + "id": 15, + "name": "Binary Input (Basic)", + "type": "server" + }, + "id": "3:0x000f", + "unique_id": "ab:cd:ef:12:7f:49:22:da:3:0x000f", + "status": "INITIALIZED", + "value_attribute": "present_value" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "endpoint_id": 3, + "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:7f:49:22:da-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:7f:49:22:da:1:0x0003", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "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:7f:49:22:da-1", + "migrate_unique_ids": [], + "platform": "climate", + "class_name": "ZehnderThermostat", + "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:7f:49:22:da:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "max_temp": 28.0, + "min_temp": 7.0, + "supported_features": 385, + "fan_modes": null, + "preset_modes": [], + "hvac_modes": [ + "off", + "heat" + ] + }, + "state": { + "class_name": "ZehnderThermostat", + "available": true, + "current_temperature": null, + "outdoor_temperature": null, + "target_temperature": 7.0, + "target_temperature_high": null, + "target_temperature_low": null, + "hvac_action": "idle", + "hvac_mode": "heat", + "preset_mode": "none", + "fan_mode": "auto", + "system_mode": "[1]/heat", + "occupancy": 1, + "occupied_cooling_setpoint": 2600, + "occupied_heating_setpoint": 700, + "pi_heating_demand": null, + "pi_cooling_demand": null, + "unoccupied_cooling_setpoint": null, + "unoccupied_heating_setpoint": 800 + }, + "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:7f:49:22:da-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:7f:49:22:da:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "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 + } + } + ], + "sensor": [ + { + "info_object": { + "fallback_name": null, + "unique_id": "ab:cd:ef:12:7f:49:22: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:7f:49:22:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22: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:7f:49:22: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:7f:49:22:da:1:0x0000", + "status": "INITIALIZED", + "value_attribute": null + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22: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:7f:49:22:da-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:7f:49:22:da:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "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:7f:49:22:da-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:7f:49:22:da:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "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:7f:49:22:da-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:7f:49:22:da:1:0x0201", + "status": "INITIALIZED", + "value_attribute": "local_temperature" + } + ], + "device_ieee": "ab:cd:ef:12:7f:49:22:da", + "endpoint_id": 1, + "available": true, + "group_id": null, + "suggested_display_precision": null, + "unit": null + }, + "state": { + "class_name": "SetpointChangeSourceTimestamp", + "available": true, + "state": null + } + } + ] + }, + "neighbors": [], + "routes": [] +} \ No newline at end of file From dce9848ecdc384a5e555b2a1c83337bc35a9e8ca Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:52:52 -0500 Subject: [PATCH 3/5] Regenerate diagnostics after `dev` merge --- .../data/devices/tz3000-j1xl73iw-ts130f.json | 86 --- .../data/devices/tz3000-kmsbwdol-ts130f.json | 86 --- .../data/devices/tz3000-ltiqubue-ts130f.json | 46 +- .../data/devices/tz3000-qa8s8vca-ts130f.json | 46 +- .../data/devices/tz3000-vw8pawxa-ts130f.json | 46 +- .../data/devices/tze200-byzdayie-ts0601.json | 46 +- .../data/devices/tze200-cpmgn2cf-ts0601.json | 84 --- .../data/devices/tze200-ewxhg6o9-ts0601.json | 46 +- .../data/devices/tze204-4fblxpma-ts0601.json | 44 -- .../data/devices/tze204-bkkmqmyo-ts0601.json | 44 -- .../data/devices/tze204-dqolcpcp-ts0601.json | 506 ------------- .../data/devices/tze204-vmcgja59-ts0601.json | 674 ------------------ 12 files changed, 5 insertions(+), 1749 deletions(-) diff --git a/tests/data/devices/tz3000-j1xl73iw-ts130f.json b/tests/data/devices/tz3000-j1xl73iw-ts130f.json index 02233671b..35433f390 100644 --- a/tests/data/devices/tz3000-j1xl73iw-ts130f.json +++ b/tests/data/devices/tz3000-j1xl73iw-ts130f.json @@ -587,92 +587,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:e2:fe:70: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": 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:e2:fe:70:54:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:e2:fe:70:54", - "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:e2:fe:70:54-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:e2:fe:70:54:2:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:e2:fe:70:54", - "endpoint_id": 2, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tz3000-kmsbwdol-ts130f.json b/tests/data/devices/tz3000-kmsbwdol-ts130f.json index 891b09a91..6c42850f2 100644 --- a/tests/data/devices/tz3000-kmsbwdol-ts130f.json +++ b/tests/data/devices/tz3000-kmsbwdol-ts130f.json @@ -553,92 +553,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:8d:b7:7a:50-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:8d:b7:7a:50:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", - "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:8d:b7:7a:50-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:8d:b7:7a:50:2:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:8d:b7:7a:50", - "endpoint_id": 2, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tz3000-ltiqubue-ts130f.json b/tests/data/devices/tz3000-ltiqubue-ts130f.json index 1960d7d42..fb8896acb 100644 --- a/tests/data/devices/tz3000-ltiqubue-ts130f.json +++ b/tests/data/devices/tz3000-ltiqubue-ts130f.json @@ -198,7 +198,7 @@ "entity_category": null, "entity_registry_enabled_default": true, "enabled": true, - "primary": false, + "primary": true, "cluster_handlers": [ { "class_name": "WindowCoveringClusterHandler", @@ -365,50 +365,6 @@ "state": null } } - ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:43:3b:68:f1-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:43:3b:68:f1:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:43:3b:68:f1", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } ] }, "neighbors": [], diff --git a/tests/data/devices/tz3000-qa8s8vca-ts130f.json b/tests/data/devices/tz3000-qa8s8vca-ts130f.json index 899230adb..bf1e358f6 100644 --- a/tests/data/devices/tz3000-qa8s8vca-ts130f.json +++ b/tests/data/devices/tz3000-qa8s8vca-ts130f.json @@ -162,7 +162,7 @@ "entity_category": null, "entity_registry_enabled_default": true, "enabled": true, - "primary": false, + "primary": true, "cluster_handlers": [ { "class_name": "WindowCoveringClusterHandler", @@ -330,50 +330,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:fb:49:87:24-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:fb:49:87:24:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:fb:49:87:24", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tz3000-vw8pawxa-ts130f.json b/tests/data/devices/tz3000-vw8pawxa-ts130f.json index 85c393592..61d0d3cd2 100644 --- a/tests/data/devices/tz3000-vw8pawxa-ts130f.json +++ b/tests/data/devices/tz3000-vw8pawxa-ts130f.json @@ -256,7 +256,7 @@ "entity_category": null, "entity_registry_enabled_default": true, "enabled": true, - "primary": false, + "primary": true, "cluster_handlers": [ { "class_name": "WindowCoveringClusterHandler", @@ -380,50 +380,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:47:c9:40:68-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:47:c9:40:68:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:47:c9:40:68", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze200-byzdayie-ts0601.json b/tests/data/devices/tze200-byzdayie-ts0601.json index 4d7a9dce0..5f35e8d27 100644 --- a/tests/data/devices/tze200-byzdayie-ts0601.json +++ b/tests/data/devices/tze200-byzdayie-ts0601.json @@ -562,7 +562,7 @@ "entity_category": null, "entity_registry_enabled_default": true, "enabled": true, - "primary": false, + "primary": true, "cluster_handlers": [ { "class_name": "MeteringClusterHandler", @@ -743,50 +743,6 @@ ] } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d9:70:11:36-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:d9:70:11:36:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d9:70:11:36", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze200-cpmgn2cf-ts0601.json b/tests/data/devices/tze200-cpmgn2cf-ts0601.json index 11ddf8424..342b927f7 100644 --- a/tests/data/devices/tze200-cpmgn2cf-ts0601.json +++ b/tests/data/devices/tze200-cpmgn2cf-ts0601.json @@ -1662,90 +1662,6 @@ "state": false, "available": true } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:e8:32:c6:e4-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:e8:32:c6:e4:2:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", - "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:e8:32:c6:e4-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:e8:32:c6:e4:6:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:e8:32:c6:e4", - "endpoint_id": 6, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } } ], "update": [ diff --git a/tests/data/devices/tze200-ewxhg6o9-ts0601.json b/tests/data/devices/tze200-ewxhg6o9-ts0601.json index 947a4f616..c62954034 100644 --- a/tests/data/devices/tze200-ewxhg6o9-ts0601.json +++ b/tests/data/devices/tze200-ewxhg6o9-ts0601.json @@ -500,7 +500,7 @@ "entity_category": null, "entity_registry_enabled_default": true, "enabled": true, - "primary": false, + "primary": true, "cluster_handlers": [ { "class_name": "MeteringClusterHandler", @@ -681,50 +681,6 @@ ] } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:5e:6a:9a:13-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:5e:6a:9a:13:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:5e:6a:9a:13", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze204-4fblxpma-ts0601.json b/tests/data/devices/tze204-4fblxpma-ts0601.json index f4de8142f..790d8708e 100644 --- a/tests/data/devices/tze204-4fblxpma-ts0601.json +++ b/tests/data/devices/tze204-4fblxpma-ts0601.json @@ -355,50 +355,6 @@ ] } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:f4:04:0c: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:f4:04:0c:92:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:f4:04:0c:92", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze204-bkkmqmyo-ts0601.json b/tests/data/devices/tze204-bkkmqmyo-ts0601.json index 39d7bf97b..9a5fa4fb2 100644 --- a/tests/data/devices/tze204-bkkmqmyo-ts0601.json +++ b/tests/data/devices/tze204-bkkmqmyo-ts0601.json @@ -780,50 +780,6 @@ ] } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:83:e9:5e:8c-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:83:e9:5e:8c:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:83:e9:5e:8c", - "endpoint_id": 1, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze204-dqolcpcp-ts0601.json b/tests/data/devices/tze204-dqolcpcp-ts0601.json index a1e7fdbd8..667592b5e 100644 --- a/tests/data/devices/tze204-dqolcpcp-ts0601.json +++ b/tests/data/devices/tze204-dqolcpcp-ts0601.json @@ -620,512 +620,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "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:d2:57:29:bb-10-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": 10, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "10:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:10:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 10, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-11-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": 11, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "11:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:11:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 11, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-12-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": 12, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "12:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:12:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 12, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:2:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "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:d2:57:29:bb-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:d2:57:29:bb:3:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 3, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:4:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 4, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:5:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 5, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-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:d2:57:29:bb:6:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 6, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-7-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": 7, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "7:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:7:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 7, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-8-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": 8, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "8:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:8:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 8, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:d2:57:29:bb-9-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": 9, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "9:0x0006", - "unique_id": "ab:cd:ef:12:d2:57:29:bb:9:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:d2:57:29:bb", - "endpoint_id": 9, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { diff --git a/tests/data/devices/tze204-vmcgja59-ts0601.json b/tests/data/devices/tze204-vmcgja59-ts0601.json index e061f0361..cb1ef3175 100644 --- a/tests/data/devices/tze204-vmcgja59-ts0601.json +++ b/tests/data/devices/tze204-vmcgja59-ts0601.json @@ -671,680 +671,6 @@ } } ], - "switch": [ - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:1:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "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:31:d2:60:17-10-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": 10, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "10:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:10:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 10, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-11-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": 11, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "11:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:11:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 11, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-12-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": 12, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "12:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:12:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 12, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-13-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": 13, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "13:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:13:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 13, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-14-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": 14, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "14:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:14:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 14, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-15-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": 15, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "15:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:15:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 15, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-16-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": 16, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "16:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:16:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 16, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:2:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "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:31:d2:60:17-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:31:d2:60:17:3:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 3, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:4:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 4, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:5:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 5, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-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:31:d2:60:17:6:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 6, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-7-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": 7, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "7:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:7:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 7, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-8-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": 8, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "8:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:8:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 8, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - }, - { - "info_object": { - "fallback_name": null, - "unique_id": "ab:cd:ef:12:31:d2:60:17-9-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": 9, - "cluster": { - "id": 6, - "name": "On/Off", - "type": "server" - }, - "id": "9:0x0006", - "unique_id": "ab:cd:ef:12:31:d2:60:17:9:0x0006", - "status": "INITIALIZED", - "value_attribute": "on_off" - } - ], - "device_ieee": "ab:cd:ef:12:31:d2:60:17", - "endpoint_id": 9, - "available": true, - "group_id": null - }, - "state": { - "class_name": "Switch", - "state": false, - "available": true - } - } - ], "update": [ { "info_object": { From c86562e4317ba434783eaf3e8b3730d3f7a6a489 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 17 Dec 2025 15:17:53 -0500 Subject: [PATCH 4/5] Update tools/import_diagnostics.py Co-authored-by: TheJulianJES --- tools/import_diagnostics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/import_diagnostics.py b/tools/import_diagnostics.py index 75e1fcb5c..8fc1d0e70 100644 --- a/tools/import_diagnostics.py +++ b/tools/import_diagnostics.py @@ -215,7 +215,7 @@ def zigpy_device_from_legacy_diagnostics( # noqa: C901 patch_cluster_for_testing(real_cluster) for attr_id, attr in cluster["attributes"].items(): if ( - attr.get("value", None) is None + attr.get("value") is None or attr_id in cluster["unsupported_attributes"] ): continue From 2944583858d5d1c5467ae4f4dfbb5188fed7e53f Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Wed, 17 Dec 2025 15:18:00 -0500 Subject: [PATCH 5/5] Update tools/import_diagnostics.py Co-authored-by: TheJulianJES --- tools/import_diagnostics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/import_diagnostics.py b/tools/import_diagnostics.py index 8fc1d0e70..dbbe7b692 100644 --- a/tools/import_diagnostics.py +++ b/tools/import_diagnostics.py @@ -256,7 +256,7 @@ def zigpy_device_from_legacy_diagnostics( # noqa: C901 patch_cluster_for_testing(real_cluster) for attr_id, attr in cluster["attributes"].items(): if ( - attr.get("value", None) is None + attr.get("value") is None or attr_id in cluster["unsupported_attributes"] ): continue