ZHA - Two zigbee devices ("TZ3000_xkap8wtb" & "TZ3000_rmjr4ufz") are identified as lights, but they are switches

Summary

  • Two zigbee devices are identified as lights, but they are switches. How can I fix this?

Devices

"TZ3000_xkap8wtb"
and
"TZ3000_rmjr4ufz"

1. Setup

  • Home Assistant Supervised
  • ZHA
  • Conbee 2 dongle, including usb extension cord

Relevant Configuration edits;

[...]
zha_toolkit:
zha:
  device_config:
    a4:c1:38:df:18:13:5b:6d:
      type: "switch"
  enable_quirks: true
  custom_quirks_path: /config/zha/quirks
[...]

I have installed ZHA Toolkit through HACS, hoping that this tool would allow me to edit some kind of file or information, but sadly I have not been able to understand the ZHA Toolkit-integration at all.

image

I have tried to apply a “quirk”, without knowing what it should do.
See information below.

2. Issue at hand

  • Two different zigbee devices, see below, are wrongly identified as domain “light”, when they should be identified as domain “switch”.

3. Devices.
Two devices, both devices are to be installed inside wall, behind outlet or behind light switch.

3.1. Device 1.
Inside wall/behind physical wall light switch, with no power meter function

    "manufacturer": "_TZ3000_rmjr4ufz",
    "model": "TS0001",
    "name": "_TZ3000_rmjr4ufz TS0001",


Device 1. HA\Integration\Devices\Device information

image
Device 1. ZHA\Visualization

Quirk applied;

"""TS011F plug."""

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
    Basic,
    GreenPowerProxy,
    Groups,
    Identify,
    OnOff,
    Ota,
    Scenes,
    Time,
)
from zigpy.zcl.clusters.homeautomation import ElectricalMeasurement
from zigpy.zcl.clusters.smartenergy import Metering

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODEL,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    TuyaNewManufCluster,
    TuyaZBE000Cluster,
    TuyaZBElectricalMeasurement,
    TuyaZBExternalSwitchTypeCluster,
    TuyaZBMeteringCluster,
    TuyaZBOnOffAttributeCluster,
)
from zhaquirks.tuya.mcu import EnchantedDevice


class Plug_4AC_2USB_cfnprab5(EnchantedDevice):
    """Tuya 4 outlet + 2 USB surge protector with restore power state support."""

    signature = {
        MODEL: "TS011F",
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=266
            # device_version=1
            # input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
            # output_clusters=[10, 25]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            # <SimpleDescriptor endpoint=2 profile=260 device_type=266
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=3 profile=260 device_type=266
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=4 profile=260 device_type=266
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=5 profile=260 device_type=266
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            5: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
            # device_version=1
            # input_clusters=[]
            # output_clusters=[33]>
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            5: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }


Device 1. Front


Device 1. Back


Device 1. Back


Device 1. Under, back


Device 1. Under, front

3.2. Device 2.
Inside wall/behind physical wall light switch, WITH FUNCTIONING power meter function

    "manufacturer": "_TZ3000_xkap8wtb",
    "model": "TS0001",
    "name": "_TZ3000_xkap8wtb TS0001",


Device 2. HA\Integration\Devices\Device information


Device 2. Under


Device 2. Back


Device 2. Front

4. Question
How can I mitigate this?
If there is a way, please describe the correct way to implement the suggested sollution.

I have

Device 1
Downloaded diagnostics for the device;

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.10.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Stockholm",
    "os_name": "Linux",
    "os_version": "5.15.61-v8",
    "supervisor": "2022.10.0",
    "host_os": "Home Assistant OS 9.2",
    "docker_version": "20.10.17",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.1.0",
      "requirements": []
    },
    "waste_collection_schedule": {
      "version": "1.27.0",
      "requirements": [
        "icalendar",
        "recurring_ical_events",
        "icalevents",
        "bs4"
      ]
    },
    "webrtc": {
      "version": "v2.3.1",
      "requirements": []
    },
    "mikrotik_router": {
      "version": "0.0.0",
      "requirements": [
        "librouteros>=3.2.0",
        "mac-vendor-lookup>=0.1.12"
      ]
    },
    "browser_mod": {
      "version": "2.1.2",
      "requirements": []
    },
    "zha_toolkit": {
      "version": "v0.8.20",
      "requirements": [
        "packaging>=20.8"
      ]
    },
    "hacs": {
      "version": "1.28.0",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "nordpool": {
      "version": "0.0.7",
      "requirements": [
        "nordpool>=0.2"
      ]
    },
    "swemail": {
      "version": "1.0.4",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.8.3",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "wiz_light": {
      "version": "0.4.1",
      "requirements": [
        "pywizlight==0.4.6"
      ]
    },
    "eufy_security": {
      "version": "2.8.0",
      "requirements": [
        "websocket-client==1.1.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "requirements": [
      "bellows==0.34.2",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.82",
      "zigpy-deconz==0.19.0",
      "zigpy==0.51.3",
      "zigpy-xbee==0.16.2",
      "zigpy-zigate==0.10.2",
      "zigpy-znp==0.9.1"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      }
    ],
    "dependencies": [
      "file_upload"
    ],
    "after_dependencies": [
      "onboarding",
      "usb",
      "zeroconf"
    ],
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 45633,
    "manufacturer": "_TZ3000_rmjr4ufz",
    "model": "TS0001",
    "name": "_TZ3000_rmjr4ufz TS0001",
    "quirk_applied": true,
    "quirk_class": "zhaquirks.tuya.ts000x.Switch_1G_GPP",
    "manufacturer_code": 4417,
    "power_source": "Mains",
    "lqi": 255,
    "rssi": -67,
    "last_seen": "2022-10-16T17:41:07",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": 260,
          "device_type": "0x0100",
          "in_clusters": [
            "0x0000",
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006",
            "0xe000",
            "0xe001"
          ],
          "out_clusters": [
            "0x000a",
            "0x0019"
          ]
        }
      }
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "button.barnrummet_taklampa_identifybutton",
        "name": "_TZ3000_rmjr4ufz TS0001"
      },
      {
        "entity_id": "light.barnrummet_taklampa",
        "name": "_TZ3000_rmjr4ufz TS0001"
      }
    ],
    "neighbors": [
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Parent",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x1AD5",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "118"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x3217",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "85"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x696F",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "66"
      },
      {
        "device_type": "Coordinator",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x0000",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "69"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x518C",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "85"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x4610",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "48"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x6174",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "51"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xCAC2",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "36"
      },
      {
        "device_type": "EndDevice",
        "rx_on_when_idle": "Off",
        "relationship": "Child",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xB2C7",
        "permit_joining": "Unknown",
        "depth": "3",
        "lqi": "91"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xD40B",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "30"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xC54E",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "33"
      }
    ],
    "endpoint_names": [
      {
        "name": "ON_OFF_LIGHT"
      }
    ],
    "user_given_name": "Barnrummet taklampa",
    "device_reg_id": "598f5e37a9c669158f811441304e67ba",
    "area_id": "barnrummet",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0000": {
                "attribute_name": "zcl_version",
                "value": 3
              },
              "0x0001": {
                "attribute_name": "app_version",
                "value": 68
              },
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZ3000_rmjr4ufz"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0001"
              },
              "0x0007": {
                "attribute_name": "power_source",
                "value": 1
              },
              "0xfffe": {
                "attribute_name": "attr_reporting_status",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              },
              "0x4001": {
                "attribute_name": "on_time",
                "value": 0
              },
              "0x4002": {
                "attribute_name": "off_wait_time",
                "value": 0
              },
              "0x8002": {
                "attribute_name": "power_on_state",
                "value": 2
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0xe000": {
            "endpoint_attribute": "tuya_is_pita_0",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xe001": {
            "endpoint_attribute": "tuya_external_switch_type",
            "attributes": {
              "0xd030": {
                "attribute_name": "external_switch_type",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

device 2
Downloaded diagnostics for the device

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.10.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Stockholm",
    "os_name": "Linux",
    "os_version": "5.15.61-v8",
    "supervisor": "2022.10.0",
    "host_os": "Home Assistant OS 9.2",
    "docker_version": "20.10.17",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.1.0",
      "requirements": []
    },
    "waste_collection_schedule": {
      "version": "1.27.0",
      "requirements": [
        "icalendar",
        "recurring_ical_events",
        "icalevents",
        "bs4"
      ]
    },
    "webrtc": {
      "version": "v2.3.1",
      "requirements": []
    },
    "mikrotik_router": {
      "version": "0.0.0",
      "requirements": [
        "librouteros>=3.2.0",
        "mac-vendor-lookup>=0.1.12"
      ]
    },
    "browser_mod": {
      "version": "2.1.2",
      "requirements": []
    },
    "zha_toolkit": {
      "version": "v0.8.20",
      "requirements": [
        "packaging>=20.8"
      ]
    },
    "hacs": {
      "version": "1.28.0",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "nordpool": {
      "version": "0.0.7",
      "requirements": [
        "nordpool>=0.2"
      ]
    },
    "swemail": {
      "version": "1.0.4",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.8.3",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "wiz_light": {
      "version": "0.4.1",
      "requirements": [
        "pywizlight==0.4.6"
      ]
    },
    "eufy_security": {
      "version": "2.8.0",
      "requirements": [
        "websocket-client==1.1.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "requirements": [
      "bellows==0.34.2",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.82",
      "zigpy-deconz==0.19.0",
      "zigpy==0.51.3",
      "zigpy-xbee==0.16.2",
      "zigpy-zigate==0.10.2",
      "zigpy-znp==0.9.1"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      }
    ],
    "dependencies": [
      "file_upload"
    ],
    "after_dependencies": [
      "onboarding",
      "usb",
      "zeroconf"
    ],
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp"
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 56542,
    "manufacturer": "_TZ3000_xkap8wtb",
    "model": "TS0001",
    "name": "_TZ3000_xkap8wtb TS0001",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "manufacturer_code": 4417,
    "power_source": "Mains",
    "lqi": 255,
    "rssi": -78,
    "last_seen": "2022-10-16T17:41:18",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": 260,
          "device_type": "0x0100",
          "in_clusters": [
            "0x0000",
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006",
            "0x0702",
            "0x0b04",
            "0xe000",
            "0xe001"
          ],
          "out_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "242": {
          "profile_id": 41440,
          "device_type": "0x0061",
          "in_clusters": [],
          "out_clusters": [
            "0x0021"
          ]
        }
      }
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "button.tz3000_xkap8wtb_ts0001_identifybutton_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "light.tz3000_xkap8wtb_ts0001_light_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "sensor.tz3000_xkap8wtb_ts0001_electricalmeasurement_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "sensor.tz3000_xkap8wtb_ts0001_electricalmeasurementrmscurrent_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "sensor.tz3000_xkap8wtb_ts0001_electricalmeasurementrmsvoltage_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "sensor.tz3000_xkap8wtb_ts0001_electricalmeasurementpowerfactor_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      },
      {
        "entity_id": "sensor.tz3000_xkap8wtb_ts0001_smartenergysummation_2",
        "name": "_TZ3000_xkap8wtb TS0001"
      }
    ],
    "neighbors": [
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Parent",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x65DA",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "51"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x0C7F",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "21"
      },
      {
        "device_type": "Coordinator",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x0000",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "51"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x696F",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "30"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xD3C7",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "42"
      }
    ],
    "endpoint_names": [
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "unknown 97 device_type of 0xa1e0 profile id"
      }
    ],
    "user_given_name": "Eluttag diskmaskin",
    "device_reg_id": "aa41c247bc59f8390e1271ca5de671d4",
    "area_id": "kok",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 1
              },
              "0x4001": {
                "attribute_name": "on_time",
                "value": 0
              },
              "0x4002": {
                "attribute_name": "off_wait_time",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0x0702": {
            "endpoint_attribute": "smartenergy_metering",
            "attributes": {
              "0x0000": {
                "attribute_name": "current_summ_delivered",
                "value": 228
              },
              "0x0200": {
                "attribute_name": "status",
                "value": 0
              },
              "0x0300": {
                "attribute_name": "unit_of_measure",
                "value": 0
              },
              "0x0303": {
                "attribute_name": "summation_formatting",
                "value": 0
              },
              "0x0306": {
                "attribute_name": "metering_device_type",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x0400": {
                "attribute_name": "instantaneous_demand"
              },
              "0x0301": {
                "attribute_name": "multiplier"
              },
              "0x0302": {
                "attribute_name": "divisor"
              },
              "0x0304": {
                "attribute_name": "demand_formatting"
              }
            }
          },
          "0x0b04": {
            "endpoint_attribute": "electrical_measurement",
            "attributes": {
              "0x0505": {
                "attribute_name": "rms_voltage",
                "value": 231
              },
              "0x0508": {
                "attribute_name": "rms_current",
                "value": 0
              },
              "0x050b": {
                "attribute_name": "active_power",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x0300": {
                "attribute_name": "ac_frequency"
              },
              "0x0601": {
                "attribute_name": "ac_voltage_divisor"
              },
              "0x0302": {
                "attribute_name": "ac_frequency_max"
              },
              "0x0603": {
                "attribute_name": "ac_current_divisor"
              },
              "0x050f": {
                "attribute_name": "apparent_power"
              },
              "0x0602": {
                "attribute_name": "ac_current_multiplier"
              },
              "0x0605": {
                "attribute_name": "ac_power_divisor"
              },
              "0x0507": {
                "attribute_name": "rms_voltage_max"
              },
              "0x0604": {
                "attribute_name": "ac_power_multiplier"
              },
              "0x050a": {
                "attribute_name": "rms_current_max"
              },
              "0x0000": {
                "attribute_name": "measurement_type"
              },
              "0x0403": {
                "attribute_name": "power_divisor"
              },
              "0x050d": {
                "attribute_name": "active_power_max"
              },
              "0x0400": {
                "attribute_name": "ac_frequency_multiplier"
              },
              "0x0401": {
                "attribute_name": "ac_frequency_divisor"
              },
              "0x0402": {
                "attribute_name": "power_multiplier"
              },
              "0x0600": {
                "attribute_name": "ac_voltage_multiplier"
              }
            }
          },
          "0xe000": {
            "endpoint_attribute": null,
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xe001": {
            "endpoint_attribute": null,
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZ3000_xkap8wtb"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0001"
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "242": {
        "device_type": {
          "name": "unknown",
          "id": 97
        },
        "profile_id": 41440,
        "in_clusters": {},
        "out_clusters": {
          "0x0021": {
            "endpoint_attribute": "green_power",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

I’m interested too, I have the same issue.

I forced the device to accept the domain “switch” by adding this to my configuration.yaml
Please be aware of the “-1” AFTER the IEEE-address

zha:
  device_config:
    a4:c1:38:df:18:13:5b:6d-1:
      type: "switch"
      
    a4:c1:38:3e:88:5f:d3:70-1:
      type: "switch"
      
    a4:c1:38:dd:a5:6f:3d:07-1:
      type: "switch"

This is the device info page under settings

Press the three buttons to access the menu for the device, and press “Manage zigbee device”

Look for “Endpoint id: ___”
In this case “1”

1 Like

Problem is that the manufacturer’s firmware developer have configured incorrect device type in the firmware for that device, so you can either choose to just temporarly workaround that by just modifying to the correct device type (under device config in YAML) as per the ZHA documentation or you could post new device support request to ZHA Device Handlers to ask for a quirk that aleays changes device type to corrected device type for that product (Zigbee device signature) permanently → https://github.com/zigpy/zha-device-handlers/issues

The reason why is explained in ZHA docs here → https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling but it boils down to the manufacturer not following the standard clusters and attributes set in the official Zigbee Cluster Library specifications.

2 Likes

I love it when a group decides to create a standard for the greater good of the consumer,
and then some moron goes and completely ignores it.

  • I’ll try to post a request for a new quirk.
    Thanks :vulcan_salute:
1 Like

FYI, I believe there is also an helper in Home Assistant for changibg device type but again that does not solve the root cause so if you or someone else ads an identical device then need to change device type that top. However if there is a ZHA Device Handler quirk then it will automatically load that quirk fix for everyone each time.

1 Like

I faced the same problem. Your solution helped - thank you!