Automation/script to edit a yaml file in config

Hello everybody,

is there any way to edit a yaml file like configuration.yaml via an automation or a script? i want to implement an easy way to add something automaticaly to the configuration of home assistant.

Thanks in advance.

Perhaps with sed?

You would create a shell-script, that accepts variables and employs sed, and call it from Home Assistant via the Shell Command integration.

1 Like

Thank you. I managed to add something to a yaml, but i don’t know how i can add variables to the script.

1 Like