READING TIME: 3 MINUTES
If you’re in the process of migrating from SmartThings to Home Assistant, then you probably have a lot of “SmartThings” branded buttons and sensors. If you’re wondering how to add a SmartThings button to Home Assistant (without using the SmartThings integration!), then this guide is perfect for you.
This post is part of my “How to Migrate from SmartThings to Home Assistant” series. Other guides I have created are:
- How To Add SmartThings Motion Sensors to Home Assistant
- How To Add SmartThings Multipurpose Sensors to Home Assistant
- How To Add SmartThings Water Sensor to Home Assistant
Step 1: Reset Your SmartThings Button
To reset your SmartThings button, simply flip the button over and insert a paperclip into the small hole for about 5 seconds.
Once you see the button flicker red and then green, your device has been reset and is now ready to be paired to Home Assistant.
You should also go ahead and delete it from the SmartThings app or from https://graph.api.smartthings.com.
Step 2: Pair SmartThings Button to Home Assistant.
For this step, you should already have the Zigbee Home Automation (ZHA integration setup). If you don’t, check out my How To Add Z-wave and Zigbee devices to Home Assistant guide.
Go to Configuration > Integrations > ZHA > Configure.
Then, click Add Device. You should see “Device Found”. Wait a few moments for the interview to complete.
Step 3: Rename Button & Assign to an Area
The next step is self-explanatory, but you’ll want to rename your button and assign it to a room. This will make it easier to locate and assign automations to later on.
Once you see an Initialization Complete screen like the below screenshot, you are ready to start creating automations!
Step 4: Find Device ieee using HA Events
Next, click Developer Tools > Events tab > and enter
zha_event to the Listen to events section.
Click Start Listening.
Then, simply click your button. You’ll see it display a
device_ieee: xx:xx:xx:xx:xx displayed in the code.
Copy that code to clipboard; you’ll need it a few times for your automations.
Step 5: Creating Automations with SmartThings Button
SmartThings buttons allow for 3 button clicks: single press, double press, and hold. I’m sure there’s a better way to go about this or consolidate into one automation, but I’ve created 3 separate automations for each button press.
Here’s the example automation for toggling a lamp on or off using a SmartThings button which was added to Home Assistant. Change
button_hold for automation #2 and automation #3.
SmartThings Single Button Press Automation:
device_ieee: "insert ieee' command: button_single
SmartThings Double Press Button Automation:
device_ieee: "insert ieee' command: button_double
SmartThings Long Press Button Automation:
device_ieee: "insert ieee' command: button_hold
That’s it! That’s all there is to adding SmartThings buttons to Home Assistant without needing to use the official SmartThings integration with hassio.
If you know of a better way to consolidate all 3 button presses into a single automation, let me know in the comments below!
My Favorite Home Assistant Devices
Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.
- Zwave/Zigbee hub: Nortek GoControl HUSBZB-1
- Smart Plugs: Sonoff S31 Lite Zigbee
- Motion Sensors: Hue Indoor Motion
- Outdoor Camera: Amcrest IP5M Turret
- Robot Vacuum: Roborock S7
The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.
Doesnt work if your using the samsung ST hub, too bad 🙁
Thank you for the write-up. I’ve got my button added and single press working fine, but double and hold will not work. I tried several combinations of settings. Developer recognizes the single and double press, but the automation I created for double and hold won’t work. Any suggestions.?
Here’s the code for double-press automation. Still working as of today for me. You should be able to copy that into an automation as YAML and just change out your device ID and device_ieee. To get your device ID, you can create the automation in the GUI like my guide, then click the 3 dots in the top right corner of the automation.
If that still doesnt work, you could try this blueprint: https://community.home-assistant.io/t/zha-samsung-smartthings-button/268763
alias: 'Master Bedroom: Toggle Nightstand from Double Press'
- platform: event
- type: toggle