Hi, I’m trying to setup a frontend script for updating my homeassistant repository on Github.
During the last hours i tried but I did not succeed (script appear in the frontend but doesn’t work, it works only via terminal CLI).
PS: I’m using HASSIO on RPI3.
First of all I used this command using SSH terminal: git config remote.origin.url https://User:[email protected]/MyNameOnGithub/Repository.git
Here my setup:
configuration.yaml
[...]
shell_command: !include shell_commands.yaml
script: !include_dir_named scripts
[...]
shell_commands.yaml
gitupdate: '/config/gitupdate.sh'
gitupdate.sh:
#!/bin/bash
cd /config/
git config --global user.email "[email protected]"
git config --global user.name "myGithubusername"
git add .
git status
git commit -m "Auto Backup"
git push -u origin master
exit
(into the scripts directory) gitupdate.yaml:
alias: gitupdate
sequence:
- service: shell_command.gitupdate
groups.yaml:
[...]
default_view:
view: yes
name: Home
icon: mdi:home
entities:
- script.gitupdate
[...]
Can someone help me?
Thank you