@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