What this does, is get my latest config from Github, and restart the HA instance.
This works, however, I can trigger it even when there are no changes on GitHub (compared to my local repo). I’ve got a sensor set up that polls Github and checks for the number of commits behind, the problem is it polls every minute now, which is quite a bit overkill, since I only sometimes make a change.
I can drive the interval up, but then new changes won’t get picked up directly, which is not wanted either.
I’m wondering if there’s a way to use a condition block in the script, which will execute a command?
For example, something like this:
Or does the script automatically stop executing when a shell_command send an error exit code?
In that case I can just make it in a shell_command and use that…
Thanks man, I’ve gotten it to work, the only thing left to do right now is figure out how I can feed data into that curl script (since my config is on Github, I’d like my password to come from the secrets file)
But it seems to complain about now finding the secret, I’ve tried with !secret, no brackets, without secret, but I can’t seem to get it to work, I’ve found here: Using secrets.yaml with shell commands? that it can’t be done, is this still the case?
Geez my bad I totally confused this one with another tool I’m using which uses secrets in another way in yaml files. Seems like it does not work atm but it should be integrated if you ask me. So best thing to do would be to read it from a file in perl then. I am not familiar with perl tho