Ah, that makes sense.
Thanks for your patience! You are being of much help.
Anyways, this only got me a little further. I will show you my automation and deconz log.
I tried to subscribe to “Listen to Event” deconz_event. And clicked on different buttons, but could not see any event in the log.
log config:
logger:
default: critical
logs:
# log level for HA core
homeassistant.core: fatal
# log deconzzzzzz
pydeconz: debug
homeassistant.components.deconz: debug
Automations:
#TEST 1
- id: '1573509777395'
alias: Input - Ikea 5-way-switch middle button2
description: ''
trigger:
- event_data:
event: 1002
id: tradfri_remote_control
event_type: deconz_event
platform: event
condition: []
action:
- device_id: daced0154bb44d4b85b63273f94d14b9
domain: switch
entity_id: switch.on_off_plug_in_unit_5
type: toggle
#TEST 2
- id: '1573509777392'
alias: Input - Ikea 5-way-switch middle button2
description: ''
trigger:
- event_data:
event: 1002
id: tradfri_remote_control
event_type: deconz_event
platform: event
condition: []
action:
- data_template:
entity_id: switch.on_off_plug_in_unit_5
transition: 1
brightness: '{% if (states.light.all_bedroom_lights.state == "on") %} 0 {%
else %} 255 {% endif %}'
service: light.turn_on
Log:
2020-01-27 22:17:02 DEBUG (MainThread) [pydeconz.deconzdevice] On/Off plug-in unit 5 created as
{'etag': '5325415026c80a3413f4a2055614a944',
'hascolor': False,
'manufacturername': 'IKEA of Sweden',
'modelid': 'TRADFRI control outlet',
'name': 'On/Off plug-in unit 5',
'state': {'alert': 'none', 'on': True, 'reachable': True},
'swversion': '2.0.019',
'type': 'On/Off plug-in unit',
'uniqueid': '00:0d:6f:ff:fe:9a:9e:cb-01'}
2020-01-27 22:17:02 DEBUG (MainThread) [pydeconz.deconzdevice] TRÅDFRI on/off switch created as
{'config': {'alert': 'none',
'battery': None,
'group': '2',
'on': True,
'reachable': True},
'ep': 1,
'etag': '52a41bde5c7d8ea5d0e5698ce1edd691',
'manufacturername': 'IKEA of Sweden',
'mode': 1,
'modelid': 'TRADFRI on/off switch',
'name': 'TRÅDFRI on/off switch',
'state': {'buttonevent': None, 'lastupdated': 'none'},
'swversion': '2.0.019',
'type': 'ZHASwitch',
'uniqueid': '00:0d:6f:ff:fe:bb:39:2f-01-1000'}
2020-01-27 22:17:02 DEBUG (MainThread) [pydeconz.deconzdevice] TRÅDFRI remote control created as
{'config': {'alert': 'none',
'battery': 74,
'group': None,
'on': True,
'reachable': True},
'ep': 1,
'etag': '8924bd9e3640eb7b6f5704f8e20a8081',
'manufacturername': 'IKEA of Sweden',
'mode': 3,
'modelid': 'TRADFRI remote control',
'name': 'TRÅDFRI remote control',
'state': {'buttonevent': None, 'lastupdated': 'none'},
'swversion': '1.2.223',
'type': 'ZHASwitch',
'uniqueid': '90:fd:9f:ff:fe:82:90:3d-01-1000'}
2020-01-27 22:17:02 DEBUG (MainThread) [pydeconz.deconzdevice] TRÅDFRI remote control (2) created as
{'config': {'alert': 'none', 'battery': 47, 'on': True, 'reachable': True},
'ep': 1,
'etag': 'f6787e6fbd8419abe6ecc824b613a698',
'manufacturername': 'IKEA of Sweden',
'mode': 3,
'modelid': 'TRADFRI remote control',
'name': 'TRÅDFRI remote control (2)',
'state': {'buttonevent': None, 'lastupdated': 'none'},
'swversion': '1.2.214',
'type': 'ZHASwitch',
'uniqueid': '90:fd:9f:ff:fe:de:8a:7d-01-1000'}
2020-01-27 22:17:02 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2020-01-27 22:17:03 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: tradfri_on_off_switch
2020-01-27 22:17:03 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: tradfri_remote_control
2020-01-27 22:17:03 DEBUG (MainThread) [homeassistant.components.deconz] deCONZ event created: tradfri_remote_control_2
2020-01-27 22:17:04 DEBUG (MainThread) [pydeconz.websocket] Websocket running
2020-01-27 22:17:18 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2020-01-27 22:17:18 DEBUG (MainThread) [pydeconz.websocket] Reconnecting to deCONZ in 15.
2020-01-27 22:17:33 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2020-01-27 22:17:33 DEBUG (MainThread) [pydeconz.websocket] Websocket running
2020-01-27 22:21:14 DEBUG (MainThread) [pydeconz.websocket] {"config":{"alert":"none","battery":34,"on":true,"reachable":true},"e":"changed","id":"4","r":"sensors","t":"event","uniqueid":"90:fd:9f:ff:fe:de:8a:7d-01-1000"}
2020-01-27 22:23:35 DEBUG (MainThread) [pydeconz.websocket] {"config":{"alert":"none","battery":21,"on":true,"reachable":true},"e":"changed","id":"3","r":"sensors","t":"event","uniqueid":"90:fd:9f:ff:fe:82:90:3d-01-1000"}