Ive been very slowly finding my feet with home assistant - My HA has lots of data coming in, and I’ve started writing some simple automations (eg turning lights on 1/2 hour after sunset and stuff like that). I want to get more adventurous - but struggling as I need automations that switch relays on/off which need to be addressed with ‘curl’ commands. I have placed buttons on my home assistant already that operate these relays via ‘curl’…but can’t see how to switch these on/off in automations.
Create shell commands to call your curl commands. You can then call these shell commands as actions in your automations, scripts and dashboard buttons.
Take particular note of this:
There’s a community guide about it if you have trouble. I’ll see if I can find it.
Edit: here: SSH'ing from a command line sensor or shell command
Buttons are stateless and can’t be “on” or “off”. It sounds like you might need a command_line switch.
Thankyou very much for your replies! Very helpful