Is this only in the event stream? That seems odd.
Yes that is an event. Not odd at all.
Use the event node to trigger on it.
Might you help me understand why there isn’t a button entity related to it? Thanks!
Because that is how ZigBee works.
Sorry I’d really like to understand though. Plenty of Zigbee devices have entities that I can react to. Can you explain what makes this one different? In that screenshot, if I hit the PRESS on the button, that seems to create an event as well, but one that’s tied to an entity.
Ok…
Show me a ZigBee remote with entities that you can use.
I don’t have a remote. But I’m gathering either the reason is over my head, or you’re not interested in explaining it. No worries.
If don’t have a remote then there is the issue.
No remote that I have seen has used entities.
I don’t understand why you believe we (or I) owe you a reason.
You can read the source code or ask the developers.
Sorry, at no point was I trying to be argumentative or demand anything. Of course no one owes me. I was just hoping you might be able to help me understand how and why it works this way.
No hard feelings.
For example, you may have a door lock with the entity lock.frontdoor which can have the attributes of locked or unlocked. When somebody locks or unlocks the door that will send an event. You can listen for that event to find details such as what user unlocked the door, depending upon the details that your specific device includes in the event. In other words, the entity / attribute gives the state of the device. The events notify you when an action has occurred.
Thisnis certainly not a technical answer, but my understanding, which may be flawed, of how it works.
My understanding is that all remotes (both ZigBee and z-wave) are ‘scene controllers’ and don’t have entities like other devices. Go into Developer Tools - Events and type zha_event into the ’ Listen to events’ field. Then click on ‘Start Listening’ and click your ZigBee button. You should see the event data and parameters show up. You’ll use that information in Node Red to listen for the event.
Below is my flow for an Ikea 5 button remote that monitors for both short and long presses.
[{"id":"2a98f4071b357f84","type":"tab","label":"Ikea Remotes","disabled":false,"info":"","env":[]},{"id":"79997cf870cf6a5b","type":"comment","z":"2a98f4071b357f84","name":"Ikea Remotes","info":"","x":90,"y":40,"wires":[]},{"id":"9501fd83.119498","type":"server-events","z":"2a98f4071b357f84","name":"ZHA Events","server":"8be923df.d66f9","version":2,"eventType":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":90,"y":180,"wires":[["1a32b491.3ad05b"]]},{"id":"1a32b491.3ad05b","type":"function","z":"2a98f4071b357f84","name":"IKEA Remotes","func":"var payload = msg.payload.event.command;\nvar device = msg.payload.event.device_ieee;\nvar eventarg = msg.payload.event.args[0];\n\nif (device == \"84:2e:14:ff:fe:18:5a:b9\" || \"0c:43:14:ff:fe:f6:b9:8c\" ){\n if(payload == \"toggle\"){\n msg.payload = \"power_button\";\n return [msg];\n }\n if(payload == \"step_with_on_off\"){\n msg.payload = \"up_button\";\n return [msg];\n }\n if(payload == \"step\"){\n msg.payload = \"down_button\";\n return [msg];\n }\n if(eventarg == \"256\"){\n msg.payload = \"right_button\";\n return [msg];\n } \n if(eventarg == \"257\"){\n msg.payload = \"left_button\";\n return [msg];\n } \n if(payload == \"move_with_on_off\"){\n msg.payload = \"up_button_hold\";\n return [msg];\n }\n if(payload == \"move\"){\n msg.payload = \"down_button_hold\";\n return [msg];\n }\n if(eventarg == \"3328\"){\n msg.payload = \"right_button_hold\";\n return [msg];\n } \n if(eventarg == \"3329\"){\n msg.payload = \"left_button_hold\";\n return [msg];\n }\n if(payload == \"release\"){\n msg.payload = \"release\";\n return [msg];\n }\n \n}else{\n return;\n}\n\nreturn;\n\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":180,"wires":[["c3aa5382.2ddda"]]},{"id":"c3aa5382.2ddda","type":"switch","z":"2a98f4071b357f84","name":"Routing","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"power_button","vt":"str"},{"t":"eq","v":"up_button","vt":"str"},{"t":"eq","v":"down_button","vt":"str"},{"t":"eq","v":"right_button","vt":"str"},{"t":"eq","v":"left_button","vt":"str"},{"t":"eq","v":"up_button_hold","vt":"str"},{"t":"eq","v":"down_button_hold","vt":"str"},{"t":"eq","v":"right_button_hold","vt":"str"},{"t":"eq","v":"left_button_hold","vt":"str"},{"t":"eq","v":"release","vt":"str"}],"checkall":"true","repair":false,"outputs":10,"x":460,"y":180,"wires":[["3b16e0a7f5831ee1"],["35dd60e9356aca5e"],["80656617dad6041d"],["5ee3f1eacf45fcf4"],["e3cd898034db92ac"],["e90101dab5fe7571"],["940cb00e1bfb4358"],["09cc393416dae089"],["4bdbc53bd8180b38"],[]],"inputLabels":["Command In"],"outputLabels":["Power Button","Up Button","Down Button","Right Button","Left Button","","","","",""]},{"id":"35dd60e9356aca5e","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 1 Toggle","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.lamp_1_on_off"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":680,"y":120,"wires":[[]]},{"id":"80656617dad6041d","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 3 Toggle","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.lamp_3_on_off"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":680,"y":180,"wires":[[]]},{"id":"5ee3f1eacf45fcf4","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 2 Toggle","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.lamp_2_on_off"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":680,"y":240,"wires":[[]]},{"id":"e3cd898034db92ac","type":"api-call-service","z":"2a98f4071b357f84","name":"Wall Sconces Toggle","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.wall_sconces"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":300,"wires":[[]]},{"id":"3b16e0a7f5831ee1","type":"api-call-service","z":"2a98f4071b357f84","name":"LR Fan Toggle","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"fan","service":"toggle","areaId":[],"deviceId":[],"entityId":["fan.living_room_fan_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":680,"y":60,"wires":[[]]},{"id":"4827dfcc56bf4dfe","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 1 Step Up Brightness 20%","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_1_on_off"],"data":"{\"brightness_step_pct\":20}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":480,"wires":[[]]},{"id":"e90101dab5fe7571","type":"api-current-state","z":"2a98f4071b357f84","name":"Lamp1 On?","server":"8be923df.d66f9","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lamp_1_on_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":670,"y":360,"wires":[["812fac0a245631ab"],[]]},{"id":"812fac0a245631ab","type":"switch","z":"2a98f4071b357f84","name":"","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"gt","v":"250","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":420,"wires":[["1075d480b3efbbd5"],["4827dfcc56bf4dfe"]]},{"id":"1075d480b3efbbd5","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 1 Set Brightness to 5","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_1_on_off"],"data":"{\"brightness\":5}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":420,"wires":[[]]},{"id":"09cc393416dae089","type":"api-current-state","z":"2a98f4071b357f84","name":"Lamp 2 On?","server":"8be923df.d66f9","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lamp_2_on_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":670,"y":540,"wires":[["0df6a4e6fa0a099e"],[]]},{"id":"0df6a4e6fa0a099e","type":"switch","z":"2a98f4071b357f84","name":"","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"gt","v":"250","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":600,"wires":[["fb50d7ed1dfa78f1"],["d578e7d44ed95dac"]]},{"id":"fb50d7ed1dfa78f1","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 2 Set Brightness to 5","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_2_on_off"],"data":"{\"brightness\":5}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":600,"wires":[[]]},{"id":"d578e7d44ed95dac","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 2 Step Up Brightness 20%","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_2_on_off"],"data":"{\"brightness_step_pct\":20}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":660,"wires":[[]]},{"id":"940cb00e1bfb4358","type":"api-current-state","z":"2a98f4071b357f84","name":"Lamp 3 On?","server":"8be923df.d66f9","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lamp_3_on_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":670,"y":700,"wires":[["f626f1519f45a1ff"],[]]},{"id":"f626f1519f45a1ff","type":"switch","z":"2a98f4071b357f84","name":"","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"gt","v":"250","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":760,"wires":[["8d83438cdad5a272"],["07e1bdf6b76d4be5"]]},{"id":"8d83438cdad5a272","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 3 Set Brightness to 5","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_3_on_off"],"data":"{\"brightness\":5}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":760,"wires":[[]]},{"id":"07e1bdf6b76d4be5","type":"api-call-service","z":"2a98f4071b357f84","name":"Lamp 3 Step Up Brightness 20%","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp_2_on_off","light.lamp_3_on_off"],"data":"{\"brightness_step_pct\":20}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":820,"wires":[[]]},{"id":"4bdbc53bd8180b38","type":"api-current-state","z":"2a98f4071b357f84","name":"Wall Sconces On?","server":"8be923df.d66f9","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.wall_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":690,"y":880,"wires":[["62b74be981662aaf"],[]]},{"id":"62b74be981662aaf","type":"switch","z":"2a98f4071b357f84","name":"","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"gt","v":"250","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":940,"wires":[["28749fc24b8be90f"],["976189e9379589c7"]]},{"id":"28749fc24b8be90f","type":"api-call-service","z":"2a98f4071b357f84","name":"Wall Sconce Set Brightness to 5","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.wall_sconces"],"data":"{\"brightness\":5}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":920,"wires":[["77718cb29f391699"]]},{"id":"976189e9379589c7","type":"api-call-service","z":"2a98f4071b357f84","name":"Wall Sconces Step Up Brightness 20%","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.wall_sconces"],"data":"{\"brightness_step_pct\":20}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":980,"wires":[[]]},{"id":"77718cb29f391699","type":"api-call-service","z":"2a98f4071b357f84","name":"","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"logbook","service":"log","areaId":[],"deviceId":[],"entityId":[],"data":"{\"name\":\"Ikea Remote\",\"message\":\"{{payload}}\",\"entity_id\":\"light.wall_sconces\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":920,"wires":[[]]},{"id":"8be923df.d66f9","type":"server","name":"homeassistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]