Walked into Best Buy today and they had the Samsung Smarthings Button on sale for $14.99.
I have been wanting a button to run different automation’s or scripts in each room for a while.
This button paired with zha out of the box and has a temp sensor.
At first I tried to do a standard automation using the binary sensor, but the switch would only show on no matter if I did press, double press, or hold.
Started looking on the forum and found a couple of post that got close but no cigar.
Then found one that was listening to the zha events instead of using the sensor.
That worked perfect and just wanted to share it with anyone else wanting these to work.
I am using HUSBZB-1 on a Raspberry Pi for my Hassio setup.
- Pull the button out of the box.
- Goto Hassio front end Configuration then ZHA
- Click on Add Devices
- Pull tape covering battery and place next to your hub or stick
- It will register the device with the temp sensor
the name is samjin.button not smarthings - After you see it in the zha page copy the IEEE device code
you will need this for your automation’s.
Now create automation’s for each type of button press.
Replace the device_ieee: with the one you copied above.
- id: '1560813337553'
alias: Button1 Single Pause Music Runeaudio
trigger:
- event_data:
command: button_single
device_ieee: 00:00:00:00:00:00:00:00
event_type: zha_event
platform: event
action:
- data:
entity_id: media_player.runeaudio_mpd
service: media_player.media_play_pause
- id: '1560823992301'
alias: Button1 Hold Night Script
trigger:
- event_data:
command: button_hold
device_ieee: 00:00:00:00:00:00:00:00
event_type: zha_event
platform: event
action:
- service: script.1535918900987
- id: '1560824915079'
alias: Button1 Double Bedroom Light Off
trigger:
- event_data:
command: button_double
device_ieee: 00:00:00:00:00:00:00:00
event_type: zha_event
platform: event
action:
- data:
entity_id: light.sengled_e11g13_0306678e_1
service: light.turn_off
Now you can have a button in each room that will do 3 different things.
I’m sure someone can improve my automation’s to allow all 3 to be in one,
but I struggle with templates and this works perfectly for me.
Hope this helps someone.
BONUS: These buttons are magnetic