Moved automation to automations.yaml
parent
8199b38aa0
commit
23b5608727
|
|
@ -232,9 +232,20 @@ cat >>$HA_PATH/configuration.yaml <<EOF
|
|||
|
||||
shell_command:
|
||||
iptables_script: iptables_redirect/exec.sh
|
||||
EOF
|
||||
|
||||
description: "Run iptables script on Home Assistant start."
|
||||
mode: single
|
||||
exit_status $? "cat" \
|
||||
"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:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
|
@ -243,10 +254,11 @@ action:
|
|||
- service: shell_command.iptables_script
|
||||
metadata: {}
|
||||
data: {}
|
||||
mode: single
|
||||
EOF
|
||||
|
||||
exit_status $? "cat" \
|
||||
"Could not modify configuration.yaml" \
|
||||
"Could not modify automations.yaml" \
|
||||
"OK." \
|
||||
false
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue