TRÅDFRI -> deconz -> Hassio -> Toggle MQTT Switch

Hello,

i´m just to stupid to get it working. I bought a Tradfri Remote and would like to use it as a simple button to toggle a switch.

So, this is what i´ve got and what i´ve did:

  • hassio on a pie 0.82.1
  • deconz with a raspbee
  • paired tradfri with deconz
  • testet tradfri with a ikea bulb → working fine

Output debug when on/off pressed:

2018-11-21 21:52:17 DEBUG (MainThread) [pydeconz.deconzdevice] TRADFRI: update buttonevent with 1002
2018-11-21 21:52:17 DEBUG (MainThread) [pydeconz.deconzdevice] TRADFRI: update lastupdated with 2018-11-21T20:52:17
2018-11-21 21:52:17 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {“e”:“changed”,“id”:“2”,“r”:“sensors”,“state”:{“buttonevent”:1002,“lastupdated”:“2018-11-21T20:52:17”},“t”:“event”,“uniqueid”:“90:fd:9f:ff:fe:fb:6b:6d-01-1000”}

Output deconz AddOn when pressing on/off:

21:48:14:534 button 1002 Toggle
21:48:14:539 discard sensor state push for 2: state/lastupdated (already pushed)

I thought, great make a simple automation:

  • id: ‘1542824138492’
    alias: testTradfri
    trigger:
  • platform: event
    event_type: deconz_event
    event_data:
    id: “tradfri”
    event: 1002
    action:
  • service: switch.toggle
    entity_id: switch.esstisch

reloaded Automatations, restartet hassio:

Edit: Insatlled NodeRed made a Debug output and getting:

deconz_event : msg.payload : Object
object
event_type: “deconz_event”
event: object
id: “tradfri”
event: 1002

But nothing happens. I my opinion…i´ve got a simple error in id or event of deconz event :frowning:

Anyone there who can help solving the problem?
Thanks a lot

P.S.: Sorry for my poor english

Solved!
Had to be set to:

  • id: ‘1542824138492’
    alias: testTradfri
    trigger:
    platform: event
    event_type: deconz_event
    event_data:
    id: “tradfri”
    event: 1002
    action:
    • service: switch.toggle
      entity_id: switch.esstisch