I have a few buttons connected to HA via the Smartthings integration but it only shows temp and battery sensors.
How do I get whether it was actually pressed/double press/hold?
I have a few buttons connected to HA via the Smartthings integration but it only shows temp and battery sensors.
How do I get whether it was actually pressed/double press/hold?
The smartthing done expose entities for button presses, instead each button press triggers an event. Take a look in the docs here
Ok had a look but still not 100% how I can capture the presses, any examples in a HA automation script for example?
Go to the Sidebar ā Developer Tools ā Events. In the box āListen to eventsā, enter smartthings.button
and press āstart listeningā. Now when you press a button on the remote, you should see an event there. You can then use this information to create an automation. Take a look here for a solution:
Got it to work
Here is the automation yaml if anyone will come across this in the future:
- id: MainGateButtonPressedOnce
alias: Gates - Smartthings Button Pressed Once Test
trigger:
- event_data:
name: Main Gate Button
value: pushed
event_type: smartthings.button
platform: event
action:
- data_template:
message: Main gate opened
title: Gates
service: notify.simplepush_notifier
Nice work figuring it out - took me a bit as well. Had to use the logs / entity registry to get mine to work correctly. Anyhow, going to paste my working code here as well for anyone elseās future reference of how to use the device_id to ālistenā for button pushes.
From my automations.yaml:
- id: '1556158361659'
alias: Front Gate Button
trigger:
- event_data:
device_id: 4c503d98-0bb5-4e14-93f3-33bf91066131
value: pushed
event_type: smartthings.button
platform: event
condition: []
action:
- data:
entity_id: switch.front_drive_gate
service: switch.toggle
Hello To all
I have successfully installed the Smatthings integration in my Home Assistant
But I donāt see any event with the name smartthings.button at the Developer Tools ā Events right side of the menuā¦
Also, If I start listening to this event, I donāt receive any information in the list
Can anyone please help me in oder to be able to listen this events
Thank you in advance for your support and help
Hi,
Did you ever get this to work?
Currenlty, Iām experiencing the exact same issue.
Once listening to smartthings.button under the developer tools I donāt get any result.
Thanks!
Hello Yes
I need to add the Smartthings integration again, in oder to solve this
Indeed, this did the trick!
Many thanks!