Here’s how I have a Zigbee smartthings button (GP-U999SJVLEAA) working with Home Assistant. You do not need a Smartthings hub or integration! This is a cheap, attractive button that not only provides 3 states (single press, double press, and long press) but also the current room temperature.
You’ll need:
- Home Assistant
- MQTT (I use the Hassio addon)
- Zigbee Adapter (I use the husbz-1)
- Smartthings Button (the GP-U999SJVLEAA)
Setup:
- Add you smartthings button to the zigbee network (Configuration | ZHA | Add Devices) - it should add a zha, binary_sensor, and sensor with “samjin” in the name
- Subscribe and listen to “zha_event” in the “Events” section of the developer tools (ex. http://your-ha/dev-event)
- Press the smartthings button and write down the “device_ieee” value displayed:
- Add the following HA automation, replacing all “<BLAH_HERE>” values accordingly (ex. replace “<YOUR_TOPIC_HERE>” with “buttons/pressed/st1”):
automation:
- id: <ANY_ID_YOU_WANT_HERE>
alias: <ANY_ALIAS_YOU_WANT_HERE>
trigger:
- event_data:
command: button_single
device_ieee: <YOUR_DEVICE_IEEE_HERE>
event_type: zha_event
platform: event
- event_data:
command: button_double
device_ieee: <YOUR_DEVICE_IEEE_HERE>
event_type: zha_event
platform: event
- event_data:
command: button_hold
device_ieee: <YOUR_DEVICE_IEEE_HERE>
event_type: zha_event
platform: event
condition: []
action:
service: mqtt.publish
data_template:
topic: >
<YOUR_TOPIC_HERE>
payload: >
{{trigger.event.data['command']}}
- Add a node-red MQTT listener to your desired flow with the proper server and topic name:
- Connect it to a switch, property of msg.payload, and ports “button_single”, “button_double”, and “button_hold”:
- Connect the switch ports to your desired nodes (ex. to turn on a light):
- You’re done!