coming form openHAB I still have troubles how to deal with certain things.
In openHAB I was able to send a turn ON to a entity via rest api. This way I could fire a rule (automation) which turned off the entity afterwards.
So in HA what is the best way to trigger a “button” in HA.
I like to have a button that is available in HA that when triggered starts an automation. I figured this one out and works great with an input_button helper.
Now I like to trigger the same button from external via the API is this possible?
Thx but I did probably not explain it well enough.
I like to control an input_button in HA via the api from a curl command:
I have a input_button called “clean under table”. So when I press this in HA an automation is triggered that sends the vacuum to the table position.
Now I like to trigger the same automation via a rest api command via a curl command.
So how do I do that? Is it best to “push” the button via a REST API command? And if yes I did not yet figure out how to do that…
alias: TEST
description: ""
trigger:
- platform: state
entity_id:
- input_button.test
to: null
condition: []
action:
mode: single
of course another way would be to make a script that I can trigger with the API directly. And change the automation so that it launches the same script if the automation got trigerd by the input_button
i get response code 200 but the butoon in HA never presses or updates
I am able to set switch states w/o problem, so maybe im doing something wrong with push buttons?