Closed point-4ward closed 6 years ago
Just realised - You'll need to update your 'help doc' to reflect the change at some point too.
@mf-social Thank you so much, going to look into implementing this shortly. Have a few questions that you can hopefully help out with so I can merge your PR (#134) and update my docs.
update_new_commits_sensor.sh
to have the private URL to my Home Assistant in it along with the api_password
defined in configuration.yaml
(see: https://github.com/brianjking/homeassistant-config/blob/master/configuration.yaml#L11-L13)curl -X POST -H "x-ha-access: $1" -H "Content-Type: application/json" https://my.domain.com/api/states/sensor.new_commits?api_password=MyPassword -d "{\"state\": \"$commits\"}"
So yeah, pass the arguments in the same manner, then $1 is the first one, $2 is the second etc.
You can pass them all as secrets, and then you don't have to manually change anything after you've pulled an update.
Hope this helps.
LMK if you have any issues ๐
Hi Brian,
Ages ago I was looking at your repo to inspire my Maintenance package, and I just noticed you still had "TODO" next to feed password for your Github new commits sensor.
I've fixed it for you with this PR (presuming you still use it, and this isn't a reference).
Should you decide to encrypt your access with SSL at some point in the future and need to hide your URL, you could do it like this:
Script:
Shell command:
Appropriate line in your update_new_commits_sensor.sh:
I can heartily recommend switching over to my maintenance package concept though :smile: - could probably knock you a personalised version up pretty quickly if you wanted?
Anyway, hope this helps ๐
๐