mysmarthome/packages/settings.yaml

304 lines
8.4 KiB
YAML
Raw Normal View History

2019-04-17 22:46:06 +00:00
homeassistant:
# Input DateTime Options:
# I set the minutes to something that is divisible by 5, so that the automations
2019-08-19 00:21:05 +00:00
# can check once every 5 minutes without any performance penalty
2019-04-17 22:46:06 +00:00
###############################################################################
input_datetime:
summer_bed_time:
name: Summer Bed Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "23:00:00"
2019-04-17 22:46:06 +00:00
summer_wakeup_time:
name: Summer Wakeup Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "06:00:00"
2019-04-17 22:46:06 +00:00
autumn_bed_time:
name: Autumn Bed Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "22:00:00"
2019-12-20 15:32:28 +00:00
2019-04-17 22:46:06 +00:00
autumn_wakeup_time:
name: Autumn Wakeup Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "05:30:00"
2019-04-17 22:46:06 +00:00
winter_bed_time:
name: Winter Bed Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "22:00:00"
2019-12-20 15:32:28 +00:00
2019-04-17 22:46:06 +00:00
winter_wakeup_time:
name: Winter Wakeup Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "05:30:00"
2019-04-17 22:46:06 +00:00
spring_bed_time:
name: Spring Bed Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "22:00:00"
2019-12-20 15:32:28 +00:00
2019-04-17 22:46:06 +00:00
spring_wakeup_time:
name: Spring Wakeup Time
has_date: false
has_time: true
2019-08-19 00:21:05 +00:00
initial: "05:30:00"
2019-04-17 22:46:06 +00:00
input_number:
calendar_remind_before_days:
name: Calendar Remind Before Days
initial: 2
min: 1
max: 15
step: 1
2019-04-18 02:09:00 +00:00
mode: box
battery_alert_threshold:
name: Notify Low Battery if goes below
initial: 4
min: 1
max: 100
step: 1
mode: box
2019-04-17 22:46:06 +00:00
sensor:
- platform: template
sensors:
wakeup_hour:
friendly_name: Wakeup Hour
value_template: >
2019-12-20 15:32:28 +00:00
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_wakeup_time').split(':')[0] }}
2019-04-17 22:46:06 +00:00
{% else %}
6
{% endif %}
wakeup_minute:
friendly_name: Wakeup Minute
value_template: >
2019-12-20 15:32:28 +00:00
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_wakeup_time').split(':')[1] }}
2019-04-17 22:46:06 +00:00
{% else %}
0
{% endif %}
bedtime_hour:
friendly_name: Bedtime Hour
value_template: >
2019-12-20 15:32:28 +00:00
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_bed_time').split(':')[0] }}
2019-04-17 22:46:06 +00:00
{% else %}
0
{% endif %}
bedtime_minute:
friendly_name: Bedtime Minute
value_template: >
2019-12-20 15:32:28 +00:00
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_bed_time').split(':')[1] }}
2019-04-17 22:46:06 +00:00
{% else %}
0
{% endif %}
# Input Booleans Options
###############################################################################
input_boolean:
voice_notifications:
name: Home Assistant Announcements
icon: mdi:volume-off
do_not_disturb:
name: Do Not Disturb
initial: off
icon: mdi:do-not-disturb
2020-03-14 00:10:10 +00:00
led_alerts:
name: LED Messages
icon: mdi:led-strip
2019-04-17 22:46:06 +00:00
movie_time:
2019-08-19 00:21:05 +00:00
name: "Movie Time"
2019-04-17 22:46:06 +00:00
icon: mdi:movie-roll
2019-07-09 23:30:44 +00:00
stream_camera2chromecast:
name: Stream Cameras to Chromecast
icon: mdi:cctv
2019-04-17 22:46:06 +00:00
home_security:
name: Home Security System
icon: mdi:verified
home_assistant_status:
name: Home Status
icon: mdi:home-assistant
working_in_garage:
name: Working in Garage
icon: mdi:worker
working_in_office_room:
name: Working in Office Room
icon: mdi:worker
hourly_report:
name: Hourly Report
icon: mdi:file-chart
nightly_report:
name: Nightly Report
icon: mdi:file-chart
notify_camera_alerts:
name: Notify Camera Alerts
icon: mdi:camera
trash_reminders:
name: Remind Trash Notifications
icon: mdi:recycle
enjoyable_weather_reminders:
name: Remind me to enjoy Good Weather
icon: mdi:weather-sunny
security_system_alerts:
name: Notify Security System Status Change
icon: mdi:verified
zone_alerts:
name: Zone Alerts
icon: mdi:map-marker
battery_notifications:
name: Battery Notifications
icon: mdi:battery
sharp_tv:
name: TV
initial: on
icon: mdi:television-classic
dummy:
name: "Dummy Input Boolean!"
icon: mdi:sticker-emoji
initial: on
light_automations:
name: Light Automations
icon: mdi:lightbulb-on
text_alerts:
name: Text Alerts
icon: mdi:map-marker
2019-04-18 02:09:00 +00:00
garage_door_notifications:
name: Garage Door Notifications
icon: mdi:garage
2019-04-17 22:46:06 +00:00
###############################################################################
2019-08-19 00:21:05 +00:00
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
2019-04-17 22:46:06 +00:00
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
2019-08-19 00:21:05 +00:00
#
2019-04-17 22:46:06 +00:00
###############################################################################
automation:
2019-08-19 00:21:05 +00:00
# Do not disturb for 2 hours
# Simply turns ON the Do Not Disturb Flag ad resets
# after 2 hours. The Do Not Disturb flag is used in
# voice_notify script
######################################################
2019-04-17 22:46:06 +00:00
- alias: Do Not Disturb For 2 hours
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.do_not_disturb
2019-08-19 00:21:05 +00:00
to: "on"
2019-04-17 22:46:06 +00:00
for:
hours: 2
minutes: 0
action:
- service: input_boolean.turn_off
entity_id: input_boolean.do_not_disturb
2019-08-19 00:21:05 +00:00
######################################################
# Reset Movie time after 3 hours
2019-04-17 22:46:06 +00:00
- alias: Reset Movie Time After 3 Hours
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.movie_time
2019-08-19 00:21:05 +00:00
to: "on"
2019-04-17 22:46:06 +00:00
for:
hours: 3
action:
- service: input_boolean.turn_off
entity_id: input_boolean.movie_time
2019-08-19 00:21:05 +00:00
# Notify me when DO NOT DISTURB mode is changed
######################################################
2019-04-17 22:46:06 +00:00
- alias: Do Not Disturb State Change
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.do_not_disturb
action:
- service: script.notify_me
data_template:
message: "The Do Not Disturb Mode is {{ trigger.to_state.state |upper }}."
2019-08-19 00:21:05 +00:00
# Hourly Reports
######################################################
2019-04-17 22:46:06 +00:00
- alias: Hourly Report During Day Time
initial_state: true
trigger:
platform: time_pattern
2019-08-19 00:21:05 +00:00
hours: "/01"
2019-04-17 22:46:06 +00:00
minutes: 05
seconds: 00
condition:
- condition: template
value_template: '{{ states.input_boolean.hourly_report.state == "on" }}'
- condition: template
value_template: >
{% set hour = now().hour | int %}
{% if hour > 7 and hour < 21 %}
true
{% else %}
false
{% endif %}
action:
- service: script.home_status