Zigbee - MODIFYING THE DEVICE TYPE

SOLVED:

I didn’t realize that new entities would be created. The old light. entities still existed. Once I went in via the ZHA integration to the devices I could see two entities, one being light. the other being switch. I simply deleted the original light. and renamed the switch. to the name I want.

As other have pointed out, sometimes a Zigbee device shows up with the incorrect domain. In my case I have Sonoff ZBMINI switches that show up as lights.

I’ve followed the Zigbee documentation exactly. I’ve checked the IEEE info several times. But these devices still show up as lights.

I’d very much appreciate pointers to what I am doing incorrectly.

The Zigbee documentation states

MODIFYING THE DEVICE TYPE
As not all device manufacturers follow the Zigbee standard, at times a device can be incorrectly classified. For example, a switch could be classified as a light.

To correct the device type, also called domain, add the following to your configuration.yaml and restart Home Assistant:

zha:
  device_config:
    84:71:27:ff:fe:93:17:24-1:    # format: {ieee}-{endpoint_id}
      type: "switch"              # corrected device type
YAML
{ieee} is the device hardware address which can be read from the Home Assistant UI when looking at Device info. From device info, you can find the {endpoint_id} by viewing the Zigbee device signature.

This is a redacted version of my configuration.yaml

# Zigbee Configuration
zha:
  zigpy_config:
    network:
      channel: 15             # What channel the radio should try to use.
      channels: [15, 20, 25]  # Channel mask
  device_config:
    aa:bb:cc:dd:ee:ff:gg:hh-1:    # format: {ieee}-{endpoint_id}
      type: "switch" 

This is a UI screenshot for this item:

And this a screenshot of the Zigbee device info.

The full text of the device signature is below.

{
  "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=4742, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=11264, maximum_outgoing_transfer_size=160, 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",
        "0xfc57"
      ],
      "out_clusters": [
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "SONOFF",
  "model": "01MINIZB",
  "class": "zigpy.device.Device"
}
1 Like

Do you have any idea on how to find the device hardware address (ieee) as well the endpoint-id on a non-zigbee device?

Silly question I managed to change my device type to “switch” with the below code for one device, but how do I add multiple devices that have the incorrect device type which is currently “light” but I want “switch”. I get an error in my configuration.yaml file when trying to add more then one. Not sure how to add it correctly.

Any help would be great.

Cheers
Craig

zha:
device_config:
84:71:27:ff:fe:93:17:24-1:
‘Add another ieee light’ -#get error when added like this
‘Add another ieee light’
type: “switch”

Try it like this instead:

zha:  
  device_config:
    84:71:27:ff:fe:93:17:24-1:
      type: "switch"
    xx:xx:xx:xx:xx:xx:xx:xx-1:
      type: "switch"
    xx:xx:xx:xx:xx:xx:xx:xx-1:
      type: "switch"

Hi Klidberg,
Gave your suggestion a try but no joy yaml states a duplicate key, also tried appending with a dash

just not sure how to add multple devices

1 Like

Your indendation is off, every IEEE needs to be on the same ‘height’. Your second entry is one more indentation to the right.

Noxeus,

You legend! Just solved the issue and you are right. My indendations was the issue all along. Silly mistake.

Thank you so much. Configured below all working correctly.

zha:
  device_config: #Config Light as Switch Device Type
    00:0d:6f:00:05:a2:ff:9b-1: #Desk Power
      type: "switch"
    00:0d:6f:00:05:7b:5b:d9-1: #Qettle Power
      type: "switch"
    00:0d:6f:00:05:7b:ac:33-1: #Dryer
      type: "switch"
3 Likes

Also wondering this…

zha:
device_config:
‘xx:xx:xx:xx:xx:xx:af:21-1’:
type: ‘lock’
‘xx:xx:xx:xx:xx:xx:6c:1b-1’:
type: ‘fan’

do we have somewhere the list of available device types?
I’m trying to change device type of some light bulbs so they not act as router, tried using “EndDevice” but did not work

You are trying to do something that is not possible.

But this would be far easier than searching for the ZigBee switch modules supporting decoupled mode and having the possibility of direct binding to the smart lights. If truly not possible, does somebody know such smart switch modules that fit in round wall boxes and have this functionality? Sadly, Girier Tuya-based modules do not support this. Can we hope this feature to be added with firmware updates?

If you can convince the manufacturer of your lights to add that feature in a firmware update, sure. Sengled bulbs are not routers, but as far as I know, the only manufacturer of non-routing bulbs.

If you want decoupled mode, the Aqara T2 relay supports this, as do most of their zigbee switches.

This list should be enough to get you started, but you’ll need to ignore anything battery powered.

When trying to turn an Jasco Enbrighten Zigbee switch from light to switch, I got the ie (mac address) from devices → Settings, but not sure how to figure out which endpoint to use to select device type. I added this to my configuration.yaml


zha:
  device_config: #Config Light as Switch Device Type
    00:22:a3:00:00:26:68:63-1: #Pot Light North {ieee}-{endpoint_id}
      type: "switch"

But when I re-boot, the device simply becomes unavailable.

Check if a duplicate device was added from dev tools. If not, double check that your device is indeed using endpoint 1 as per the first post.

  "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=4742, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=11264, maximum_outgoing_transfer_size=160, 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",
        "0xfc57"
      ],
      "out_clusters": [
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "SONOFF",
  "model": "01MINIZB",
  "class": "zigpy.device.Device"
}

This is the info for my device in the form as in post #1:

{
  "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.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4388, maximum_buffer_size=82, maximum_incoming_transfer_size=255, server_mask=0, maximum_outgoing_transfer_size=255, 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": "0x0104",
      "device_type": "0x0100",
      "input_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0702",
        "0x0b05"
     ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": "0x0104",
      "device_type": "0x0103",
      "input_clusters": [
        "0x0000",
        "0x0003",
        "0x0b05"
      ],
      "output_clusters": [
        "0x0003",
        "0x0006"
      ]
    }
  },

I’m not sure what it tells me in terms of its ability to switch types other than the fact that there seem to be two different device types.

Ok, two things to try.

  • Answer my first question regarding whether a duplicate device (starting with switch) was created. You can search for it in dev tools.
  • Your Jasco switch also has endpoint ID 2. Try changing the endpoint your code to this:
zha:
  device_config:
    00:22:a3:00:00:26:68:63-2: #changed to endpoint 2
      type: "switch"

If that still doesn’t work try it with both endpoints set to switch:

zha:
  device_config: #Config Light as Switch Device Type
    00:22:a3:00:00:26:68:63-1: #endpoint 1
      type: "switch"
    00:22:a3:00:00:26:68:63-2: #endpoint 2
      type: "switch"

Remember to keep checking Dev Tools to see if new switch entities were created.

Worked great with the -2. Thank you.

1 Like