i want to be able to run automations when the button is pressed, however im not sure how to do that?
i saw some other notes on that link about a payload (example below) however where would i find this sorry?
Then if you’re using the ST hub, and the ST integration in HA… then that’s all you should need.
Here’s the automation I’m using with my ST button. It listens for the zha event (button_single), and then controls a zibgee bulb on/off with different settings depending on time. (Full bright, neutral white during the day, and dim warm white after 9pm.)
The important piece for what you need is the trigger containing the ZHA-event, command and device ieee, then you can use that trigger for whatever you want to interact with.
You’ll write an automation that listens zha_event. (You might be able to do I through the UI, or just copy/paste my code into your automations.yaml file and edit as necessary.
I have tried taking @MandM78 code and changing the device_ieee to match mine as well as trying to change the command type from button_single to pushed and neither are working. I have the button integrated into the ST Interface and am also able to see the battery and temp but the button push does not trigger my action. Where did you locate the unique ID?
I am relatively new to HA (Home Assistant). Migrating from Smartthings.
I am having the same problem. I have a Smartthings Button, that does not show up on HA.I can only see entities (battery) and (temperature). I try listening to events ZHA_EVENTS; but nothings is happening when I press the button.
Hoping to get help to get further.`
Thank you for your reply. I got it working.
Using Node Red. I use the node EVENT node with EVENT TYPE “smartthing.button”.
This node is followed by a node SWITCH with 3 rules “pushed”, “double” or “press” and I take action from there. Very easy to use and integrate in my flows.