Compare commits
50 Commits
37f5314e88
...
2025.1.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
4a61f5a45c
|
|||
|
47f23a4e02
|
|||
|
fbec1ae6e2
|
|||
|
d5ddf65270
|
|||
|
53b67bfc87
|
|||
|
725250acd7
|
|||
|
f988f1cccc
|
|||
|
515731fc68
|
|||
|
e1bd79e176
|
|||
|
a57cb4ecb7
|
|||
|
89ef394817
|
|||
|
6b9380f015
|
|||
|
6c145f0ca9
|
|||
|
ff98142b9e
|
|||
|
2ceba7cb57
|
|||
|
1b2ce1e097
|
|||
|
7459005500
|
|||
|
9ed2f658a4
|
|||
|
91d6a32274
|
|||
|
f2e9f6049c
|
|||
|
6f9c9fc8a9
|
|||
|
b819156cfa
|
|||
|
df583c23ff
|
|||
|
84f0e54ddb
|
|||
|
3803e9f9c2
|
|||
|
66d27a09d3
|
|||
|
ed71c557df
|
|||
|
35e5891f5e
|
|||
|
3d4dc4c1d9
|
|||
|
8c029143f2
|
|||
|
c773b29573
|
|||
|
76841ecb19
|
|||
|
f3d5d90593
|
|||
|
c7d1696cca
|
|||
|
db9b221fd9
|
|||
|
955bf32e81
|
|||
|
fc498ca23b
|
|||
|
f61d79dee7
|
|||
|
cc5a94e683
|
|||
|
c8678d831a
|
|||
|
e566d94d90
|
|||
|
54de982d95
|
|||
|
8a4545abed
|
|||
|
bb9e604d33
|
|||
|
e912733bbc
|
|||
|
53b230e0ad
|
|||
|
4761855858
|
|||
|
b83c3e2ecd
|
|||
|
22ba35d631
|
|||
|
b6539ea85c
|
+3
-1
@@ -22,6 +22,7 @@
|
||||
/appdaemon/apps/*
|
||||
/glances/
|
||||
/downloads/
|
||||
/lightwand/
|
||||
|
||||
# ignore any of these files no matter where they are using double *
|
||||
**.DS_Store
|
||||
@@ -78,4 +79,5 @@
|
||||
!/node-red/projects/NerdFlows/flows.json
|
||||
!/node-red/projects/NerdFlows/flows_cred.json
|
||||
!/node-red/projects/NerdFlows/package.json
|
||||
!/node-red/projects/NerdFlows/README.md
|
||||
!/node-red/projects/NerdFlows/README.md
|
||||
.codegpt
|
||||
+1127
-265
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
blueprint:
|
||||
name: Invert a binary sensor
|
||||
description: Creates a binary_sensor which holds the inverted value of a reference binary_sensor
|
||||
domain: template
|
||||
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/template/blueprints/inverted_binary_sensor.yaml
|
||||
input:
|
||||
reference_entity:
|
||||
name: Binary sensor to be inverted
|
||||
description: The binary_sensor which needs to have its value inverted
|
||||
selector:
|
||||
entity:
|
||||
domain: binary_sensor
|
||||
variables:
|
||||
reference_entity: !input reference_entity
|
||||
binary_sensor:
|
||||
state: >
|
||||
{% if states(reference_entity) == 'on' %}
|
||||
off
|
||||
{% elif states(reference_entity) == 'off' %}
|
||||
on
|
||||
{% else %}
|
||||
{{ states(reference_entity) }}
|
||||
{% endif %}
|
||||
# delay_on: not_used in this example
|
||||
# delay_off: not_used in this example
|
||||
# auto_off: not_used in this example
|
||||
availability: "{{ states(reference_entity) not in ('unknown', 'unavailable') }}"
|
||||
@@ -260,6 +260,8 @@ influxdb:
|
||||
- binary_sensor.kallen_desktop*
|
||||
- sensor.asus_laptop*
|
||||
- binary_sensor.asus_laptop*
|
||||
- sensor.*ashland*
|
||||
- sensor.*kasx*
|
||||
entities:
|
||||
- media_player.living_room_tv
|
||||
- media_player.basement_tv
|
||||
@@ -280,6 +282,7 @@ influxdb:
|
||||
- binary_sensor.internet
|
||||
- binary_sensor.people_present
|
||||
- weather.iron_nerd_weather_station
|
||||
- weather.ashland_weather_station
|
||||
- sensor.circle_k
|
||||
- sensor.kroger
|
||||
- sensor.kecks
|
||||
@@ -434,6 +437,8 @@ prometheus:
|
||||
- binary_sensor.kallen_desktop*
|
||||
- sensor.asus_laptop*
|
||||
- binary_sensor.asus_laptop*
|
||||
- sensor.*ashland*
|
||||
- sensor.*kasx*
|
||||
include_entities:
|
||||
- media_player.living_room_tv
|
||||
- media_player.basement_tv
|
||||
@@ -454,6 +459,7 @@ prometheus:
|
||||
- binary_sensor.internet
|
||||
- binary_sensor.people_present
|
||||
- weather.iron_nerd_weather_station
|
||||
- weather.ashland_weather_station
|
||||
- sensor.circle_k
|
||||
- sensor.kroger
|
||||
- sensor.kecks
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
|
||||
{% macro services_down() %}
|
||||
{% if states('sensor.services_down') | int == 1 %}
|
||||
There is one service offline. It is {{ state_attr('sensor.services_down','services') }}.
|
||||
{% elif states('sensor.services_down') | int > 1 %}
|
||||
There are {{ states('sensor.services_down') }} services currently offline. They are {{ state_attr('sensor.services_down','services') }}.
|
||||
{% else %}
|
||||
There are no services currently offline.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -146,7 +146,7 @@ It is {{ now().strftime("%I:%M %p") }}.
|
||||
{% endmacro %}
|
||||
|
||||
{% macro kallenSleepMsg() %}
|
||||
{% set schedMode = states('input_select.scheduled_climate_mode_kallen_fan') %}
|
||||
{% set schedMode = states('input_select.scheduled_climate_mode_kallen_bedroom') %}
|
||||
{% if schedMode == 'White Noise' %}
|
||||
{{ [
|
||||
"No fan in Collin's room tonight. Too cold outside. Brr. Enjoy your white noise.",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% if is_state(team,'PRE') %}
|
||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||
{% if date == now().strftime('%m-%d') %}
|
||||
The {{ state_attr(team,'friendly_name') }} will be playing today against the {{ state_attr(team,'opponent_name') }} at {{ state_attr(team,'venue') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} will be playing today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} at {{ state_attr(team,'venue') }}.
|
||||
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -34,11 +34,11 @@
|
||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||
The {{ state_attr(team,'friendly_name') }} had their game postponed today, and it will be played at a later date.
|
||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||
The {{ state_attr(team,'friendly_name') }} tied in their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} tied in their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% elif state_attr(team,'team_winner') == true %}
|
||||
The {{ state_attr(team,'friendly_name') }} won their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} won their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% elif state_attr(team,'opponent_winner') == true %}
|
||||
The {{ state_attr(team,'friendly_name') }} lost their game today against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
{% endif %}
|
||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||
@@ -47,11 +47,11 @@
|
||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||
The {{ state_attr(team,'friendly_name') }} had their game postponed yesterday, and it will be played at a later date.
|
||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||
The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% elif state_attr(team,'team_winner') == true %}
|
||||
The {{ state_attr(team,'friendly_name') }} won their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} won their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% elif state_attr(team,'opponent_winner') == true %}
|
||||
The {{ state_attr(team,'friendly_name') }} lost their game yesterday against the {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} lost their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
{% endif %}
|
||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||
@@ -59,11 +59,11 @@
|
||||
{% endif %}
|
||||
{% elif is_state(team,'IN') %}
|
||||
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
||||
The {{ state_attr(team,'friendly_name') }} are currently tied in their game against the {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} are currently tied in their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
||||
The {{ state_attr(team,'friendly_name') }} are currently winning their game against the {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} are currently winning their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||
{% else %}
|
||||
The {{ state_attr(team,'friendly_name') }} are currently losing their game against the {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
The {{ state_attr(team,'friendly_name') }} are currently losing their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -71,7 +71,9 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro sports_inhibit(team) %}
|
||||
{% if state_attr(team,'kickoff_in') %}
|
||||
{% if is_state(team,'NOT_FOUND') %}
|
||||
true
|
||||
{% elif state_attr(team,'kickoff_in') %}
|
||||
{{ 'months' in state_attr(team,'kickoff_in') or
|
||||
'month' in state_attr(team,'kickoff_in') or
|
||||
'weeks' in state_attr(team,'kickoff_in') }}
|
||||
@@ -152,4 +154,6 @@
|
||||
{{ cleanup(data()) }}
|
||||
{% endmacro %}
|
||||
|
||||
{{ sports_updates('pregame') }}
|
||||
{% macro sports_datetime(team) %}
|
||||
{{ as_timestamp(state_attr(team,'date')) | timestamp_custom('%Y-%m-%d %H:%M:%S') }}
|
||||
{% endmacro%}
|
||||
|
||||
@@ -13,9 +13,21 @@
|
||||
{% set houseEveningRan = is_state('input_boolean.house_scheduling_evening_ran','on') %}
|
||||
{% set masterBedroomEveningRan = is_state('input_boolean.master_bedroom_scheduling_evening_ran','on') %}
|
||||
{% set emmaEveningRan = is_state('input_boolean.emma_scheduling_evening_ran','on') %}
|
||||
{% set kallenMorningAnnc = is_state('input_boolean.kallen_morning_announcements','on') %}
|
||||
{% set kallenText = 'Kallen' %}
|
||||
{% set kallenTTS = 'Collin' %}
|
||||
|
||||
{% macro morning_annc(type,method) %}
|
||||
{% if method == 'text' %}
|
||||
{% set identKallen = kallenText %}
|
||||
{% elif method == 'tts' %}
|
||||
{% set identKallen = kallenTTS %}
|
||||
{% endif %}
|
||||
{% if kallenMorningAnnc %}
|
||||
First things first, we have some announcements for {{ identKallen }}. {{ states('input_text.kallen_morning_announcements') }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro laundry_report(type,method) %}
|
||||
{% macro data() %}
|
||||
{% set washerTimer = states('timer.washer_timer') %}
|
||||
@@ -591,38 +603,20 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro emma_sleep(type,method) %}
|
||||
{% set asleep = state_attr('input_datetime.emma_down_for_nap','timestamp') | int %}
|
||||
{% set wakeup = state_attr('input_datetime.emma_up_from_nap','timestamp') | int %}
|
||||
{% set day = now().strftime("%-d") %}
|
||||
{% set asleep_day = asleep | timestamp_custom("%-d") %}
|
||||
{% set wakeup_day = wakeup | timestamp_custom("%-d") %}
|
||||
{% if is_state('input_boolean.emma_sleeping','off') and (is_state('input_boolean.emma_has_napped','on') or ((asleep_day == day) and (wakeup > asleep))) %}
|
||||
Emma napped today for {{ custom_time_between('input_datetime.emma_down_for_nap','input_datetime.emma_up_from_nap','hour,minute') }}. She was retrieved from her room at around {{ input_datetime_read('input_datetime.emma_up_from_nap') | trim }}.
|
||||
{% elif (is_state('input_boolean.emma_has_napped','off') and (((asleep_day == day) and (wakeup_day != day)) or wakeup < asleep)) and is_state('input_boolean.emma_sleeping','on') %}
|
||||
Emma is down for nap. She was put down at around {{ input_datetime_read('input_datetime.emma_down_for_nap') | trim }}. She has been asleep for {{ custom_time('input_datetime.emma_down_for_nap','hour,minute') }}.
|
||||
{% elif is_state('input_boolean.emma_sleeping','on') %}
|
||||
{% if is_state('input_boolean.emma_sleeping','on') %}
|
||||
{% if is_state('binary_sensor.early_night_mode','on') %}
|
||||
Emma is asleep for the night. She went to bed at {{ input_datetime_read('input_datetime.emma_asleep_at') | trim }}.
|
||||
{% else %}
|
||||
Emma has not yet awoken for the day. She went to bed at {{ input_datetime_read('input_datetime.emma_asleep_at') | trim }}. Her wakeup time is scheduled for {{ input_datetime_read('input_datetime.emma_wakeup') | trim }}.
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Emma is awake, and does not appear to have napped yet. She woke up at {{ input_datetime_read('input_datetime.emma_awake_at') | trim }}.
|
||||
Emma is awake. She woke up at {{ input_datetime_read('input_datetime.emma_awake_at') | trim }}.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro emma_sleep_notification(type,method) %}
|
||||
{% set asleep = state_attr('input_datetime.emma_down_for_nap','timestamp') | int %}
|
||||
{% set wakeup = state_attr('input_datetime.emma_up_from_nap','timestamp') | int %}
|
||||
{% set day = now().strftime("%-d") %}
|
||||
{% set asleep_day = asleep | timestamp_custom("%-d") %}
|
||||
{% set wakeup_day = wakeup | timestamp_custom("%-d") %}
|
||||
{% if is_state('input_boolean.emma_sleeping','off') and (is_state('input_boolean.emma_has_napped','on') or ((asleep_day == day) and (wakeup > asleep))) %}
|
||||
Emma has awoken. She napped today for {{ custom_time_between('input_datetime.emma_down_for_nap','input_datetime.emma_up_from_nap','hour,minute') }}. She was retrieved from her room at {{ clock('12-hr') }}
|
||||
{% elif is_state('input_boolean.emma_has_napped','off') and is_state('input_boolean.emma_sleeping','off') and ((asleep_day != day) or (wakeup_day != day)) %}
|
||||
{% if is_state('input_boolean.emma_sleeping','off') %}
|
||||
Emma has awoken for the day at {{ clock('12-hr') }}
|
||||
{% elif is_state('input_boolean.emma_has_napped','off') and ((asleep_day == day) and (wakeup_day != day)) and is_state('input_boolean.emma_sleeping','on') %}
|
||||
Emma is being put down for nap. She was put down at {{ clock('12-hr') }}
|
||||
{% elif is_state('input_boolean.emma_sleeping','on') %}
|
||||
Emma is asleep for the night (or at least, her sleep switch is active) at {{ clock('12-hr') }}
|
||||
{% else %}
|
||||
|
||||
@@ -68,6 +68,31 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro datetime_from_calendar(calendar,start_or_end,action,operator,days,hours,minutes) %}
|
||||
{% set base = as_timestamp(strptime(state_attr(calendar,start_or_end), '%Y-%m-%d %H:%M:%S')) | int %}
|
||||
{% if minutes is defined %}
|
||||
{% set mod = ((((days * 24) * 60) * 60) + (hours* 60) * 60) + (minutes * 60) | int %}
|
||||
{% elif hours is defined %}
|
||||
{% set mod = (((days * 24) * 60) * 60) + (hours* 60) * 60 | int %}
|
||||
{% elif days is defined %}
|
||||
{% set mod = ((days * 24) * 60) * 60 | int %}
|
||||
{% endif %}
|
||||
{% if action == 'set' %}
|
||||
{% set ts = "%Y-%m-%d %H:%M:%S" %}
|
||||
{% elif action == 'read' %}
|
||||
{% set ts = "%Y-%m-%d %-I:%M %p" %}
|
||||
{% endif %}
|
||||
{% if operator is defined %}
|
||||
{% if operator == 'add' %}
|
||||
{{ (base + mod) | timestamp_custom(ts) }}
|
||||
{% elif operator == 'subtract' %}
|
||||
{{ (base - mod) | timestamp_custom(ts) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ base | timestamp_custom(ts) }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro set_datetime(hours,minutes,seconds) %}
|
||||
{% if seconds is defined %}
|
||||
{{ (as_timestamp(now()) + (((hours * 60) * 60) + (minutes * 60)) + seconds) | int | timestamp_custom('%Y-%m-%d %H:%M:%S') }}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Adjustment
|
||||
about: Request a change/adjustment to an existing feature
|
||||
title: "[Adjustment]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this adjustment request!
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This issue was created by an issue **template**
|
||||
visible: [content]
|
||||
- type: textarea
|
||||
id: adjustment-request
|
||||
attributes:
|
||||
label: Describe your request
|
||||
description: Which existing feature would you like changed/adjusted?
|
||||
placeholder: Tell me what you want, what you really really want!
|
||||
value: "Request here!"
|
||||
validations:
|
||||
required: true
|
||||
labels:
|
||||
- type/adjustment
|
||||
- needs-response
|
||||
@@ -21,4 +21,5 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
labels:
|
||||
- type/bug
|
||||
- needs-response
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Feature Request
|
||||
about: Request a new feature to be added
|
||||
title: "[Feature Request]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request form!
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This issue was created by an issue **template**
|
||||
visible: [content]
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
attributes:
|
||||
label: Feature Request
|
||||
description: What new feature would you like to see?
|
||||
placeholder: What is your feature request!
|
||||
value: "I would like this feature"
|
||||
validations:
|
||||
required: true
|
||||
labels:
|
||||
- type/enhancement
|
||||
- needs-response
|
||||
@@ -61,6 +61,10 @@ input_text:
|
||||
name: Kallen Briefing Extras
|
||||
icon: mdi:plus
|
||||
max: 255
|
||||
kallen_morning_announcements:
|
||||
name: Kallen Morning Announcements
|
||||
icon: mdi:bullhorn
|
||||
max: 255
|
||||
|
||||
input_boolean:
|
||||
briefing_extras:
|
||||
@@ -69,6 +73,9 @@ input_boolean:
|
||||
kallen_briefing_extras:
|
||||
name: Kallen Briefing Extras
|
||||
icon: mdi:plus
|
||||
kallen_morning_announcements:
|
||||
name: Kallen Morning Announcements
|
||||
icon: mdi:bullhorn
|
||||
good_morning:
|
||||
name: Good Morning Ran
|
||||
icon: mdi:home-analytics
|
||||
@@ -96,6 +103,15 @@ input_boolean:
|
||||
sun_reports:
|
||||
name: Sun Reports
|
||||
icon: mdi:weather-sunny-alert
|
||||
morning_briefing_allowed:
|
||||
name: Morning Briefing Allowed
|
||||
icon: mdi:bullhorn
|
||||
daily_briefing_allowed:
|
||||
name: Daily Briefing Allowed
|
||||
icon: mdi:bullhorn
|
||||
nightly_briefing_allowed:
|
||||
name: Nightly Briefing Allowed
|
||||
icon: mdi:bullhorn
|
||||
|
||||
intent_script:
|
||||
PlayAnnouncement:
|
||||
|
||||
+45
-18
@@ -217,6 +217,14 @@ input_boolean:
|
||||
name: Cold Day
|
||||
icon: mdi:snowflake
|
||||
|
||||
basement_studio_heat_allowed:
|
||||
name: Basement Studio Heat Allowed
|
||||
icon: mdi:heating-coil
|
||||
|
||||
emma_bedroom_heater_installed:
|
||||
name: Emma Bedroom Heater Installed
|
||||
icon: mdi:heating-coil
|
||||
|
||||
input_select:
|
||||
scheduled_climate_mode_master_bedroom_aircon:
|
||||
name: Scheduled Climate Mode - Master Bedroom Aircon
|
||||
@@ -231,22 +239,16 @@ input_select:
|
||||
- Fan
|
||||
- N/A
|
||||
icon: mdi:home-thermometer
|
||||
scheduled_climate_mode_emma_aircon:
|
||||
name: Scheduled Climate Mode - Emma Aircon
|
||||
scheduled_climate_mode_emma_bedroom:
|
||||
name: Scheduled Climate Mode - Emma Bedroom
|
||||
options:
|
||||
- AC
|
||||
- Heat
|
||||
- White Noise
|
||||
- N/A
|
||||
icon: mdi:home-thermometer
|
||||
naptime_climate_mode_emma_aircon:
|
||||
name: Naptime Climate Mode - Emma Aircon
|
||||
options:
|
||||
- AC
|
||||
- White Noise
|
||||
- N/A
|
||||
icon: mdi:home-thermometer
|
||||
scheduled_climate_mode_kallen_fan:
|
||||
name: Scheduled Climate Mode - Kallen Fan
|
||||
scheduled_climate_mode_kallen_bedroom:
|
||||
name: Scheduled Climate Mode - Kallen Bedroom
|
||||
options:
|
||||
- Fan
|
||||
- White Noise
|
||||
@@ -310,13 +312,6 @@ input_number:
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer
|
||||
emma_naptime_aircon_threshold:
|
||||
name: Emma Naptime Aircon Threshold
|
||||
min: 40
|
||||
max: 80
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer
|
||||
kallen_fan_threshold:
|
||||
name: Kallen Fan Threshold
|
||||
min: 40
|
||||
@@ -374,6 +369,38 @@ input_number:
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer
|
||||
|
||||
climate:
|
||||
- platform: generic_thermostat
|
||||
unique_id: c2979677-045e-4393-a1cb-e6618978394f
|
||||
name: Basement Studio Thermostat
|
||||
heater: switch.basement_studio_heater
|
||||
target_sensor: sensor.basement_studio_temperature
|
||||
min_temp: 50
|
||||
max_temp: 80
|
||||
target_temp: 62
|
||||
ac_mode: false
|
||||
min_cycle_duration:
|
||||
minutes: 2
|
||||
cold_tolerance: 1
|
||||
hot_tolerance: 0
|
||||
initial_hvac_mode: "off"
|
||||
precision: 1.0
|
||||
- platform: generic_thermostat
|
||||
unique_id: 52cb7523-155a-4b26-808a-d6037b3ef7e4
|
||||
name: Emma Bedroom Thermostat
|
||||
heater: switch.emma_bedroom_heater
|
||||
target_sensor: sensor.emma_bedroom_temperature
|
||||
min_temp: 50
|
||||
max_temp: 80
|
||||
target_temp: 62
|
||||
ac_mode: false
|
||||
min_cycle_duration:
|
||||
minutes: 2
|
||||
cold_tolerance: 1
|
||||
hot_tolerance: 0
|
||||
initial_hvac_mode: "off"
|
||||
precision: 1.0
|
||||
|
||||
intent_script:
|
||||
MasterBedroomModes:
|
||||
action:
|
||||
|
||||
@@ -170,6 +170,87 @@ weather:
|
||||
{{ states(result) | float }}
|
||||
precipitation_unit: in
|
||||
|
||||
- platform: template
|
||||
name: "Ashland Weather Station"
|
||||
condition_template: >
|
||||
{% set stations = [
|
||||
states.weather.ashland,
|
||||
states.weather.kasx,
|
||||
states.weather.pirateweather_ashland
|
||||
] %}
|
||||
{% set result = stations | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) }}
|
||||
temperature_template: >
|
||||
{% set temps = [
|
||||
states.sensor.ashland_temperature,
|
||||
states.sensor.kasx_temperature,
|
||||
states.sensor.pirateweather_ashland_temperature
|
||||
] %}
|
||||
{% set sensor = temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(sensor) | float }}
|
||||
temperature_unit: °F
|
||||
humidity_template: >
|
||||
{% set humidity = [
|
||||
states.sensor.ashland_relative_humidity,
|
||||
states.sensor.kasx_relative_humidity,
|
||||
states.sensor.pirateweather_ashland_humidity
|
||||
] %}
|
||||
{% set result = humidity | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
forecast_daily_template: >
|
||||
{% set forecasts = [
|
||||
states.sensor.weather_com_ashland_daily_weather_forecast.attributes,
|
||||
states.weather.kasx.attributes,
|
||||
states.sensor.pirateweather_ashland_daily_weather_forecast.attributes
|
||||
] %}
|
||||
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
||||
forecast_hourly_template: >
|
||||
{% set forecasts = [
|
||||
states.sensor.weather_com_ashland_hourly_weather_forecast,
|
||||
states.sensor.pirateweather_ashland_hourly_weather_forecast.attributes
|
||||
] %}
|
||||
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
||||
pressure_template: >
|
||||
{% set pressures = [
|
||||
states.sensor.ashland_pressure,
|
||||
states.sensor.kasx_barometric_pressure
|
||||
] %}
|
||||
{% set result = pressures | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
pressure_unit: inHg
|
||||
wind_speed_template: >
|
||||
{% set windspeeds = [
|
||||
states.sensor.ashland_wind_speed,
|
||||
states.sensor.pirateweather_ashland_wind_speed,
|
||||
states.sensor.kasx_wind_speed
|
||||
] %}
|
||||
{% set result = windspeeds | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
wind_speed_unit: mph
|
||||
wind_bearing_template: >
|
||||
{% set windbearings = [
|
||||
states.sensor.ashland_wind_direction_degrees,
|
||||
states.sensor.pirateweather_ashland_wind_bearing
|
||||
] %}
|
||||
{% set result = windbearings | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
visibility_template: >
|
||||
{% set vis = [
|
||||
states.sensor.kasx_visibility,
|
||||
states.sensor.pirateweather_ashland_visibility
|
||||
] %}
|
||||
{% set result = vis | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
visibility_unit: mi
|
||||
attribution_template: "Daily weather data from Iron Nerd's custom weather station template"
|
||||
ozone_template: >
|
||||
{% set ozones = [
|
||||
states.sensor.pirateweather_ashland_ozone
|
||||
] %}
|
||||
{% set result = ozones | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||
{{ states(result) | float }}
|
||||
precipitation_unit: in
|
||||
|
||||
# binary_sensor:
|
||||
# - platform: bayesian
|
||||
# unique_id: 3e9640d9-57a0-4495-8731-e64b34774065
|
||||
@@ -386,6 +467,119 @@ template:
|
||||
unique_id: 5bece9ad-2e1e-45a9-a690-93f8ff1d8780
|
||||
state: "{{ today.precipitation_probability }}"
|
||||
unit_of_measurement: "%"
|
||||
- trigger:
|
||||
- platform: time_pattern
|
||||
minutes: /15
|
||||
- platform: state
|
||||
entity_id: weather.pirateweather_ashland
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: weather.get_forecasts
|
||||
data:
|
||||
type: daily
|
||||
target:
|
||||
entity_id: weather.pirateweather_ashland
|
||||
response_variable: daily
|
||||
- variables:
|
||||
today: "{{ daily['weather.pirateweather_ashland'].forecast[0] }}"
|
||||
sensor:
|
||||
- name: Pirateweather Ashland Daily Weather Forecast
|
||||
unique_id: 9b103d9e-0fa3-4b47-b95d-c0caa4621895
|
||||
state: "{{ now().isoformat() }}"
|
||||
attributes:
|
||||
forecast: "{{ daily['weather.pirateweather_ashland'].forecast }}"
|
||||
- name: Pirateweather Ashland High
|
||||
unique_id: 21bf1e49-c3e3-4cec-8c89-add9e9efe9f3
|
||||
state: "{{ today.temperature }}"
|
||||
unit_of_measurement: °F
|
||||
- name: Pirateweather Ashland Low
|
||||
unique_id: fe06c076-807e-43a1-8413-c31ec389ec08
|
||||
state: "{{ today.templow }}"
|
||||
unit_of_measurement: °F
|
||||
- name: Pirateweather Ashland Rain Chance Today
|
||||
unique_id: 687b2246-ae49-47e0-95f3-f93dd159a43c
|
||||
state: "{{ today.precipitation_probability }}"
|
||||
unit_of_measurement: "%"
|
||||
- trigger:
|
||||
- platform: time_pattern
|
||||
minutes: /15
|
||||
- platform: state
|
||||
entity_id: weather.pirateweather_ashland
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: weather.get_forecasts
|
||||
data:
|
||||
type: hourly
|
||||
target:
|
||||
entity_id: weather.pirateweather_ashland
|
||||
response_variable: hourly
|
||||
sensor:
|
||||
- name: Pirateweather Ashland Hourly Weather Forecast
|
||||
unique_id: bcc4ca8c-aee7-4238-a78d-c35dae8c2c2b
|
||||
state: "{{ now().isoformat() }}"
|
||||
attributes:
|
||||
forecast: "{{ hourly['weather.pirateweather_ashland'].forecast }}"
|
||||
- trigger:
|
||||
- platform: time_pattern
|
||||
minutes: /15
|
||||
- platform: state
|
||||
entity_id: weather.ashland
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: weather.get_forecasts
|
||||
data:
|
||||
type: daily
|
||||
target:
|
||||
entity_id: weather.ashland
|
||||
response_variable: daily
|
||||
- variables:
|
||||
today: "{{ daily['weather.ashland'].forecast[0] }}"
|
||||
sensor:
|
||||
- name: Weather.com Ashland Daily Weather Forecast
|
||||
unique_id: f658e6ce-26a2-4c0d-9dc1-0bf26e95caf3
|
||||
state: "{{ now().isoformat() }}"
|
||||
attributes:
|
||||
forecast: "{{ daily['weather.ashland'].forecast }}"
|
||||
- name: Weather.com Ashland High
|
||||
unique_id: b5cf81b7-9a24-47c5-a5ee-9f3367251c83
|
||||
state: >
|
||||
{% if is_number(today.temperature) %}
|
||||
{{ today.temperature }}
|
||||
{% else %}
|
||||
{{ state_attr('weather.ashland','temperature') }}
|
||||
{% endif %}
|
||||
unit_of_measurement: °F
|
||||
- name: Weather.com Ashland Low
|
||||
unique_id: 196fb8a5-8ff5-47f1-ada5-dd1d3a69d596
|
||||
state: "{{ today.templow }}"
|
||||
unit_of_measurement: °F
|
||||
- name: Weather.com Ashland Rain Chance Today
|
||||
unique_id: 2e84209b-8d0a-425a-8c24-10ad8cf0c029
|
||||
state: "{{ today.precipitation_probability }}"
|
||||
unit_of_measurement: "%"
|
||||
- trigger:
|
||||
- platform: time_pattern
|
||||
minutes: /15
|
||||
- platform: state
|
||||
entity_id: weather.ashland
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: weather.get_forecasts
|
||||
data:
|
||||
type: hourly
|
||||
target:
|
||||
entity_id: weather.ashland
|
||||
response_variable: hourly
|
||||
sensor:
|
||||
- name: Weather.com Ashland Hourly Weather Forecast
|
||||
unique_id: 463cbe89-997c-49cc-a644-9e05ffd804ff
|
||||
state: "{{ now().isoformat() }}"
|
||||
attributes:
|
||||
forecast: "{{ hourly['weather.ashland'].forecast }}"
|
||||
- binary_sensor:
|
||||
- name: Heat Threshold
|
||||
unique_id: 849a08bb-d4e6-40e9-ae42-50f7fb71b727
|
||||
|
||||
+22
-199
@@ -4,9 +4,6 @@ input_boolean:
|
||||
emma_sleeping:
|
||||
name: Emma Sleeping
|
||||
icon: mdi:sleep
|
||||
emma_has_napped:
|
||||
name: Emma Has Napped
|
||||
icon: mdi:check
|
||||
emma_alternating_meds_active:
|
||||
name: Emma Alternating Meds Active
|
||||
icon: mdi:medication
|
||||
@@ -71,16 +68,6 @@ input_datetime:
|
||||
has_date: false
|
||||
has_time: true
|
||||
icon: mdi:weather-sunset-up
|
||||
emma_down_for_nap:
|
||||
name: Emma Down For Nap
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:sleep
|
||||
emma_up_from_nap:
|
||||
name: Emma Up From Nap
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:eye
|
||||
# These are for use in remembering which medications she has had when she is sick, and when to safely give them again
|
||||
emma_ibuprofen:
|
||||
name: Emma Ibuprofen
|
||||
@@ -145,31 +132,13 @@ automation:
|
||||
id: sleep-on
|
||||
sequence:
|
||||
- service: script.emma_sleep
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'off'
|
||||
- condition: time
|
||||
before: "23:00:00"
|
||||
after: "07:00:00"
|
||||
then:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_down_for_nap
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('datetime',24) }}
|
||||
else:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_asleep_at
|
||||
data:
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('time',24) }}
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_asleep_at
|
||||
data:
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('time',24) }}
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: script.text_notify
|
||||
@@ -186,28 +155,6 @@ automation:
|
||||
- condition: trigger
|
||||
id: sleep-off
|
||||
sequence:
|
||||
- if:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'off'
|
||||
- condition: time
|
||||
after: "18:00:00"
|
||||
before: "01:00:00"
|
||||
then:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_up_from_nap
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('datetime',24) }}
|
||||
- delay:
|
||||
seconds: 1
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_scheduling_evening_ran
|
||||
@@ -260,41 +207,6 @@ automation:
|
||||
target:
|
||||
entity_id: input_boolean.emma_sleeping
|
||||
|
||||
- id: e44c2ab8-00cd-40ab-9b42-824511ac20aa
|
||||
alias: Emma Naptime Climate
|
||||
description: Sets the climate mode for when Emma goes down for nap
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
- platform: state
|
||||
entity_id: input_number.emma_naptime_aircon_threshold
|
||||
- platform: state
|
||||
entity_id: input_boolean.hot_day
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_sleeping
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_bedroom_climate_override
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_bedroom_aircon_installed
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.naptime_climate_mode_emma_aircon
|
||||
data:
|
||||
option: >
|
||||
{% set temp = state_attr('weather.iron_nerd_weather_station','temperature') | int %}
|
||||
{% set threshold = states('input_number.emma_naptime_aircon_threshold') | int %}
|
||||
{% if (temp >= threshold) or is_state('input_boolean.hot_day','on') %}
|
||||
AC
|
||||
{% else %}
|
||||
White Noise
|
||||
{% endif %}
|
||||
|
||||
- id: 5b45eeb2-171e-4bac-825b-8ac7aa672dab
|
||||
alias: Emma Asleep Update
|
||||
description: Attempt to make readouts of when Emma went to bed more accurate
|
||||
@@ -310,11 +222,6 @@ automation:
|
||||
event_data:
|
||||
entity_id: timer.emma_bedtime_update
|
||||
id: bedtime-timer-finished
|
||||
- platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.emma_naptime_update
|
||||
id: naptime-timer-finished
|
||||
- platform: state
|
||||
entity_id: light.emma_bedroom_light
|
||||
to: 'off'
|
||||
@@ -325,37 +232,11 @@ automation:
|
||||
- condition: trigger
|
||||
id: initial
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'off'
|
||||
- condition: time
|
||||
before: "23:00:00"
|
||||
after: "07:00:00"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.emma_naptime_update
|
||||
data:
|
||||
duration: "01:00:00"
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: "23:00:00"
|
||||
before: "07:00:00"
|
||||
sequence:
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.emma_bedtime_update
|
||||
data:
|
||||
duration: "01:00:00"
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.emma_bedtime_update
|
||||
data:
|
||||
duration: "01:00:00"
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: lights-off
|
||||
@@ -364,71 +245,18 @@ automation:
|
||||
target:
|
||||
entity_id:
|
||||
- timer.emma_bedtime_update
|
||||
- timer.emma_naptime_update
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_sleeping
|
||||
state: 'on'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'off'
|
||||
- condition: time
|
||||
before: "23:00:00"
|
||||
after: "07:00:00"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_down_for_nap
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('datetime',24) }}
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: "23:00:00"
|
||||
before: "07:00:00"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_asleep_at
|
||||
data:
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('time',24) }}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: naptime-timer-finished
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: light.emma_bedroom_light
|
||||
state: 'on'
|
||||
then:
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: timer.start
|
||||
target:
|
||||
entity_id: timer.emma_naptime_update
|
||||
data:
|
||||
duration: "01:00:00"
|
||||
else:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_down_for_nap
|
||||
entity_id: input_datetime.emma_asleep_at
|
||||
data:
|
||||
datetime: >
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('datetime',24) }}
|
||||
{{ current_time('time',24) }}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: bedtime-timer-finished
|
||||
@@ -986,18 +814,13 @@ script:
|
||||
who: basement
|
||||
type: normal
|
||||
message: Emma has awoken, so it is time to make your way upstairs now
|
||||
- if:
|
||||
- condition: time
|
||||
before: "18:00:00"
|
||||
after: "07:00:00"
|
||||
then:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_awake_at
|
||||
data:
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('time',24) }}
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.emma_awake_at
|
||||
data:
|
||||
time: >
|
||||
{% from 'time.jinja' import current_time %}
|
||||
{{ current_time('time',24) }}
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
|
||||
@@ -16,9 +16,15 @@ input_boolean:
|
||||
kallen_late_bedtime:
|
||||
name: Kallen Late Bedtime
|
||||
icon: mdi:weather-night
|
||||
kallen_morning_meds_reminder:
|
||||
name: Kallen Morning Meds Reminder
|
||||
icon: mdi:medication
|
||||
kallen_morning_meds_taken:
|
||||
name: Kallen Morning Meds Taken
|
||||
icon: mdi:medication
|
||||
kallen_night_meds_reminder:
|
||||
name: Kallen Night Meds Reminder
|
||||
icon: mdi:medication
|
||||
kallen_night_meds_taken:
|
||||
name: Kallen Night Meds Taken
|
||||
icon: mdi:medication
|
||||
@@ -67,12 +73,12 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
kallen_morning_meds_notify:
|
||||
name: Kallen Morning Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
kallen_night_meds_notify:
|
||||
name: Kallen Night Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
kallen_alarm_clock:
|
||||
|
||||
@@ -301,10 +301,6 @@ notify:
|
||||
services:
|
||||
- service: alexa_media_living_room_echo_dot
|
||||
- service: alexa_media_basement_echo_dot
|
||||
- platform: html5
|
||||
vapid_pub_key: !secret vapid_pub_key
|
||||
vapid_prv_key: !secret vapid_prv_key
|
||||
vapid_email: tm24fan8@gmail.com
|
||||
|
||||
script:
|
||||
volume_reset:
|
||||
|
||||
@@ -89,7 +89,7 @@ template:
|
||||
- binary_sensor:
|
||||
- name: People Present
|
||||
state: >
|
||||
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') }}
|
||||
{{ is_state('person.tony_stork', 'home') or is_state('person.christina_stork', 'home') or is_state('person.kallen_stork', 'home') or is_state('input_boolean.guest_mode', 'on') }}
|
||||
- name: "Tony Home"
|
||||
unique_id: 4f0d8c3d-dc49-4b7a-a1fc-5d286b4a954d
|
||||
state: "{{ is_state('device_tracker.tony_s_iphone', 'home') }}" # Add new tracker when we have one
|
||||
|
||||
+36
-41
@@ -164,7 +164,7 @@ script:
|
||||
time: >
|
||||
{% from 'time.jinja' import time_from_calendar %}
|
||||
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||
10:00
|
||||
{{ time_from_calendar('calendar.kallen_school_days','start_time','set','add',2)}}
|
||||
{% else %}
|
||||
{{ time_from_calendar('calendar.kallen_school_days','start_time','set') }}
|
||||
{% endif %}
|
||||
@@ -247,11 +247,14 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.kallen_morning_meds_notify
|
||||
data:
|
||||
time: >
|
||||
datetime: >
|
||||
{% set date = now().strftime('%Y-%m-%d') %}
|
||||
{% set wakeup = state_attr('input_datetime.kallen_wakeup_time','timestamp') | int %}
|
||||
{% set wakeup_mod = (wakeup + 600) | timestamp_custom('%T',false) %}
|
||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||
{{ (state_attr('input_datetime.kallen_wakeup_time','timestamp') + 600) | timestamp_custom('%H:%M', false) }}
|
||||
{{ date + ' ' + wakeup_mod }}
|
||||
{% else %}
|
||||
{{ states('input_datetime.kallen_wakeup_time') }}
|
||||
{{ date + ' ' + states('input_datetime.kallen_wakeup_time') }}
|
||||
{% endif %}
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
@@ -271,16 +274,16 @@ script:
|
||||
time: >
|
||||
{% if is_state('input_boolean.school_in_session','on') %}
|
||||
{% if is_state('binary_sensor.kallen_school_tomorrow', 'on') %}
|
||||
21:00
|
||||
{% else %}
|
||||
22:00
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if is_state('binary_sensor.kallen_btb_tomorrow','on') %}
|
||||
22:00
|
||||
{% else %}
|
||||
23:00
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if is_state('binary_sensor.kallen_btb_tomorrow','on') %}
|
||||
23:00
|
||||
{% else %}
|
||||
00:00
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
- delay:
|
||||
seconds: 1
|
||||
@@ -300,7 +303,7 @@ script:
|
||||
then:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.scheduled_climate_mode_kallen_fan
|
||||
entity_id: input_select.scheduled_climate_mode_kallen_bedroom
|
||||
data:
|
||||
option: >
|
||||
{% if is_state('input_boolean.kallen_overnight','on') %}
|
||||
@@ -324,7 +327,15 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.kallen_night_meds_notify
|
||||
data:
|
||||
time: "{{ (state_attr('input_datetime.kallen_bedtime','timestamp') - 600) | timestamp_custom('%H:%M', false) }}"
|
||||
datetime: >
|
||||
{% set bedtime = state_attr('input_datetime.kallen_bedtime','timestamp') | int %}
|
||||
{% set bedtime_mod = (bedtime - 600) | timestamp_custom('%T',false) %}
|
||||
{% if bedtime < 13800 %}
|
||||
{% set date = (as_timestamp(now()) + 86400) | timestamp_custom("%Y-%m-%d", True) %}
|
||||
{% else %}
|
||||
{% set date = now().strftime('%Y-%m-%d') %}
|
||||
{% endif %}
|
||||
{{ date + ' ' + bedtime_mod }}
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_late_bedtime
|
||||
@@ -354,7 +365,7 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.kallen_night_meds_notify
|
||||
data:
|
||||
time: "{{ (state_attr('input_datetime.kallen_night_meds_notify','timestamp') + 3600) | timestamp_custom('%H:%M', false) }}"
|
||||
datetime: "{{ (state_attr('input_datetime.kallen_night_meds_notify','timestamp') + 3600) | timestamp_custom('%Y-%m-%d %H:%M:%S') }}"
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.kallen_scheduling_evening_ran
|
||||
@@ -383,11 +394,7 @@ script:
|
||||
{% set kallenbriefing = state_attr('input_datetime.kallen_morning_briefing','timestamp') %}
|
||||
{% set kallenloc = states('input_select.kallen_morning_briefing_location') %}
|
||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||
9:20
|
||||
{% else %}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2400) | timestamp_custom('%H:%M', false) }}
|
||||
{% endif %}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||
{% if (state_attr('input_datetime.tina_workday_start','timestamp')) > 43200 %}
|
||||
{% if kallenloc == 'Common Areas' and kallenbriefing == 43200 %}
|
||||
@@ -586,11 +593,13 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
data:
|
||||
time: >
|
||||
datetime: >
|
||||
{% from 'time.jinja' import datetime_from_calendar %}
|
||||
{% set date = now().strftime('%Y-%m-%d') %}
|
||||
{% if is_state('input_boolean.work_today','on') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') | int - 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{{ datetime_from_calendar('calendar.family_tinawork','start_time','set','subtract',0,0,30) }}
|
||||
{% else %}
|
||||
{{ states('input_datetime.master_bedroom_wakeup') }}
|
||||
{{ date + ' ' + states('input_datetime.master_bedroom_wakeup') }}
|
||||
{% endif %}
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
@@ -676,7 +685,7 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.tina_night_meds_notify
|
||||
data:
|
||||
time: '03:00'
|
||||
datetime: "{{ (as_timestamp(now()) + 86400) | timestamp_custom('%Y-%m-%d', True) + ' 03:00:00' }}"
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.master_bedroom_scheduling_evening_ran
|
||||
@@ -684,9 +693,6 @@ script:
|
||||
emma_bedroom_scheduling_morning:
|
||||
alias: 'Emma Bedroom Scheduling Morning'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.emma_has_napped
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_wakeup_override
|
||||
@@ -696,11 +702,6 @@ script:
|
||||
entity_id: input_datetime.emma_wakeup
|
||||
data:
|
||||
time: "{{ states('input_datetime.master_bedroom_wakeup') }}"
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.naptime_climate_mode_emma_aircon
|
||||
data:
|
||||
option: "{{ states('input_select.scheduled_climate_mode_emma_aircon') }}"
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.emma_scheduling_morning_ran
|
||||
@@ -718,15 +719,9 @@ script:
|
||||
data:
|
||||
time: >
|
||||
{% set awake = state_attr('input_datetime.emma_awake_at','timestamp') | int %}
|
||||
{% set up_from_nap = state_attr('input_datetime.emma_up_from_nap','timestamp') | int %}
|
||||
{% set hours = states('input_number.emma_bedtime_hours') | int %}
|
||||
{% set math = (hours * 60) * 60 %}
|
||||
{% set math_nap = 14400 %}
|
||||
{% if is_state('input_boolean.emma_has_napped','on') %}
|
||||
{{ (up_from_nap + math_nap) | timestamp_custom('%H:%M') }}
|
||||
{% else %}
|
||||
{{ (awake + math) | timestamp_custom('%H:%M',false) }}
|
||||
{% endif %}
|
||||
{{ (awake + math) | timestamp_custom('%H:%M',false) }}
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_bedroom_climate_override
|
||||
@@ -734,7 +729,7 @@ script:
|
||||
then:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
||||
data:
|
||||
option: >
|
||||
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
|
||||
@@ -778,16 +773,16 @@ script:
|
||||
{% if ct > state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif ct > state_attr('input_datetime.tina_workday_start','timestamp') and ct < state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < (state_attr('input_datetime.kallen_school_day_start','timestamp')) %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{% else %}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% else %}
|
||||
11:00
|
||||
{% endif %}
|
||||
|
||||
@@ -288,6 +288,17 @@ automation:
|
||||
target:
|
||||
entity_id: input_boolean.school_today_ran
|
||||
|
||||
- id: 59ae3bfe-5c58-4ff4-aaf5-7b76fd0ac442
|
||||
alias: Start of School Year
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.school_start_days2go') | int == 1 }}"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.school_in_session
|
||||
|
||||
- id: 05ee0f8d-5411-4486-8acf-9bfadad2b23a
|
||||
alias: End of School Year
|
||||
initial_state: true
|
||||
|
||||
@@ -3,6 +3,53 @@ input_boolean:
|
||||
name: Sports Updates
|
||||
icon: mdi:strategy
|
||||
|
||||
input_datetime:
|
||||
michigan_wolverines_start:
|
||||
name: Michigan Wolverines Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:football
|
||||
ohio_state_buckeyes_start:
|
||||
name: Ohio State Buckeyes Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:football
|
||||
toledo_rockets_start:
|
||||
name: Toledo Rockets Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:football
|
||||
minnesota_vikings_start:
|
||||
name: Minnesota Vikings Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:football
|
||||
san_francisco_49ers_start:
|
||||
name: San Francisco 49ers Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:football
|
||||
minnesota_twins_start:
|
||||
name: Minnesota Twins Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:baseball
|
||||
cleveland_guardians_start:
|
||||
name: Cleveland Guardians Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:baseball
|
||||
los_angeles_dodgers_start:
|
||||
name: Los Angeles Dodgers Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:baseball
|
||||
minnesota_wild_start:
|
||||
name: Minnesota Wild Start
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:hockey-puck
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Michigan Wolverines Inhibit
|
||||
|
||||
@@ -88,23 +88,15 @@ template:
|
||||
- name: Tony Desktop Idle
|
||||
unique_id: f0ace986-a874-4fb0-ad29-8f3ebf95d8cc
|
||||
state: "{{ (states('sensor.tony_asus_system_idle_time') | int) > (states('input_number.basement_computers_idle_time') | int * 60) }}"
|
||||
attributes:
|
||||
idle_time: "{{ states('sensor.tony_asus_system_idle_time') | int }}s"
|
||||
- name: Tina Desktop Idle
|
||||
unique_id: 1933c638-c94b-468e-bb7a-c1c5b36c3651
|
||||
state: "{{ (states('sensor.xia_desktop_system_idle_time') | int) > (states('input_number.first_floor_computers_idle_time') | int * 60) }}"
|
||||
attributes:
|
||||
idle_time: "{{ states('sensor.xia_desktop_system_idle_time') | int }}s"
|
||||
- name: Kallen Desktop Idle
|
||||
unique_id: 680c6ae3-2ed2-451e-858b-2aee688af461
|
||||
state: "{{ (states('sensor.kallen_desktop_system_idle_time') | int) > (states('input_number.basement_computers_idle_time') | int * 60) }}"
|
||||
attributes:
|
||||
idle_time: "{{ states('sensor.kallen_desktop_system_idle_time') | int }}s"
|
||||
- name: Asus Laptop Idle
|
||||
unique_id: 7d8eb80a-0a2e-48a9-84b3-33175304dd95
|
||||
state: "{{ states('sensor.asus_laptop_system_idle_time') | int > 1800 }}"
|
||||
attributes:
|
||||
idle_time: "{{ states('sensor.asus_laptop_system_idle_time') }}s"
|
||||
- sensor:
|
||||
- name: "Min Ping"
|
||||
unique_id: ddcb9f6f-7c94-41fe-9453-2a2205b078e0
|
||||
|
||||
+8
-164
@@ -7,9 +7,15 @@ input_boolean:
|
||||
work_today_extended:
|
||||
name: Work Today Extended
|
||||
icon: mdi:briefcase-plus
|
||||
tina_morning_meds_reminder:
|
||||
name: Tina Morning Meds Reminder
|
||||
icon: mdi:medication
|
||||
tina_morning_meds_taken:
|
||||
name: Tina Morning Meds Taken
|
||||
icon: mdi:medication
|
||||
tina_night_meds_reminder:
|
||||
name: Tina Night Meds Reminder
|
||||
icon: mdi:medication
|
||||
tina_night_meds_taken:
|
||||
name: Tina Night Meds Taken
|
||||
icon: mdi:medication
|
||||
@@ -35,7 +41,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tina_morning_meds_notify:
|
||||
name: Tina Morning Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tina_night_meds_taken:
|
||||
@@ -45,7 +51,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tina_night_meds_notify:
|
||||
name: Tina Night Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
|
||||
@@ -191,165 +197,3 @@ script:
|
||||
- service: script.master_bedroom_scheduling_evening
|
||||
- service: script.emma_bedroom_scheduling_evening
|
||||
- service: script.security_scheduling
|
||||
|
||||
tina_morning_meds:
|
||||
alias: 'Tina Morning Meds'
|
||||
icon: mdi:medication
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: Morning Meds
|
||||
message: You need to take your morning meds
|
||||
tag: tina-morning-meds
|
||||
actions:
|
||||
- action: "TINA_MORNING_MEDS_TAKEN"
|
||||
title: Taken
|
||||
- action: "TINA_MORNING_MEDS_SKIPPED"
|
||||
title: Skip
|
||||
- action: "TINA_MORNING_MEDS_ASK_LATER"
|
||||
title: Ask Later
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_TAKEN"
|
||||
id: taken
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_SKIPPED"
|
||||
id: skipped
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_MORNING_MEDS_ASK_LATER"
|
||||
id: ask-later
|
||||
- platform: state
|
||||
entity_id: person.christina_stork
|
||||
from: 'home'
|
||||
id: left
|
||||
- platform: state
|
||||
entity_id: input_boolean.tina_morning_meds_taken
|
||||
to: 'on'
|
||||
id: manual
|
||||
timeout: "00:30:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger.id in ['taken','manual'] }}"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.tina_morning_meds_taken
|
||||
- conditions: "{{ wait.trigger.id == 'ask-later' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,30) }}
|
||||
- conditions: "{{ wait.trigger.id == 'left' }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: HEY DUMBASS
|
||||
message: YOU FORGOT TO TAKE YOUR MORNING MEDS!!!!!
|
||||
- conditions: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,1) }}
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: tina
|
||||
message: clear_notification
|
||||
tag: tina-morning-meds
|
||||
|
||||
tina_night_meds:
|
||||
alias: 'Tina Night Meds'
|
||||
icon: mdi:medication
|
||||
mode: restart
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: tina
|
||||
type: alert
|
||||
title: Night Meds
|
||||
message: You need to take your night meds
|
||||
tag: tina-night-meds
|
||||
actions:
|
||||
- action: "TINA_NIGHT_MEDS_TAKEN"
|
||||
title: Taken
|
||||
- action: "TINA_NIGHT_MEDS_SKIPPED"
|
||||
title: Skip
|
||||
- action: "TINA_NIGHT_MEDS_ASK_LATER"
|
||||
title: Ask Later
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_TAKEN"
|
||||
id: taken
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_SKIPPED"
|
||||
id: skipped
|
||||
- platform: event
|
||||
event_type: ios.notification_action_fired
|
||||
event_data:
|
||||
actionName: "TINA_NIGHT_MEDS_ASK_LATER"
|
||||
id: ask-later
|
||||
- platform: state
|
||||
entity_id: input_boolean.tina_night_meds_taken
|
||||
to: 'on'
|
||||
id: manual
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.master_bedroom_sleeping
|
||||
- input_boolean.goodnight
|
||||
to: 'on'
|
||||
id: sleeping
|
||||
timeout: "00:30:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger.id in ['taken','manual'] }}"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.tina_night_meds_taken
|
||||
- conditions: "{{ wait.trigger.id == 'ask-later' }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_night_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,30) }}
|
||||
- conditions: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_night_meds_notify
|
||||
data:
|
||||
datetime: >
|
||||
{% from 'time.jinja' import set_datetime %}
|
||||
{{ set_datetime(0,1) }}
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: tina
|
||||
message: clear_notification
|
||||
tag: tina-night-meds
|
||||
+47
-8
@@ -4,12 +4,21 @@ input_boolean:
|
||||
tony_streaming_today:
|
||||
name: Tony Streaming Today
|
||||
icon: mdi:twitch
|
||||
tony_morning_meds_reminder:
|
||||
name: Tony Morning Meds Reminder
|
||||
icon: mdi:medication
|
||||
tony_morning_meds_taken:
|
||||
name: Tony Morning Meds Taken
|
||||
icon: mdi:medication
|
||||
tony_afternoon_meds_reminder:
|
||||
name: Tony Afternoon Meds Reminder
|
||||
icon: mdi:medication
|
||||
tony_afternoon_meds_taken:
|
||||
name: Tony Afternoon Meds Taken
|
||||
icon: mdi:medication
|
||||
tony_night_meds_reminder:
|
||||
name: Tony Night Meds Reminder
|
||||
icon: mdi:medication
|
||||
tony_night_meds_taken:
|
||||
name: Tony Night Meds Taken
|
||||
icon: mdi:medication
|
||||
@@ -64,17 +73,17 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tony_morning_meds_notify:
|
||||
name: Tony Morning Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_afternoon_meds_notify:
|
||||
name: Tony Afternoon Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_night_meds_notify:
|
||||
name: Tony Night Meds Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_custom_meds_taken_p1:
|
||||
@@ -84,7 +93,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tony_custom_meds_notify_p1:
|
||||
name: Tony Custom Meds Notify P1
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_custom_meds_taken_p2:
|
||||
@@ -94,7 +103,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tony_custom_meds_notify_p2:
|
||||
name: Tony Custom Meds Notify P2
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_ibuprofen_taken:
|
||||
@@ -104,7 +113,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tony_ibuprofen_notify:
|
||||
name: Tony Ibuprofen Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
tony_tylenol_taken:
|
||||
@@ -114,7 +123,7 @@ input_datetime:
|
||||
icon: mdi:medication
|
||||
tony_tylenol_notify:
|
||||
name: Tony Tylenol Notify
|
||||
has_date: false
|
||||
has_date: true
|
||||
has_time: true
|
||||
icon: mdi:medication
|
||||
|
||||
@@ -178,4 +187,34 @@ sensor:
|
||||
json_attributes:
|
||||
- project
|
||||
- items
|
||||
scan_interval: 30
|
||||
scan_interval: 30
|
||||
|
||||
# template:
|
||||
# - binary_sensor:
|
||||
# - name: Tony Morning Meds Needed
|
||||
# unique_id: 32f2f158-8c59-486e-bf85-f14909375ff7
|
||||
# state: >
|
||||
# {% set ct = as_timestamp(now()) %}
|
||||
# {% set notify = state_attr('input_datetime.tony_morning_meds_notify','timestamp') %}
|
||||
# {{ (ct >= notify) and is_state('input_boolean.tony_morning_meds_taken','off') }}
|
||||
# attributes:
|
||||
# reminder_time: "{{ states('input_datetime.tony_morning_meds_notify') }}"
|
||||
# icon: mdi:medication
|
||||
# - name: Tony Afternoon Meds Needed
|
||||
# unique_id: 363b5ea0-3ad7-4e98-b0b0-5ff67bbef2f4
|
||||
# state: >
|
||||
# {% set ct = as_timestamp(now()) %}
|
||||
# {% set notify = state_attr('input_datetime.tony_afternoon_meds_notify','timestamp') %}
|
||||
# {{ (ct >= notify) and is_state('input_boolean.tony_afternoon_meds_taken','off') }}
|
||||
# attributes:
|
||||
# reminder_time: "{{ states('input_datetime.tony_afternoon_meds_notify') }}"
|
||||
# icon: mdi:medication
|
||||
# - name: Tony Night Meds Needed
|
||||
# unique_id: b927b5a4-27a7-42aa-af4e-fa37a7036d25
|
||||
# state: >
|
||||
# {% set ct = as_timestamp(now()) %}
|
||||
# {% set notify = state_attr('input_datetime.tony_night_meds_notify','timestamp') %}
|
||||
# {{ (ct >= notify) and is_state('input_boolean.tony_night_meds_taken','off') }}
|
||||
# attributes:
|
||||
# reminder_time: "{{ states('input_datetime.tony_night_meds_notify') }}"
|
||||
# icon: mdi:medication
|
||||
|
||||
+562
-768
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
{% from 'speech.jinja' import greeting, today_is, sun_status %}
|
||||
{% from 'weather.jinja' import weatherReport %}
|
||||
{% from 'sports.jinja' import sports_updates %}
|
||||
{% from 'server.jinja' import services_down %}
|
||||
<p>
|
||||
{{ greeting('date') }}
|
||||
</p>
|
||||
@@ -22,10 +23,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are {{ states('sensor.services_down') }} services currently offline.
|
||||
{% if states('sensor.services_down') | int > 0 %}
|
||||
They are {{ state_attr('sensor.services_down','services') }}.
|
||||
{% endif %}
|
||||
{{ services_down() }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{%- macro getReport() -%}
|
||||
{% from 'speech.jinja' import greeting, dadjoke, inspirational_quote, today_is %}
|
||||
{% from 'status.jinja' import tony_status_report, tina_status_report, kallen_status_report, emma_status_report %}
|
||||
{% from 'status.jinja' import tony_status_report, tina_status_report, kallen_status_report, emma_status_report, morning_annc %}
|
||||
{% from 'easy_time.jinja' import count_the_days %}
|
||||
{% from 'weather.jinja' import weatherReport %}
|
||||
{% from 'sports.jinja' import sports_updates %}
|
||||
@@ -14,6 +14,10 @@
|
||||
{{ today_is() }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ morning_annc('full','tts') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ weatherReport('full','tts','morning') }}
|
||||
</p>
|
||||
|
||||
@@ -61,20 +61,20 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if is_state('input_boolean.kallen_overnight','off') %}
|
||||
{% if not is_state('input_select.scheduled_climate_mode_kallen_fan','N/A') %}
|
||||
{% if is_state('input_select.scheduled_climate_mode_kallen_fan','Fan') and is_state('fan.kallen_bedroom_fan','off') %}
|
||||
{% if not is_state('input_select.scheduled_climate_mode_kallen_bedroom','N/A') %}
|
||||
{% if is_state('input_select.scheduled_climate_mode_kallen_bedroom','Fan') and is_state('fan.kallen_bedroom_fan','off') %}
|
||||
"Collin's fan will activate at {{ input_datetime_read('input_datetime.kallen_fan') }}. "
|
||||
{% elif is_state('input_select.scheduled_climate_mode_kallen_fan','White Noise') and is_state('input_boolean.white_noise_kallen_bedroom','off') %}
|
||||
{% elif is_state('input_select.scheduled_climate_mode_kallen_bedroom','White Noise') and is_state('input_boolean.white_noise_kallen_bedroom','off') %}
|
||||
"Collin's white noise generator will activate at {{ input_datetime_read('input_datetime.kallen_bedtime') }}. "
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
"Collin's room will be left alone, as he is spending the night elsewhere tonight. "
|
||||
{% endif %}
|
||||
{% if states('input_select.scheduled_climate_mode_emma_aircon') != 'N/A' %}
|
||||
{% if is_state('input_select.scheduled_climate_mode_emma_aircon','AC') and is_state('fan.emma_air_conditioner','off') %}
|
||||
{% if states('input_select.scheduled_climate_mode_emma_bedroom') != 'N/A' %}
|
||||
{% if is_state('input_select.scheduled_climate_mode_emma_bedroom','AC') and is_state('fan.emma_air_conditioner','off') %}
|
||||
"Emma's air conditioner will be activated at {{ input_datetime_read('input_datetime.emma_bedroom_cooling') }}. "
|
||||
{% elif is_state('input_select.scheduled_climate_mode_emma_aircon','White Noise') and is_state('input_boolean.white_noise_emma_bedroom','off') %}
|
||||
{% elif is_state('input_select.scheduled_climate_mode_emma_bedroom','White Noise') and is_state('input_boolean.white_noise_emma_bedroom','off') %}
|
||||
"Emma's white noise generator will activate at {{ input_datetime_read('input_datetime.emma_bedtime') }}. "
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user