IKEA Tradfri On/Off Switch only appears in HA as battery level

I just got a Sonoff CC2531 USB Dongle and an Ikea Tradfri On/Off Zigbee switch. It “pairs” successfully to HA however the only entity that appears is its battery level and that is not very useful to me.

I am trying to use this switch:

and this USB dongle:

This theoretically should work and any help would be appreciated.

I do believe you need to install the Zigbee2MQTT Hass.io add-on from the Add-on Store.

and this controllerX for controlling any lights.

1 Like

You should see more :

I am not sure which integration you are using, in ZHA you will only see the battery for example. I got 3 of these switches working with ZHA throug Node-Red but there are other options now.

If you are using ZHA, you need to listen to zha_events or use a Blueprint like this one:

If you are using different integration, try to find a Blueprint which works with the integration you are using.

How did you get them working in Node-Red? Would you mind sharing your flow? I have the same problem and haven’t been able to figure out how to get it to work. My programming skills are just barely above “copy and paste examples” but that’s probably an over inflation of my abilities…

What did you do to get these entities? In my case ZHA has failed at reconfiguration and does not show any entities. Battery level is shown with question mark.
Same situation with volume controller “symfonisk”.

If you use ZHA, you have to listen to events.

If you use device as trigger in an automation (either in HA or Node red) you will see them listed there.

Hi Francis, the events appear as expected when listening to ‘zha_event’ (I compared them to the code in the blueprint). However, they do not show as an entity of the device, Only the battery does. I conclude that ZHA Is “seeing” these button clicks, but is not able to map them to the device entity. It also seems that the device is expecting the entities (see yellow explanation marks in the image).

2022-06-26 09_40_15-Settings – Home Assistant

Is there maybe a way to do the mapping manually?

I only started with HA a week ago, besides this everything has been going very smooth, so it’s a bit frustrating. Maybe the solution is right under my nose, but I can’t see it due to lack of experience.

Don’t use a device automation, listen to the events.

Just bought some of these switches and have the same problem.

I also tried listening for events in automation, but there’s absolutely nothing happening.

alias: IKEA Test
description: ""
trigger:
  - device_id: 490a774d765e3d31f19950a3e6ec2a1b
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: turn_off
condition: []
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.beep
mode: single

This is device trigger, not event.
Go to developer tools and listen for the events and see what happens.

Thanks for helping, I have added an event listener, but where can I actually view these events ??

OK, I presume these should be visible in the left menu “Logbook”

But I see no events there when I press the 1/0 buttons:

stay in the events page and look at it when you press the button

Thanks, nothing happens at all, I tried that before I posted.

I pressed the buttons dozens of times, I also tried opening / closing other zigbee door sensors and they also did not appear in the events page/tab, I just don’t get anything at all

:frowning:

I suspect something is broken in the latest release.

edit

OK it I press the pairing button 4 times quickly I get this:

event_type: zha_event
data:
  device_ieee: 84:fd:27:ff:fe:9f:13:ab
  unique_id: 84:fd:27:ff:fe:9f:13:ab
  device_id: 490a774d765e3d31f19950a3e6ec2a1b
  device_event_type: device_offline
origin: LOCAL
time_fired: "2023-04-06T12:05:07.591639+00:00"
context:
  id: 01GXB79JW7QC6VR3TG38Q7FKPV
  parent_id: null
  user_id: null

But thereafter I dont get anything at all when I push the on/off 0/1 button.

The device is paired and online, the LQI is very good:

Try and delete the device from Haa, factory reset the remote and add it again.

Sorry everyone, I made this topic awhile ago before I switched to a Conbee II and Zigbee2MQTT. I’ll mark this topic as solved.

@Mstar365 - sorry to Hijack it

Thanks, yes deleted, factory reset device and added again, exactly the same, no events created by pushing the buttons, the only even that is created is when I reset / re-enable pairing on the device, that will trigger a zha event but button presses never do.

Is your ZigBee controller up to date?
I know I had to update m
The firmware of my Conbee II for it to works with one of the IKEA remotes.
Can’t remember which