NOOB Question - Call a linux script or python script to ON / OFF a switch

Hello, I want to execute a script (linux or python via linux or …) to change ON or OFF switch (interrupteur). I search documentation or examples to do this. Thank you

You want to set the state of an entity from a command line / terminal prompt? A web hook should do it:

curl -X POST https://your-home-assistant:8123/api/webhook/some_hook_id

Going the other way? Try Shell Command

1 Like