Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Auto-discovery of an MQTT "button" that can be activated from HA?

$
0
0

@giygas wrote:

I have a program that is successfully exposing a named switch, which automatically shows up in Home Assistant without any configuration on the HA side. It does this by publishing a message on topic homeassistant/switch/my_device_name/config with payload { "name": "my_device_name", "command_topic": "homeassistant/switch/my_device_name/set", "state_topic": "homeassistant/switch/my_device_name/state"}

With this i can successfully communicate on/off commands to the program from HA.

Is there a way to expose a simple button in a similar way? To trigger actions in the program that don’t have on/off state like a switch does. I could create a second switch that does the action when turned on nothing when “turned off,” but that seems like a hack. Is there a better way?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>