[SOLVED] TRÅDFRI remote control and deconz

Hello all,
I have a TRÅDFRI remote control (the 5 buttuns one) detected on deconz. In HA I see it as device, but I cannot understand hot to find it as entity in order to use it in some automations.

Could someone point me in the right direction?

tnx

Read here…

Hi,

I am using a hue dimmer in node red that I connected to my Conbee. At first I couldn’t find the dimmer in the entities list, only the battery enitity. I added the “event all” node in node red to listen to all events from deconz.
event
Then I use a switch node to filter out the events from this specific dimmer switch.
switch
And after that I can use the button presses for my automations.
In case you’re not using node-red, here is an example I found on how to create an automation. I guess you’re looking for the trigger part.

- alias: 'Turn On Bedroom from dimmer normal'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: bedroom_switch
      event: 1002
  action:
    - service: light.turn_on
      data:
        entity_id:
          - light.bedroom
        brightness_pct: 50

Hope it helps!

Thank you for the link, but could you more specific?

Thanks but I don’t use nodered yet

More specific… you need to click on the link and read the text which appears on your screen :wink: Seriously, it explains exactly what you’re asking.

1 Like

He even linked you directly to the section for remote controls and Marvin provided an example automation without nodered…

Ok, I’ve understood the RTFM part, but it does not help :frowning:

The Listen to events “works”

but I cannot debug why the toggle command does not work?!?

What toggle command? post your code

- alias: 'Accendi luci salotto'
  initial_state: 'off'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: tradfri_remote_control
      event: 1002
  action:
    service: light.toggle
    entity_id: light.soggiorno

This seems to be your problem

what does it mean? I’ve wrote it as I expect the lights to be off at the beginning

That is not how it works, the initial state switches the automation on/off at start of HA, not your lights. And since you understand the RTFM part :wink: check this and this.
I would advice to not use toggle but assign light.turn_on and light_turn_off to two different buttons on your remote.

2 Likes

Thank you @sjee this was the only thing I’ve not seen is that the automation itself was off!! what a shame!!! :smiley:

1 Like