mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
186 lines
5.0 KiB
YAML
186 lines
5.0 KiB
YAML
template:
|
|
- switch:
|
|
- unique_id: template_switch.front_yard_station
|
|
turn_on:
|
|
- action: opensprinkler.run
|
|
data_template:
|
|
entity_id: binary_sensor.front_yard_station_running
|
|
run_seconds: "{{ ((states('input_number.front_yard_station_minutes') | float) * 60) | int }}"
|
|
turn_off:
|
|
- action: opensprinkler.stop
|
|
data:
|
|
entity_id: binary_sensor.front_yard_station_running
|
|
default_entity_id: switch.front_yard_station
|
|
icon: mdi:sprinkler
|
|
name: Front Yard Station
|
|
state: "{{ is_state('binary_sensor.front_yard_station_running', 'on') }}"
|
|
|
|
- unique_id: template_switch.east_side_station
|
|
default_entity_id: switch.east_side_station
|
|
name: East Side Station
|
|
state: "{{ is_state('binary_sensor.east_side_station_running', 'on') }}"
|
|
icon: mdi:sprinkler
|
|
turn_on:
|
|
action: opensprinkler.run
|
|
data_template:
|
|
entity_id: binary_sensor.east_side_station_running
|
|
# Run seconds uses the input_number below.
|
|
run_seconds: "{{ ((states('input_number.east_side_station_minutes') | float) * 60) | int }}"
|
|
turn_off:
|
|
action: opensprinkler.stop
|
|
data:
|
|
entity_id: binary_sensor.east_side_station_running
|
|
|
|
- unique_id: template_switch.back_yard_station
|
|
default_entity_id: switch.back_yard_station
|
|
name: Back Yard Station
|
|
state: "{{ is_state('binary_sensor.back_yard_station_running', 'on') }}"
|
|
icon: mdi:sprinkler
|
|
turn_on:
|
|
action: opensprinkler.run
|
|
data_template:
|
|
entity_id: binary_sensor.back_yard_station_running
|
|
# Run seconds uses the input_number below.
|
|
run_seconds: "{{ ((states('input_number.back_yard_station_minutes') | float) * 60) | int }}"
|
|
turn_off:
|
|
action: opensprinkler.stop
|
|
data:
|
|
entity_id: binary_sensor.back_yard_station_running
|
|
|
|
- unique_id: template_switch.west_side_station
|
|
default_entity_id: switch.west_side_station
|
|
name: West Side Station
|
|
state: "{{ is_state('binary_sensor.west_side_station_running', 'on') }}"
|
|
icon: mdi:sprinkler
|
|
turn_on:
|
|
action: opensprinkler.run
|
|
data_template:
|
|
entity_id: binary_sensor.west_side_station_running
|
|
# Run seconds uses the input_number below.
|
|
run_seconds: "{{ ((states('input_number.west_side_station_minutes') | float) * 60) | int }}"
|
|
turn_off:
|
|
action: opensprinkler.stop
|
|
data:
|
|
entity_id: binary_sensor.west_side_station_running
|
|
|
|
input_number:
|
|
front_yard_station_minutes:
|
|
name: Front Yard Station Minutes
|
|
icon: mdi:sprinkler-variant
|
|
min: 0
|
|
max: 60
|
|
step: 1
|
|
|
|
east_side_station_minutes:
|
|
name: East Side Station Minutes
|
|
icon: mdi:sprinkler-variant
|
|
min: 0
|
|
max: 60
|
|
step: 1
|
|
|
|
back_yard_station_minutes:
|
|
name: Back Yard Station Minutes
|
|
icon: mdi:sprinkler-variant
|
|
min: 0
|
|
max: 60
|
|
step: 1
|
|
|
|
west_side_station_minutes:
|
|
name: West Side Station Minutes
|
|
icon: mdi:sprinkler-variant
|
|
min: 0
|
|
max: 60
|
|
step: 1
|
|
|
|
input_button:
|
|
# PTZ Controls
|
|
5_minute_test:
|
|
name: Run 5 Minute Test
|
|
icon: mdi:sprinkler
|
|
|
|
front_yard_fun:
|
|
name: Run Front Yard Fun
|
|
icon: mdi:sprinkler
|
|
|
|
back_yard_fun:
|
|
name: Run Back Yard Fun
|
|
icon: mdi:sprinkler
|
|
|
|
evening_program:
|
|
name: Run Evening Program
|
|
icon: mdi:sprinkler
|
|
|
|
morning_program:
|
|
name: Run Morning Program
|
|
icon: mdi:sprinkler
|
|
|
|
full_run_program:
|
|
name: Run Full Run Program
|
|
icon: mdi:sprinkler
|
|
|
|
automatic_run_program:
|
|
name: Run Automatic Run Program
|
|
icon: mdi:sprinkler
|
|
|
|
stop_all_sprinklers:
|
|
name: Stop All Sprinklers
|
|
icon: mdi:sprinkler
|
|
|
|
|
|
automation:
|
|
- id: automation_opensprinkler_program_buttons
|
|
alias: OpenSprinkler Program Buttons
|
|
mode: queued
|
|
trigger:
|
|
- id: 5_minute_test_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.5_minute_test
|
|
|
|
- id: front_yard_fun_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.front_yard_fun
|
|
|
|
- id: back_yard_fun_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.back_yard_fun
|
|
|
|
- id: evening_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.evening_program
|
|
|
|
- id: morning_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.morning_program
|
|
|
|
- id: full_run_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.full_run_program
|
|
|
|
- id: automatic_run_program_enabled
|
|
trigger: state
|
|
entity_id: input_button.automatic_run_program
|
|
|
|
condition: []
|
|
action:
|
|
- action: opensprinkler.run
|
|
data:
|
|
entity_id: "switch.{{ trigger.id }}"
|
|
|
|
- delay: '00:00:01'
|
|
|
|
|
|
- id: automation_opensprinkler_stop_all_sprinklers
|
|
alias: OpenSprinkler Stop All Sprinklers
|
|
mode: queued
|
|
trigger:
|
|
- id: opensprinkler_enabled
|
|
trigger: state
|
|
entity_id: input_button.stop_all_sprinklers
|
|
|
|
condition: []
|
|
action:
|
|
- action: opensprinkler.stop
|
|
data:
|
|
entity_id: "switch.{{ trigger.id }}"
|
|
|
|
- delay: '00:00:01' |