Moved automation to automations.yaml
parent
8199b38aa0
commit
23b5608727
|
|
@ -232,9 +232,20 @@ cat >>$HA_PATH/configuration.yaml <<EOF
|
||||||
|
|
||||||
shell_command:
|
shell_command:
|
||||||
iptables_script: iptables_redirect/exec.sh
|
iptables_script: iptables_redirect/exec.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
description: "Run iptables script on Home Assistant start."
|
exit_status $? "cat" \
|
||||||
mode: single
|
"Could not modify configuration.yaml" \
|
||||||
|
"OK." \
|
||||||
|
false
|
||||||
|
|
||||||
|
echo -n "Modifying automations.yaml ... "
|
||||||
|
cat >>$HA_PATH/automations.yaml <<EOF
|
||||||
|
|
||||||
|
- id: '1714725977432'
|
||||||
|
alias: Run iptables_redirect on HA start
|
||||||
|
description: On every start we will run iptables_redirect script to ensure accepting
|
||||||
|
data from station with firmware 1.0
|
||||||
trigger:
|
trigger:
|
||||||
- platform: homeassistant
|
- platform: homeassistant
|
||||||
event: start
|
event: start
|
||||||
|
|
@ -243,10 +254,11 @@ action:
|
||||||
- service: shell_command.iptables_script
|
- service: shell_command.iptables_script
|
||||||
metadata: {}
|
metadata: {}
|
||||||
data: {}
|
data: {}
|
||||||
|
mode: single
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
exit_status $? "cat" \
|
exit_status $? "cat" \
|
||||||
"Could not modify configuration.yaml" \
|
"Could not modify automations.yaml" \
|
||||||
"OK." \
|
"OK." \
|
||||||
false
|
false
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue