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!