I just wanna share my new Git commit function to UI!
It looks like this!
Here is the configuration!
shell_command:
gitcommit: '/bin/sh gitupdate.sh "{{ states("input_text.gitmessage") }}"'
input_text:
gitmessage:
name: Git Commit Message
script:
gitcommit:
sequence:
# This is Home Assistant Script Syntax
- service: shell_command.gitcommit
gitupdate.sh
(Your hass need to be able to access this file. And you need to set git authentication to cache its login details in your hass container / where your hass is running
#!/bin/bash
cd locationtohass
git add .
git status
git commit -m "$@"
git push origin master
exit
Did you figure out a way around this?
I am getting the below error.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.