2019-04-17 22:46:06 +00:00
|
|
|
homeassistant:
|
|
|
|
customize:
|
|
|
|
timer.timer_bathroom_aroma:
|
|
|
|
hidden: true
|
|
|
|
timer.timer_downstairs_aroma:
|
|
|
|
hidden: true
|
|
|
|
timer.timer_upstairs_aroma:
|
|
|
|
hidden: true
|
|
|
|
|
|
|
|
timer:
|
|
|
|
timer_bathroom_aroma:
|
2019-12-20 15:32:28 +00:00
|
|
|
duration: "00:30:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
timer_downstairs_aroma:
|
2019-12-20 15:32:28 +00:00
|
|
|
duration: "01:00:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
timer_upstairs_aroma:
|
2019-12-20 15:32:28 +00:00
|
|
|
duration: "01:00:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
|
|
|
|
###############################################################################
|
2019-12-20 15:32:28 +00:00
|
|
|
# _ _ _
|
|
|
|
# /\ | | | | (_)
|
|
|
|
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
|
2019-04-17 22:46:06 +00:00
|
|
|
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
|
|
|
|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
|
|
|
|
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
|
2019-12-20 15:32:28 +00:00
|
|
|
#
|
2019-04-17 22:46:06 +00:00
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
automation:
|
2019-12-20 15:32:28 +00:00
|
|
|
#
|
|
|
|
# Automations to start timer when they are switched ON
|
|
|
|
#
|
2019-04-17 22:46:06 +00:00
|
|
|
- alias: Bathroom Aroma Timer Start
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.downstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "off"
|
|
|
|
to: "on"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.start
|
|
|
|
entity_id: timer.timer_bathroom_aroma
|
|
|
|
|
|
|
|
- alias: Bathroom Aroma Timer Finish
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.downstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "on"
|
|
|
|
to: "off"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.finish
|
|
|
|
entity_id: timer.timer_bathroom_aroma
|
|
|
|
|
|
|
|
- alias: Downstairs Aroma Timer Start
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.downstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "off"
|
|
|
|
to: "on"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.start
|
|
|
|
entity_id: timer.timer_downstairs_aroma
|
|
|
|
|
|
|
|
- alias: Downstairs Aroma Timer Finish
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.downstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "on"
|
|
|
|
to: "off"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.finish
|
|
|
|
entity_id: timer.timer_downstairs_aroma
|
|
|
|
|
|
|
|
- alias: Upstairs Aroma Timer Start
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.upstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "off"
|
|
|
|
to: "on"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.start
|
|
|
|
entity_id: timer.timer_upstairs_aroma
|
|
|
|
|
|
|
|
- alias: Upstairs Aroma Timer Finish
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.upstairs_fragrance
|
2019-12-20 15:32:28 +00:00
|
|
|
from: "on"
|
|
|
|
to: "off"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: timer.finish
|
|
|
|
entity_id: timer.timer_upstairs_aroma
|
|
|
|
|
2019-12-20 15:32:28 +00:00
|
|
|
#
|
|
|
|
# Timer Elapsed Events
|
|
|
|
#
|
2019-04-17 22:46:06 +00:00
|
|
|
- alias: Bathroom Aroma Timer Elapsed
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: event
|
|
|
|
event_type: timer.finished
|
2019-12-20 15:32:28 +00:00
|
|
|
event_data:
|
|
|
|
entity_id: timer.timer_bathroom_aroma
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.downstairs_fragrance
|
|
|
|
|
|
|
|
- alias: Downstairs Aroma Timer Elapsed
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: event
|
|
|
|
event_type: timer.finished
|
2019-12-20 15:32:28 +00:00
|
|
|
event_data:
|
|
|
|
entity_id: timer.timer_downstairs_aroma
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.downstairs_fragrance
|
|
|
|
|
|
|
|
- alias: Upstairs Aroma Timer Elapsed
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: event
|
|
|
|
event_type: timer.finished
|
2019-12-20 15:32:28 +00:00
|
|
|
event_data:
|
|
|
|
entity_id: timer.timer_upstairs_aroma
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.upstairs_fragrance
|
|
|
|
|
2019-12-20 15:32:28 +00:00
|
|
|
#
|
|
|
|
# Turn ON fragrance outlets automatically at specific times of the day
|
|
|
|
#
|
2019-04-17 22:46:06 +00:00
|
|
|
- alias: Turn On Upstairs Aroma
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
2019-12-20 15:32:28 +00:00
|
|
|
at: "08:00:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
- platform: time
|
2019-12-20 15:32:28 +00:00
|
|
|
at: "20:00:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: switch.turn_on
|
|
|
|
entity_id: switch.upstairs_fragrance
|
|
|
|
|
|
|
|
- alias: Turn On Downstairs Aroma
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
2019-12-20 15:32:28 +00:00
|
|
|
at: "17:00:00"
|
2019-04-17 22:46:06 +00:00
|
|
|
action:
|
|
|
|
- service: switch.turn_on
|
2019-12-20 15:32:28 +00:00
|
|
|
entity_id: switch.downstairs_fragrance
|