mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
id: automation_restart_modem
|
||||
alias: Restart Modem
|
||||
mode: single
|
||||
# Hide warnings when triggered while in delay.
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- id: button_pressed
|
||||
platform: state
|
||||
entity_id: input_button.restart_modem
|
||||
|
||||
- id: boolean_turned_on
|
||||
platform: state
|
||||
entity_id: input_boolean.restart_modem
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: button_pressed
|
||||
sequence:
|
||||
- alias: Create a persistent notification for testing
|
||||
service: persistent_notification.create
|
||||
data:
|
||||
message: "The modem would have restarted at {{now()}}"
|
||||
title: "Modem restarting"
|
||||
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: boolean_turned_on
|
||||
sequence:
|
||||
- alias: Turn off switch controlling modem
|
||||
service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.furnace_room_plug
|
||||
|
||||
- alias: Wait for 10 seconds
|
||||
delay: '00:00:10'
|
||||
|
||||
- alias: Turn on switch controlling modem
|
||||
service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id: switch.furnace_room_plug
|
||||
|
||||
- alias: Turn of input_boolean controlling the restart
|
||||
service: input_boolean.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.restart_modem
|
||||
Reference in New Issue
Block a user