Compare commits
108 Commits
37f5314e88
...
2025.4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
364c81e8b1
|
|||
|
0d42142a07
|
|||
|
7d6d72c6ef
|
|||
|
41228c1304
|
|||
|
b4f4d06d6c
|
|||
|
002919483f
|
|||
|
ef548c2df1
|
|||
|
1d60a4df32
|
|||
|
57c27d4e48
|
|||
|
c06bd894ae
|
|||
|
1b3cf79f25
|
|||
|
7cf9c13e38
|
|||
|
e8c6cd8deb
|
|||
|
df92fc4df6
|
|||
|
a936b22bb9
|
|||
|
9aa918d335
|
|||
|
c7d6297934
|
|||
|
ce29e80330
|
|||
|
10deee4f04
|
|||
|
6fa762a113
|
|||
|
7b529895e5
|
|||
|
bdb278dd28
|
|||
|
000efa7562
|
|||
|
b6911a0f59
|
|||
|
d49563435d
|
|||
|
1a89d088f6
|
|||
|
ee6499bec8
|
|||
|
148f78aecd
|
|||
|
49f9e99439
|
|||
|
6254fb5953
|
|||
|
334b7963e8
|
|||
|
4466b17df1
|
|||
|
f96056edda
|
|||
|
652b4e7dff
|
|||
|
26bcf136e6
|
|||
|
9e90998a21
|
|||
|
30c8307272
|
|||
|
e6b0db142e
|
|||
|
b5dd9621d1
|
|||
|
587ac4d203
|
|||
|
b459d78446
|
|||
|
352e4f1ada
|
|||
|
09d82abdb1
|
|||
|
8b120ae347
|
|||
|
da03ea826b
|
|||
|
66fc0fb906
|
|||
|
4c81a8a6a5
|
|||
|
35a511710e
|
|||
|
4c7bf9a85c
|
|||
|
754e3d6095
|
|||
|
8f707c71bb
|
|||
|
08b5c7b764
|
|||
|
fd37fe589c
|
|||
|
36906d6207
|
|||
|
29dcb654b4
|
|||
|
ec0aed386a
|
|||
|
a96bc99271
|
|||
|
a085e71c86
|
|||
|
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
|
@@ -0,0 +1 @@
|
|||||||
|
2025.4.2
|
||||||
+5
-15
@@ -3,30 +3,27 @@
|
|||||||
/.cloud
|
/.cloud
|
||||||
/.google.token
|
/.google.token
|
||||||
/.ssh
|
/.ssh
|
||||||
|
/.codegpt
|
||||||
|
|
||||||
# ignore some directories.
|
# ignore some directories.
|
||||||
/icloud/
|
/www/*
|
||||||
/www/
|
|
||||||
/tts/
|
/tts/
|
||||||
/deps/
|
/deps/
|
||||||
/hadashboards/
|
|
||||||
/intents/
|
/intents/
|
||||||
/themes/
|
/themes/
|
||||||
/custom_components
|
/custom_components
|
||||||
/deps
|
/deps
|
||||||
/hacs
|
/hacs
|
||||||
/image
|
/image
|
||||||
/node-red/
|
|
||||||
/files
|
/files
|
||||||
/appdaemon/*
|
/appdaemon/
|
||||||
/appdaemon/apps/*
|
|
||||||
/glances/
|
/glances/
|
||||||
/downloads/
|
/downloads/
|
||||||
|
/lightwand/
|
||||||
|
|
||||||
# ignore any of these files no matter where they are using double *
|
# ignore any of these files no matter where they are using double *
|
||||||
**.DS_Store
|
**.DS_Store
|
||||||
**._*
|
**._*
|
||||||
**.HA_VERSION
|
|
||||||
**.pyc
|
**.pyc
|
||||||
**.conf
|
**.conf
|
||||||
**.uuid
|
**.uuid
|
||||||
@@ -71,11 +68,4 @@
|
|||||||
**test.jinja
|
**test.jinja
|
||||||
|
|
||||||
# exceptions
|
# exceptions
|
||||||
!/appdaemon/apps/
|
!/www/bubble/
|
||||||
!/appdaemon/apps/apps.yaml
|
|
||||||
!/node-red/projects/
|
|
||||||
!/node-red/projects/NerdFlows/
|
|
||||||
!/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
|
|
||||||
+1425
-545
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*
|
- binary_sensor.kallen_desktop*
|
||||||
- sensor.asus_laptop*
|
- sensor.asus_laptop*
|
||||||
- binary_sensor.asus_laptop*
|
- binary_sensor.asus_laptop*
|
||||||
|
- sensor.*ashland*
|
||||||
|
- sensor.*kasx*
|
||||||
entities:
|
entities:
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- media_player.basement_tv
|
- media_player.basement_tv
|
||||||
@@ -280,6 +282,7 @@ influxdb:
|
|||||||
- binary_sensor.internet
|
- binary_sensor.internet
|
||||||
- binary_sensor.people_present
|
- binary_sensor.people_present
|
||||||
- weather.iron_nerd_weather_station
|
- weather.iron_nerd_weather_station
|
||||||
|
- weather.ashland_weather_station
|
||||||
- sensor.circle_k
|
- sensor.circle_k
|
||||||
- sensor.kroger
|
- sensor.kroger
|
||||||
- sensor.kecks
|
- sensor.kecks
|
||||||
@@ -318,6 +321,9 @@ influxdb:
|
|||||||
- sensor.dimmest_room
|
- sensor.dimmest_room
|
||||||
- sensor.warmest_room_temperature
|
- sensor.warmest_room_temperature
|
||||||
- sensor.coldest_room_temperature
|
- sensor.coldest_room_temperature
|
||||||
|
- sensor.national_tornado_warnings
|
||||||
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
|
||||||
logbook:
|
logbook:
|
||||||
include:
|
include:
|
||||||
@@ -434,6 +440,8 @@ prometheus:
|
|||||||
- binary_sensor.kallen_desktop*
|
- binary_sensor.kallen_desktop*
|
||||||
- sensor.asus_laptop*
|
- sensor.asus_laptop*
|
||||||
- binary_sensor.asus_laptop*
|
- binary_sensor.asus_laptop*
|
||||||
|
- sensor.*ashland*
|
||||||
|
- sensor.*kasx*
|
||||||
include_entities:
|
include_entities:
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- media_player.basement_tv
|
- media_player.basement_tv
|
||||||
@@ -454,6 +462,7 @@ prometheus:
|
|||||||
- binary_sensor.internet
|
- binary_sensor.internet
|
||||||
- binary_sensor.people_present
|
- binary_sensor.people_present
|
||||||
- weather.iron_nerd_weather_station
|
- weather.iron_nerd_weather_station
|
||||||
|
- weather.ashland_weather_station
|
||||||
- sensor.circle_k
|
- sensor.circle_k
|
||||||
- sensor.kroger
|
- sensor.kroger
|
||||||
- sensor.kecks
|
- sensor.kecks
|
||||||
@@ -492,3 +501,6 @@ prometheus:
|
|||||||
- sensor.dimmest_room
|
- sensor.dimmest_room
|
||||||
- sensor.warmest_room_temperature
|
- sensor.warmest_room_temperature
|
||||||
- sensor.coldest_room_temperature
|
- sensor.coldest_room_temperature
|
||||||
|
- sensor.national_tornado_warnings
|
||||||
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
|||||||
@@ -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 %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro kallenSleepMsg() %}
|
{% 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' %}
|
{% if schedMode == 'White Noise' %}
|
||||||
{{ [
|
{{ [
|
||||||
"No fan in Collin's room tonight. Too cold outside. Brr. Enjoy your white noise.",
|
"No fan in Collin's room tonight. Too cold outside. Brr. Enjoy your white noise.",
|
||||||
|
|||||||
@@ -12,21 +12,62 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro period_str(team) %}
|
||||||
|
{% if state_attr(team,'league') in ['NFL','NCAAF'] %}
|
||||||
|
quarter
|
||||||
|
{% elif state_attr(team,'league') == 'MLB' %}
|
||||||
|
inning
|
||||||
|
{% else %}
|
||||||
|
period
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro sports_clock(team) %}
|
||||||
|
{% macro data() %}
|
||||||
|
{% set period_str = period_str(team) %}
|
||||||
|
{% set game_clock = state_attr(team,'clock') | lower %}
|
||||||
|
{% if state_attr(team,'league') == 'MLB' %}
|
||||||
|
{% set inning_parts = game_clock.split(' ') %}
|
||||||
|
in the {{ inning_parts[0] ~ ' of the ' ~ inning_parts[1] ~ ' ' ~ period_str }}
|
||||||
|
{% else %}
|
||||||
|
{% if ' - ' in game_clock %}
|
||||||
|
{% set clock_time, quarter = game_clock.split(' - ') %}
|
||||||
|
with {{ clock_time ~ ' remaining in the ' ~ quarter ~ ' ' ~ period_str }}
|
||||||
|
{% else %}
|
||||||
|
with {{ game_clock ~ ' remaining in the ' ~ period_str }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
{{ cleanup(data()) }}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro sports_pregame(team) %}
|
{% macro sports_pregame(team) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
|
{% if state_attr(team,'opponent_name') %}
|
||||||
|
{% set opponent_name = state_attr(team, 'opponent_name') %}
|
||||||
|
{% if opponent_name.endswith(' St') %}
|
||||||
|
{% set opponent_name = opponent_name | replace(' St', ' State') %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if is_state(team,'PRE') %}
|
{% if is_state(team,'PRE') %}
|
||||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||||
{% if date == now().strftime('%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 %} {{ opponent_name }} at {{ state_attr(team,'venue') }}.
|
||||||
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro%}
|
{% endmacro %}
|
||||||
{{ cleanup(data()) }}
|
{{ cleanup(data()) }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro sports_main(team) %}
|
{% macro sports_main(team) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
|
{% if state_attr(team,'opponent_name') %}
|
||||||
|
{% set opponent_name = state_attr(team, 'opponent_name') %}
|
||||||
|
{% if opponent_name.endswith(' St') %}
|
||||||
|
{% set opponent_name = opponent_name | replace(' St', ' State') %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if is_state(team,'POST') %}
|
{% if is_state(team,'POST') %}
|
||||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||||
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
||||||
@@ -34,11 +75,11 @@
|
|||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% 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.
|
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 %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
@@ -47,11 +88,11 @@
|
|||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% 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.
|
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 %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% 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 %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
@@ -59,11 +100,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state(team,'IN') %}
|
{% elif is_state(team,'IN') %}
|
||||||
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
{% 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 %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
{% 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 %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% else %}
|
{% 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 %} {{ opponent_name }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }} {{ sports_clock(team) }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
@@ -71,7 +112,9 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro sports_inhibit(team) %}
|
{% 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
|
{{ 'months' in state_attr(team,'kickoff_in') or
|
||||||
'month' in state_attr(team,'kickoff_in') or
|
'month' in state_attr(team,'kickoff_in') or
|
||||||
'weeks' in state_attr(team,'kickoff_in') }}
|
'weeks' in state_attr(team,'kickoff_in') }}
|
||||||
@@ -152,4 +195,6 @@
|
|||||||
{{ cleanup(data()) }}
|
{{ cleanup(data()) }}
|
||||||
{% endmacro %}
|
{% 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 houseEveningRan = is_state('input_boolean.house_scheduling_evening_ran','on') %}
|
||||||
{% set masterBedroomEveningRan = is_state('input_boolean.master_bedroom_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 emmaEveningRan = is_state('input_boolean.emma_scheduling_evening_ran','on') %}
|
||||||
|
{% set kallenMorningAnnc = is_state('input_boolean.kallen_morning_announcements','on') %}
|
||||||
{% set kallenText = 'Kallen' %}
|
{% set kallenText = 'Kallen' %}
|
||||||
{% set kallenTTS = 'Collin' %}
|
{% 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 laundry_report(type,method) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
{% set washerTimer = states('timer.washer_timer') %}
|
{% set washerTimer = states('timer.washer_timer') %}
|
||||||
@@ -461,12 +473,11 @@
|
|||||||
Collin has Beyond The Bells today after school.
|
Collin has Beyond The Bells today after school.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
||||||
{{ states('input_text.kallen_pickup') }} will be picking Collin up from school today.
|
{{ states('input_text.kallen_pickup') }} will be picking Collin up from school today.
|
||||||
{% else %}
|
|
||||||
Pickup today will be at {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
|
||||||
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
And It is early release!
|
Today is an early release day!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Pickup today will be at {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if states('sensor.windows_open') | int > 0 %}
|
{% if states('sensor.windows_open') | int > 0 %}
|
||||||
'I detect that there are windows open. Make sure you close them before you leave, or else the security system will not arm. '
|
'I detect that there are windows open. Make sure you close them before you leave, or else the security system will not arm. '
|
||||||
@@ -532,10 +543,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
||||||
{{ states('input_text.kallen_pickup') }} will be picking him up from school today.
|
{{ states('input_text.kallen_pickup') }} will be picking him up from school today.
|
||||||
{% elif is_state('input_boolean.kallen_school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
The school is on an early release schedule, pickup is at {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
The school is on an early release schedule, pickup is at {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
||||||
{% else %}
|
{% else %}
|
||||||
His pickup time is {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
His pickup time is {{ input_datetime_read('input_datetime.kallen_school_day_end') | trim }}.
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ identKallen }} has school at {{ input_datetime_read('input_datetime.kallen_school_day_start') | trim }} today.
|
{{ identKallen }} has school at {{ input_datetime_read('input_datetime.kallen_school_day_start') | trim }} today.
|
||||||
@@ -591,38 +603,20 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro emma_sleep(type,method) %}
|
{% macro emma_sleep(type,method) %}
|
||||||
{% set asleep = state_attr('input_datetime.emma_down_for_nap','timestamp') | int %}
|
{% if is_state('input_boolean.emma_sleeping','on') %}
|
||||||
{% 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('binary_sensor.early_night_mode','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 }}.
|
Emma is asleep for the night. She went to bed at {{ input_datetime_read('input_datetime.emma_asleep_at') | trim }}.
|
||||||
{% else %}
|
{% 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 }}.
|
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 %}
|
{% endif %}
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro emma_sleep_notification(type,method) %}
|
{% macro emma_sleep_notification(type,method) %}
|
||||||
{% set asleep = state_attr('input_datetime.emma_down_for_nap','timestamp') | int %}
|
{% if is_state('input_boolean.emma_sleeping','off') %}
|
||||||
{% 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)) %}
|
|
||||||
Emma has awoken for the day at {{ clock('12-hr') }}
|
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') %}
|
{% 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') }}
|
Emma is asleep for the night (or at least, her sleep switch is active) at {{ clock('12-hr') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -68,6 +68,31 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% 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) %}
|
{% macro set_datetime(hours,minutes,seconds) %}
|
||||||
{% if seconds is defined %}
|
{% if seconds is defined %}
|
||||||
{{ (as_timestamp(now()) + (((hours * 60) * 60) + (minutes * 60)) + seconds) | int | timestamp_custom('%Y-%m-%d %H:%M:%S') }}
|
{{ (as_timestamp(now()) + (((hours * 60) * 60) + (minutes * 60)) + seconds) | int | timestamp_custom('%Y-%m-%d %H:%M:%S') }}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
{% macro weatherInfo(type,method,time) %}
|
{% macro weatherInfo(type,method,time) %}
|
||||||
{% set time = time|default('day') %}
|
{% set time = time|default('day') %}
|
||||||
{% if method == 'text' %}
|
{% if method in ['text','dashboard'] %}
|
||||||
{% if type in ['current','full'] %}
|
{% if type in ['current','full'] %}
|
||||||
The current weather is {{ states('weather.iron_nerd_weather_station') | lower }}. It is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees outside and feels like {{ states('sensor.stratton_ave_apparent_temperature') | round }} degrees.
|
The current weather is {{ states('weather.iron_nerd_weather_station') | lower }}. It is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees outside and feels like {{ states('sensor.home_temperature_feels_like') | round }} degrees.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if type in ['forecast','full'] %}
|
{% if type in ['forecast','full'] %}
|
||||||
{% if 14400 <= ct <= 61200 %}
|
{% if 14400 <= ct <= 61200 %}
|
||||||
@@ -19,15 +19,28 @@
|
|||||||
{% if type in ['alerts','full'] %}
|
{% if type in ['alerts','full'] %}
|
||||||
{% if is_state('input_boolean.tornado_alarm','on') %}
|
{% if is_state('input_boolean.tornado_alarm','on') %}
|
||||||
We are under a tornado warning. If you are not already in shelter, you should be. Get on it!
|
We are under a tornado warning. If you are not already in shelter, you should be. Get on it!
|
||||||
{% elif states('sensor.weatheralerts_active_alerts') > '0' %}
|
{% if state_attr('binary_sensor.tornado_warning','confirmed' == true) %}
|
||||||
|
A tornado has been confirmed in the area. Please take shelter immediately!
|
||||||
|
{% endif %}
|
||||||
|
{% elif is_state('binary_sensor.severe_thunderstorm_warning','on') %}
|
||||||
|
We are under a severe thunderstorm warning.
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible' == true) %}
|
||||||
|
The incoming storm has the potential to produce a tornado, so please pay attention and prepare to take shelter!
|
||||||
|
{% endif %}
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive' == true) %}
|
||||||
|
This storm has the potential to cause considerable damage. Please take shelter and stay safe!
|
||||||
|
{% endif %}
|
||||||
|
{% elif states('sensor.weatheralerts_active_alerts') > '0' and method != 'dashboard' %}
|
||||||
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('binary_sensor.lightning_warning','on') %}
|
{% if method != 'dashboard' %}
|
||||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
{% if is_state('binary_sensor.lightning_warning','on') %}
|
||||||
There is lightning in the area. Nearest strike is {{ ltgdist }} miles away.
|
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||||
{% endif %}
|
There is lightning in the area. Nearest strike is {{ ltgdist }} miles away.
|
||||||
{% if is_state('binary_sensor.raining','on') %}
|
{% endif %}
|
||||||
It is currently raining. Make sure all doors and windows are closed!
|
{% if is_state('binary_sensor.raining','on') %}
|
||||||
|
It is currently raining. Make sure all doors and windows are closed!
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr('weather.iron_nerd_weather_station','visibility') | int < 3 %}
|
{% if state_attr('weather.iron_nerd_weather_station','visibility') | int < 3 %}
|
||||||
Caution: Current outdoor visibility is {{ state_attr('weather.iron_nerd_weather_station','visibility') }} miles.
|
Caution: Current outdoor visibility is {{ state_attr('weather.iron_nerd_weather_station','visibility') }} miles.
|
||||||
@@ -47,6 +60,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.tornado_alarm','on') %}
|
{% if is_state('input_boolean.tornado_alarm','on') %}
|
||||||
"We are under a tornado warning. If you are not already in shelter, you should be. Get on it! "
|
"We are under a tornado warning. If you are not already in shelter, you should be. Get on it! "
|
||||||
|
{% if state_attr('binary_sensor.tornado_warning','confirmed' == true) %}
|
||||||
|
"A tornado has been confirmed in the area. Please take shelter immediately! "
|
||||||
|
{% endif %}
|
||||||
|
{% elif is_state('binary_sensor.severe_thunderstorm_warning','on') %}
|
||||||
|
"We are under a severe thunderstorm warning. "
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible' == true) %}
|
||||||
|
"The incoming storm has the potential to produce a tornado, so please pay attention and prepare to take shelter! "
|
||||||
|
{% endif %}
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive' == true) %}
|
||||||
|
"This storm has the potential to cause considerable damage. Please take shelter and stay safe! "
|
||||||
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.tornado_watch','on') %}
|
{% elif is_state('input_boolean.tornado_watch','on') %}
|
||||||
{{ [
|
{{ [
|
||||||
"There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ",
|
"There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ",
|
||||||
@@ -101,7 +125,11 @@
|
|||||||
|
|
||||||
{% macro weatherReport(type,method,time) %}
|
{% macro weatherReport(type,method,time) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
{{ weatherInfo(type,method,time) | replace('clear-night','clear') | replace('partlycloudy','partly cloudy') }}
|
{{ weatherInfo(type,method,time) |
|
||||||
|
replace('clear-night','clear') |
|
||||||
|
replace('partlycloudy','partly cloudy') |
|
||||||
|
replace('snowy-rainy','a mix of rain and snow') |
|
||||||
|
replace('lightning-rainy','stormy') }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{{ cleanup(data()) }}
|
{{ cleanup(data()) }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ report_type:
|
|||||||
options:
|
options:
|
||||||
- Bug Report
|
- Bug Report
|
||||||
- New Idea
|
- New Idea
|
||||||
|
- Adjustment
|
||||||
initial: Bug Report
|
initial: Bug Report
|
||||||
icon: mdi:bug
|
icon: mdi:bug
|
||||||
select_testing:
|
select_testing:
|
||||||
|
|||||||
@@ -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:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
labels:
|
labels:
|
||||||
|
- type/bug
|
||||||
- needs-response
|
- 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
|
name: Kallen Briefing Extras
|
||||||
icon: mdi:plus
|
icon: mdi:plus
|
||||||
max: 255
|
max: 255
|
||||||
|
kallen_morning_announcements:
|
||||||
|
name: Kallen Morning Announcements
|
||||||
|
icon: mdi:bullhorn
|
||||||
|
max: 255
|
||||||
|
|
||||||
input_boolean:
|
input_boolean:
|
||||||
briefing_extras:
|
briefing_extras:
|
||||||
@@ -69,6 +73,9 @@ input_boolean:
|
|||||||
kallen_briefing_extras:
|
kallen_briefing_extras:
|
||||||
name: Kallen Briefing Extras
|
name: Kallen Briefing Extras
|
||||||
icon: mdi:plus
|
icon: mdi:plus
|
||||||
|
kallen_morning_announcements:
|
||||||
|
name: Kallen Morning Announcements
|
||||||
|
icon: mdi:bullhorn
|
||||||
good_morning:
|
good_morning:
|
||||||
name: Good Morning Ran
|
name: Good Morning Ran
|
||||||
icon: mdi:home-analytics
|
icon: mdi:home-analytics
|
||||||
@@ -96,6 +103,15 @@ input_boolean:
|
|||||||
sun_reports:
|
sun_reports:
|
||||||
name: Sun Reports
|
name: Sun Reports
|
||||||
icon: mdi:weather-sunny-alert
|
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:
|
intent_script:
|
||||||
PlayAnnouncement:
|
PlayAnnouncement:
|
||||||
@@ -267,7 +283,6 @@ script:
|
|||||||
- light.living_room_color_1
|
- light.living_room_color_1
|
||||||
- light.living_room_color_2
|
- light.living_room_color_2
|
||||||
- light.living_room_color_3
|
- light.living_room_color_3
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.mud_room_overhead
|
- light.mud_room_overhead
|
||||||
@@ -304,7 +319,6 @@ script:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- light.living_room_lights
|
- light.living_room_lights
|
||||||
- light.tina_lamp
|
- light.tina_lamp
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.basement_studio_lights
|
- light.basement_studio_lights
|
||||||
data:
|
data:
|
||||||
color_name: >
|
color_name: >
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
input_boolean:
|
||||||
|
do_not_enter_basement_studio:
|
||||||
|
name: Do Not Enter - Basement Studio
|
||||||
|
icon: mdi:minus-circle
|
||||||
+134
-26
@@ -1,20 +1,24 @@
|
|||||||
template:
|
template:
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Emma Aircon - Compressor
|
- name: Emma Bedroom Aircon - Compressor
|
||||||
unique_id: 21bcbb62-823c-43ff-8c2c-26e940324ee6
|
unique_id: 21bcbb62-823c-43ff-8c2c-26e940324ee6
|
||||||
state: "{{ is_state('fan.emma_air_conditioner','on') and states('sensor.emma_air_conditioner_power') | int > 150 }}"
|
state: "{{ states('sensor.emma_bedroom_aircon_power') | int > 150 }}"
|
||||||
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Emma Aircon - Fan
|
- name: Emma Bedroom Aircon - Fan
|
||||||
unique_id: 9e3054cf-8f7e-4fef-9da4-5b2f2bc99c9d
|
unique_id: 9e3054cf-8f7e-4fef-9da4-5b2f2bc99c9d
|
||||||
state: "{{ is_state('fan.emma_air_conditioner','on') and states('sensor.emma_air_conditioner_power') | int > 20 }}"
|
state: "{{ states('sensor.emma_bedroom_aircon_power') | int > 20 }}"
|
||||||
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Master Bedroom Aircon - Compressor
|
- name: Master Bedroom Aircon - Compressor
|
||||||
unique_id: 87051957-1dbc-4d65-b138-e8469728f58f
|
unique_id: 87051957-1dbc-4d65-b138-e8469728f58f
|
||||||
state: "{{ states('climate.master_bedroom_aircon') not in ['off','unknown','unavailable'] and states('sensor.master_bedroom_aircon_power') | int > 150 }}"
|
state: "{{ states('sensor.master_bedroom_aircon_power') | int > 150 }}"
|
||||||
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Master Bedroom Aircon - Fan
|
- name: Master Bedroom Aircon - Fan
|
||||||
unique_id: ae893dd6-129c-4886-a966-a89b958d9f08
|
unique_id: ae893dd6-129c-4886-a966-a89b958d9f08
|
||||||
state: "{{ states('climate.master_bedroom_aircon') not in ['off','unknown','unavailable'] and states('sensor.master_bedroom_aircon_power') | int > 20 }}"
|
state: "{{ states('sensor.master_bedroom_aircon_power') | int > 20 }}"
|
||||||
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Kallen Fan - Separate Schedule
|
- name: Kallen Fan - Separate Schedule
|
||||||
unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08
|
unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08
|
||||||
@@ -114,9 +118,9 @@ template:
|
|||||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
- name: "Master Bedroom Eco Mode"
|
- name: "Master Bedroom Eco Mode"
|
||||||
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
||||||
state: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}"
|
state: "{{ is_state_attr('climate.master_bedroom_aircon','eco_mode',true) }}"
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
|
{% if is_state_attr('climate.master_bedroom_aircon','eco_mode',true) %}
|
||||||
mdi:home-lightning-bolt
|
mdi:home-lightning-bolt
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:home-lightning-bolt-outline
|
mdi:home-lightning-bolt-outline
|
||||||
@@ -138,6 +142,36 @@ template:
|
|||||||
mdi:fan-off
|
mdi:fan-off
|
||||||
{% endif %}
|
{% endif %}
|
||||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
|
- name: "Emma Bedroom Target Temp"
|
||||||
|
unique_id: b81152a1-d4d9-4e3e-8a78-6039de2884ad
|
||||||
|
state: "{{ state_attr('climate.emma_bedroom_aircon','temperature') | float }}"
|
||||||
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
|
- name: "Emma Bedroom Eco Mode"
|
||||||
|
unique_id: 4b6fc8fc-4152-4d8b-ad8d-80f97fcabe44
|
||||||
|
state: "{{ is_state_attr('climate.emma_bedroom_aircon','eco_mode',true) }}"
|
||||||
|
icon: >-
|
||||||
|
{% if is_state_attr('climate.emma_bedroom_aircon','eco_mode',true) %}
|
||||||
|
mdi:home-lightning-bolt
|
||||||
|
{% else %}
|
||||||
|
mdi:home-lightning-bolt-outline
|
||||||
|
{% endif %}
|
||||||
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
|
- name: "Emma Bedroom Aircon Fan Mode"
|
||||||
|
unique_id: d678eb2e-be5b-4626-913d-fc1e32941ead
|
||||||
|
state: "{{ state_attr('climate.emma_bedroom_aircon','fan_mode') }}"
|
||||||
|
icon: >
|
||||||
|
{% if is_state_attr('climate.emma_bedroom_aircon','fan_mode','Auto') %}
|
||||||
|
mdi:fan-auto
|
||||||
|
{% elif is_state_attr('climate.emma_bedroom_aircon','fan_mode','Low') %}
|
||||||
|
mdi:fan-speed-1
|
||||||
|
{% elif is_state_attr('climate.emma_bedroom_aircon','fan_mode','Medium') %}
|
||||||
|
mdi:fan-speed-2
|
||||||
|
{% elif is_state_attr('climate.emma_bedroom_aircon','fan_mode','High') %}
|
||||||
|
mdi:fan-speed-3
|
||||||
|
{% else %}
|
||||||
|
mdi:fan-off
|
||||||
|
{% endif %}
|
||||||
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
- name: Living Room Average Temperature
|
- name: Living Room Average Temperature
|
||||||
unique_id: c4a901a6-87e2-4257-b60b-2944be8fdf04
|
unique_id: c4a901a6-87e2-4257-b60b-2944be8fdf04
|
||||||
state: >
|
state: >
|
||||||
@@ -183,16 +217,17 @@ input_boolean:
|
|||||||
master_bedroom_climate_protocol:
|
master_bedroom_climate_protocol:
|
||||||
name: Master Bedroom Climate Protocol
|
name: Master Bedroom Climate Protocol
|
||||||
icon: mdi:lightbulb-night
|
icon: mdi:lightbulb-night
|
||||||
|
emma_bedroom_climate_protocol:
|
||||||
|
name: Emma Bedroom Climate Protocol
|
||||||
|
icon: mdi:lightbulb-night
|
||||||
kallen_bedtime_protocol:
|
kallen_bedtime_protocol:
|
||||||
name: Kallen Bedtime Protocol
|
name: Kallen Bedtime Protocol
|
||||||
icon: mdi:lightbulb-night
|
icon: mdi:lightbulb-night
|
||||||
|
|
||||||
# Turn on when master bedroom air conditioner is installed, turn off in winter when we take it out, for smarter automations
|
# Turn on when air conditioners are installed, turn off in winter when we take them out
|
||||||
master_bedroom_aircon_installed:
|
master_bedroom_aircon_installed:
|
||||||
name: Master Bedroom Aircon Installed
|
name: Master Bedroom Aircon Installed
|
||||||
icon: mdi:tools
|
icon: mdi:tools
|
||||||
|
|
||||||
# Same thing, but for Emma's bedroom air conditioner
|
|
||||||
emma_bedroom_aircon_installed:
|
emma_bedroom_aircon_installed:
|
||||||
name: Emma Bedroom Aircon Installed
|
name: Emma Bedroom Aircon Installed
|
||||||
icon: mdi:tools
|
icon: mdi:tools
|
||||||
@@ -201,6 +236,9 @@ input_boolean:
|
|||||||
master_bedroom_cooling_on:
|
master_bedroom_cooling_on:
|
||||||
name: Master Bedroom Cooling On
|
name: Master Bedroom Cooling On
|
||||||
icon: mdi:snowflake
|
icon: mdi:snowflake
|
||||||
|
emma_bedroom_cooling_on:
|
||||||
|
name: Emma Bedroom Cooling On
|
||||||
|
icon: mdi:snowflake
|
||||||
|
|
||||||
# Activated if the day will be excessively hot. For use with automations for daytime climate control.
|
# Activated if the day will be excessively hot. For use with automations for daytime climate control.
|
||||||
hot_day:
|
hot_day:
|
||||||
@@ -217,6 +255,14 @@ input_boolean:
|
|||||||
name: Cold Day
|
name: Cold Day
|
||||||
icon: mdi:snowflake
|
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:
|
input_select:
|
||||||
scheduled_climate_mode_master_bedroom_aircon:
|
scheduled_climate_mode_master_bedroom_aircon:
|
||||||
name: Scheduled Climate Mode - Master Bedroom Aircon
|
name: Scheduled Climate Mode - Master Bedroom Aircon
|
||||||
@@ -231,22 +277,17 @@ input_select:
|
|||||||
- Fan
|
- Fan
|
||||||
- N/A
|
- N/A
|
||||||
icon: mdi:home-thermometer
|
icon: mdi:home-thermometer
|
||||||
scheduled_climate_mode_emma_aircon:
|
scheduled_climate_mode_emma_bedroom:
|
||||||
name: Scheduled Climate Mode - Emma Aircon
|
name: Scheduled Climate Mode - Emma Bedroom
|
||||||
options:
|
options:
|
||||||
- AC
|
- AC
|
||||||
|
- Fan
|
||||||
|
- Heat
|
||||||
- White Noise
|
- White Noise
|
||||||
- N/A
|
- N/A
|
||||||
icon: mdi:home-thermometer
|
icon: mdi:home-thermometer
|
||||||
naptime_climate_mode_emma_aircon:
|
scheduled_climate_mode_kallen_bedroom:
|
||||||
name: Naptime Climate Mode - Emma Aircon
|
name: Scheduled Climate Mode - Kallen Bedroom
|
||||||
options:
|
|
||||||
- AC
|
|
||||||
- White Noise
|
|
||||||
- N/A
|
|
||||||
icon: mdi:home-thermometer
|
|
||||||
scheduled_climate_mode_kallen_fan:
|
|
||||||
name: Scheduled Climate Mode - Kallen Fan
|
|
||||||
options:
|
options:
|
||||||
- Fan
|
- Fan
|
||||||
- White Noise
|
- White Noise
|
||||||
@@ -303,20 +344,55 @@ input_number:
|
|||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer
|
icon: mdi:thermometer
|
||||||
emma_aircon_threshold:
|
emma_bedroom_daytime_temp:
|
||||||
name: Emma Aircon Threshold
|
name: Emma Bedroom Daytime Temp
|
||||||
|
min: 65
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_night_temp:
|
||||||
|
name: Emma Bedroom Night Temp
|
||||||
|
min: 65
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_bedtime_temp:
|
||||||
|
name: Emma Bedroom Bedtime Temp
|
||||||
|
min: 65
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_aircon_run_threshold:
|
||||||
|
name: Emma Bedroom Aircon Run Threshold
|
||||||
min: 40
|
min: 40
|
||||||
max: 80
|
max: 80
|
||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer
|
icon: mdi:thermometer
|
||||||
emma_naptime_aircon_threshold:
|
emma_bedroom_aircon_mode_threshold:
|
||||||
name: Emma Naptime Aircon Threshold
|
name: Emma Bedroom Aircon Mode Threshold
|
||||||
min: 40
|
min: 40
|
||||||
max: 80
|
max: 80
|
||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_fan_threshold:
|
||||||
|
name: Emma Bedroom Fan Threshold
|
||||||
|
min: 30
|
||||||
|
max: 70
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_auto_cooling_threshold:
|
||||||
|
name: Emma Bedroom Auto Cooling Threshold
|
||||||
|
min: 70
|
||||||
|
max: 90
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
kallen_fan_threshold:
|
kallen_fan_threshold:
|
||||||
name: Kallen Fan Threshold
|
name: Kallen Fan Threshold
|
||||||
min: 40
|
min: 40
|
||||||
@@ -374,6 +450,38 @@ input_number:
|
|||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer
|
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:
|
intent_script:
|
||||||
MasterBedroomModes:
|
MasterBedroomModes:
|
||||||
action:
|
action:
|
||||||
|
|||||||
@@ -170,6 +170,87 @@ weather:
|
|||||||
{{ states(result) | float }}
|
{{ states(result) | float }}
|
||||||
precipitation_unit: in
|
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:
|
# binary_sensor:
|
||||||
# - platform: bayesian
|
# - platform: bayesian
|
||||||
# unique_id: 3e9640d9-57a0-4495-8731-e64b34774065
|
# unique_id: 3e9640d9-57a0-4495-8731-e64b34774065
|
||||||
@@ -386,6 +467,119 @@ template:
|
|||||||
unique_id: 5bece9ad-2e1e-45a9-a690-93f8ff1d8780
|
unique_id: 5bece9ad-2e1e-45a9-a690-93f8ff1d8780
|
||||||
state: "{{ today.precipitation_probability }}"
|
state: "{{ today.precipitation_probability }}"
|
||||||
unit_of_measurement: "%"
|
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:
|
- binary_sensor:
|
||||||
- name: Heat Threshold
|
- name: Heat Threshold
|
||||||
unique_id: 849a08bb-d4e6-40e9-ae42-50f7fb71b727
|
unique_id: 849a08bb-d4e6-40e9-ae42-50f7fb71b727
|
||||||
|
|||||||
+33
-232
@@ -4,9 +4,6 @@ input_boolean:
|
|||||||
emma_sleeping:
|
emma_sleeping:
|
||||||
name: Emma Sleeping
|
name: Emma Sleeping
|
||||||
icon: mdi:sleep
|
icon: mdi:sleep
|
||||||
emma_has_napped:
|
|
||||||
name: Emma Has Napped
|
|
||||||
icon: mdi:check
|
|
||||||
emma_alternating_meds_active:
|
emma_alternating_meds_active:
|
||||||
name: Emma Alternating Meds Active
|
name: Emma Alternating Meds Active
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
@@ -71,16 +68,6 @@ input_datetime:
|
|||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:weather-sunset-up
|
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
|
# These are for use in remembering which medications she has had when she is sick, and when to safely give them again
|
||||||
emma_ibuprofen:
|
emma_ibuprofen:
|
||||||
name: Emma Ibuprofen
|
name: Emma Ibuprofen
|
||||||
@@ -145,31 +132,13 @@ automation:
|
|||||||
id: sleep-on
|
id: sleep-on
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.emma_sleep
|
- service: script.emma_sleep
|
||||||
- if:
|
- service: input_datetime.set_datetime
|
||||||
- condition: and
|
target:
|
||||||
conditions:
|
entity_id: input_datetime.emma_asleep_at
|
||||||
- condition: state
|
data:
|
||||||
entity_id: input_boolean.emma_has_napped
|
time: >
|
||||||
state: 'off'
|
{% from 'time.jinja' import current_time %}
|
||||||
- condition: time
|
{{ current_time('time',24) }}
|
||||||
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) }}
|
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
@@ -186,28 +155,6 @@ automation:
|
|||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: sleep-off
|
id: sleep-off
|
||||||
sequence:
|
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:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.emma_scheduling_evening_ran
|
entity_id: input_boolean.emma_scheduling_evening_ran
|
||||||
@@ -260,41 +207,6 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_boolean.emma_sleeping
|
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
|
- id: 5b45eeb2-171e-4bac-825b-8ac7aa672dab
|
||||||
alias: Emma Asleep Update
|
alias: Emma Asleep Update
|
||||||
description: Attempt to make readouts of when Emma went to bed more accurate
|
description: Attempt to make readouts of when Emma went to bed more accurate
|
||||||
@@ -310,11 +222,6 @@ automation:
|
|||||||
event_data:
|
event_data:
|
||||||
entity_id: timer.emma_bedtime_update
|
entity_id: timer.emma_bedtime_update
|
||||||
id: bedtime-timer-finished
|
id: bedtime-timer-finished
|
||||||
- platform: event
|
|
||||||
event_type: timer.finished
|
|
||||||
event_data:
|
|
||||||
entity_id: timer.emma_naptime_update
|
|
||||||
id: naptime-timer-finished
|
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: light.emma_bedroom_light
|
entity_id: light.emma_bedroom_light
|
||||||
to: 'off'
|
to: 'off'
|
||||||
@@ -325,37 +232,11 @@ automation:
|
|||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: initial
|
id: initial
|
||||||
sequence:
|
sequence:
|
||||||
- choose:
|
- service: timer.start
|
||||||
- conditions:
|
target:
|
||||||
- condition: and
|
entity_id: timer.emma_bedtime_update
|
||||||
conditions:
|
data:
|
||||||
- condition: state
|
duration: "01:00:00"
|
||||||
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"
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: lights-off
|
id: lights-off
|
||||||
@@ -364,71 +245,21 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- timer.emma_bedtime_update
|
- timer.emma_bedtime_update
|
||||||
- timer.emma_naptime_update
|
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.emma_sleeping
|
entity_id: input_boolean.emma_sleeping
|
||||||
state: 'on'
|
state: 'on'
|
||||||
then:
|
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
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.emma_down_for_nap
|
entity_id: input_datetime.emma_asleep_at
|
||||||
data:
|
data:
|
||||||
datetime: >
|
time: >
|
||||||
{% from 'time.jinja' import current_time %}
|
{% from 'time.jinja' import current_time %}
|
||||||
{{ current_time('datetime',24) }}
|
{{ current_time('time',24) }}
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.emma_awake
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: bedtime-timer-finished
|
id: bedtime-timer-finished
|
||||||
@@ -453,6 +284,9 @@ automation:
|
|||||||
datetime: >
|
datetime: >
|
||||||
{% from 'time.jinja' import current_time %}
|
{% from 'time.jinja' import current_time %}
|
||||||
{{ current_time('time',24) }}
|
{{ current_time('time',24) }}
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.emma_awake
|
||||||
|
|
||||||
- id: e59f638a-519f-4619-bf7d-b13251b3a374
|
- id: e59f638a-519f-4619-bf7d-b13251b3a374
|
||||||
alias: Emma Meds Handler
|
alias: Emma Meds Handler
|
||||||
@@ -976,28 +810,18 @@ script:
|
|||||||
datetime: >
|
datetime: >
|
||||||
{% from 'time.jinja' import set_datetime %}
|
{% from 'time.jinja' import set_datetime %}
|
||||||
{{ set_datetime(0,5) }}
|
{{ set_datetime(0,5) }}
|
||||||
- if:
|
- service: script.speech_engine
|
||||||
- condition: state
|
data:
|
||||||
entity_id: binary_sensor.basement_occupied
|
who: common
|
||||||
state: 'on'
|
type: normal
|
||||||
then:
|
message: Emma has awoken, so it is time to make your way upstairs now
|
||||||
- service: script.speech_engine
|
- service: input_datetime.set_datetime
|
||||||
data:
|
target:
|
||||||
who: basement
|
entity_id: input_datetime.emma_awake_at
|
||||||
type: normal
|
data:
|
||||||
message: Emma has awoken, so it is time to make your way upstairs now
|
time: >
|
||||||
- if:
|
{% from 'time.jinja' import current_time %}
|
||||||
- condition: time
|
{{ current_time('time',24) }}
|
||||||
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: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
@@ -1075,26 +899,3 @@ script:
|
|||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.white_noise_emma_bedroom
|
entity_id: input_boolean.white_noise_emma_bedroom
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: fan.emma_air_conditioner
|
|
||||||
state: 'on'
|
|
||||||
then:
|
|
||||||
- service: script.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: script.emma_aircon_shutoff
|
|
||||||
|
|
||||||
emma_aircon_shutoff:
|
|
||||||
alias: 'Emma Air Conditioner Shutoff'
|
|
||||||
mode: restart
|
|
||||||
description: 'Attempt to shut off air conditioner after compressor stops running'
|
|
||||||
sequence:
|
|
||||||
- wait_template: "{{ is_state('binary_sensor.emma_aircon_compressor','off') }}"
|
|
||||||
timeout:
|
|
||||||
minutes: 15
|
|
||||||
continue_on_timeout: true
|
|
||||||
- delay:
|
|
||||||
seconds: 5
|
|
||||||
- service: fan.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: fan.emma_air_conditioner
|
|
||||||
@@ -1,101 +1,3 @@
|
|||||||
scrape:
|
|
||||||
- resource: https://www.gasbuddy.com/station/59010
|
|
||||||
sensor:
|
|
||||||
- name: South Side Shell
|
|
||||||
unique_id: b3385058-173c-4446-9f0f-3a45f21715d8
|
|
||||||
select: &selector "#root > div > div.Page-module__content___196kn.Page-module__padded___3hQ0U > div > div > div:nth-child(2) > div.grid__column___nhz7X.grid__desktop10___2T18R > div:nth-child(1) > div.grid__column___nhz7X.grid__desktop8___38Y4U > div:nth-child(3) > div > div.GasPriceCollection-module__collectionContainer___29Ngz > div:nth-child(2) > div:nth-child(1) > span"
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59007
|
|
||||||
sensor:
|
|
||||||
- name: Circle K
|
|
||||||
unique_id: 63d947bc-486a-478e-9fbe-7fb2f38a1e1e
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/123478
|
|
||||||
sensor:
|
|
||||||
- name: Kroger
|
|
||||||
unique_id: b705d912-8ef4-4e55-9168-d7e152773ba0
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59014
|
|
||||||
sensor:
|
|
||||||
- name: Kecks
|
|
||||||
unique_id: 4fa4a7bb-45b1-4d17-ab92-06ebd6a39ebb
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59006
|
|
||||||
sensor:
|
|
||||||
- name: The Barn
|
|
||||||
unique_id: 51137245-9c4a-4992-aa7c-19cd38bd614d
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59016
|
|
||||||
sensor:
|
|
||||||
- name: The Big Fish
|
|
||||||
unique_id: d5e057d5-3f7b-4c6b-ad0c-5e6ffa10b861
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/107803
|
|
||||||
sensor:
|
|
||||||
- name: Marathon Cleveland Avenue
|
|
||||||
unique_id: 3ef9c1d0-46b0-4850-8df2-d478c833aa4d
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59013
|
|
||||||
sensor:
|
|
||||||
- name: Speedway
|
|
||||||
unique_id: 44484541-1a71-4e36-9e81-486eea3882cc
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59009
|
|
||||||
sensor:
|
|
||||||
- name: Meijer
|
|
||||||
unique_id: dc687fd2-ed4d-4fae-a2b8-38ae7a944a68
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59012
|
|
||||||
sensor:
|
|
||||||
- name: East Side Shell
|
|
||||||
unique_id: db36f6b4-6f87-48af-a339-1f8e8bbc95e3
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/59011
|
|
||||||
sensor:
|
|
||||||
- name: Shell Ottawa Avenue
|
|
||||||
unique_id: d9508ad6-4298-4262-bac9-931a3bc510df
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
- resource: https://www.gasbuddy.com/station/71535
|
|
||||||
sensor:
|
|
||||||
- name: Ridis
|
|
||||||
unique_id: 9db2cbc3-39ea-4471-9541-64aa7aa8de71
|
|
||||||
select: *selector
|
|
||||||
device_class: monetary
|
|
||||||
value_template: '{{ value | replace("$", "") | float }}'
|
|
||||||
icon: mdi:gas-station
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: statistics
|
- platform: statistics
|
||||||
unique_id: fcf4e80e-8459-4e23-a94f-5f127b628c20
|
unique_id: fcf4e80e-8459-4e23-a94f-5f127b628c20
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ tts:
|
|||||||
region_name: 'us-east-1'
|
region_name: 'us-east-1'
|
||||||
text_type: ssml
|
text_type: ssml
|
||||||
voice: Joanna
|
voice: Joanna
|
||||||
cache: true
|
engine: generative
|
||||||
engine: neural
|
|
||||||
|
|
||||||
conversation:
|
conversation:
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,15 @@ input_boolean:
|
|||||||
kallen_late_bedtime:
|
kallen_late_bedtime:
|
||||||
name: Kallen Late Bedtime
|
name: Kallen Late Bedtime
|
||||||
icon: mdi:weather-night
|
icon: mdi:weather-night
|
||||||
|
kallen_morning_meds_reminder:
|
||||||
|
name: Kallen Morning Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
kallen_morning_meds_taken:
|
kallen_morning_meds_taken:
|
||||||
name: Kallen Morning Meds Taken
|
name: Kallen Morning Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
kallen_night_meds_reminder:
|
||||||
|
name: Kallen Night Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
kallen_night_meds_taken:
|
kallen_night_meds_taken:
|
||||||
name: Kallen Night Meds Taken
|
name: Kallen Night Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
@@ -67,12 +73,12 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
kallen_morning_meds_notify:
|
kallen_morning_meds_notify:
|
||||||
name: Kallen Morning Meds Notify
|
name: Kallen Morning Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
kallen_night_meds_notify:
|
kallen_night_meds_notify:
|
||||||
name: Kallen Night Meds Notify
|
name: Kallen Night Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
kallen_alarm_clock:
|
kallen_alarm_clock:
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ input_boolean:
|
|||||||
give_me_darkness:
|
give_me_darkness:
|
||||||
name: Give Me Darkness
|
name: Give Me Darkness
|
||||||
icon: mdi:weather-night
|
icon: mdi:weather-night
|
||||||
tina_desk_lights:
|
|
||||||
name: Tina Desk Lights
|
|
||||||
icon: mdi:desk
|
|
||||||
holiday_mode_hold:
|
holiday_mode_hold:
|
||||||
name: Holiday Mode Hold
|
name: Holiday Mode Hold
|
||||||
icon: mdi:party-popper
|
icon: mdi:party-popper
|
||||||
@@ -492,6 +489,7 @@ input_select:
|
|||||||
- Evening Mode
|
- Evening Mode
|
||||||
- Night Mode
|
- Night Mode
|
||||||
- Bright Mode
|
- Bright Mode
|
||||||
|
- Reading Mode
|
||||||
- Reset
|
- Reset
|
||||||
initial: Select
|
initial: Select
|
||||||
icon: mdi:desk
|
icon: mdi:desk
|
||||||
@@ -656,6 +654,21 @@ template:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
device_class: problem
|
device_class: problem
|
||||||
delay_on: "00:00:10"
|
delay_on: "00:00:10"
|
||||||
|
- name: Light Switch Issue
|
||||||
|
unique_id: 381e8038-ea96-474c-92ec-d1296dc1369e
|
||||||
|
state: >
|
||||||
|
{% set lights = states.light.upstairs_bathroom_lights,
|
||||||
|
states.light.hallway_overhead,
|
||||||
|
states.light.downstairs_bathroom_lights %}
|
||||||
|
{% set issues = lights | selectattr('state','eq','unavailable') | list | count %}
|
||||||
|
{{ issues > 0 }}
|
||||||
|
attributes:
|
||||||
|
issues: >
|
||||||
|
{% set lights = states.light.upstairs_bathroom_lights,
|
||||||
|
states.light.hallway_overhead,
|
||||||
|
states.light.downstairs_bathroom_lights %}
|
||||||
|
{% set ids = lights | selectattr('state','eq','unavailable') | map(attribute='attributes.friendly_name') | list %}
|
||||||
|
{{ ids | join(', ') }}
|
||||||
- sensor:
|
- sensor:
|
||||||
- name: "Basement Studio Lights - Brightness Actual"
|
- name: "Basement Studio Lights - Brightness Actual"
|
||||||
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
||||||
@@ -819,7 +832,6 @@ switch:
|
|||||||
- light.living_room_color_3
|
- light.living_room_color_3
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_desk_strip
|
|
||||||
colors:
|
colors:
|
||||||
- color_type: rgb_color
|
- color_type: rgb_color
|
||||||
color: [255,0,0]
|
color: [255,0,0]
|
||||||
|
|||||||
+84
-118
@@ -198,6 +198,57 @@ input_number:
|
|||||||
step: 0.05
|
step: 0.05
|
||||||
icon: mdi:knob
|
icon: mdi:knob
|
||||||
|
|
||||||
|
template:
|
||||||
|
- sensor:
|
||||||
|
- name: "Basement Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.basement_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.basement_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Basement Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.basement_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.basement_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Living Room Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.living_room_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.living_room_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Master Bedroom Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('binary_sensor.people_sleeping','on') %}
|
||||||
|
{{ states('input_number.master_bedroom_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.master_bedroom_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Kallen Bedroom Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('input_boolean.kallen_sleeping','on') %}
|
||||||
|
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Emma Bedroom Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('input_boolean.emma_sleeping','on') %}
|
||||||
|
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
|
||||||
# Amazon Polly Sensors to see last message and location of audible notification
|
# Amazon Polly Sensors to see last message and location of audible notification
|
||||||
mqtt:
|
mqtt:
|
||||||
sensor:
|
sensor:
|
||||||
@@ -301,10 +352,6 @@ notify:
|
|||||||
services:
|
services:
|
||||||
- service: alexa_media_living_room_echo_dot
|
- service: alexa_media_living_room_echo_dot
|
||||||
- service: alexa_media_basement_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:
|
script:
|
||||||
volume_reset:
|
volume_reset:
|
||||||
@@ -329,24 +376,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.basement_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.basement_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.basement_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.basement_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.basement_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_echo_dot
|
entity_id: media_player.basement_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.basement_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.basement_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.basement_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Basement Google Speaker
|
# Basement Google Speaker
|
||||||
- if:
|
- if:
|
||||||
- condition: and
|
- condition: and
|
||||||
@@ -377,24 +414,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.basement_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.basement_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.basement_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.basement_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.basement_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.basement_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.basement_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.basement_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
@@ -409,24 +436,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.living_room_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.living_room_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.living_room_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.living_room_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.living_room_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.living_room_echo_dot
|
entity_id: media_player.living_room_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.living_room_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.living_room_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.living_room_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Master Bedroom Echo Dot
|
# Master Bedroom Echo Dot
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
@@ -439,24 +456,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.master_bedroom_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.master_bedroom_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.master_bedroom_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.master_bedroom_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.master_bedroom_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.master_bedroom_echo_dot
|
entity_id: media_player.master_bedroom_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.master_bedroom_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.master_bedroom_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.master_bedroom_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Kallen Bedroom Speaker
|
# Kallen Bedroom Speaker
|
||||||
- if:
|
- if:
|
||||||
- condition: and
|
- condition: and
|
||||||
@@ -487,24 +494,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.kallen_bedroom_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.kallen_bedroom_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.kallen_bedroom_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.kallen_bedroom_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.kallen_bedroom_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.kallen_bedroom_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
@@ -540,24 +537,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.emma_bedroom_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.emma_bedroom_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.emma_bedroom_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.emma_bedroom_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.emma_bedroom_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.kallen_bedroom_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
@@ -1241,11 +1228,9 @@ script:
|
|||||||
data:
|
data:
|
||||||
message: >
|
message: >
|
||||||
<voice name="{{ voice }}">
|
<voice name="{{ voice }}">
|
||||||
<amazon:auto-breaths>
|
|
||||||
<prosody rate="fast">
|
<prosody rate="fast">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</prosody>
|
</prosody>
|
||||||
</amazon:auto-breaths>
|
|
||||||
</voice>
|
</voice>
|
||||||
target: >
|
target: >
|
||||||
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
|
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
|
||||||
@@ -1332,53 +1317,34 @@ script:
|
|||||||
media_player.basement_google_speaker
|
media_player.basement_google_speaker
|
||||||
{% endif %}
|
{% endif %}
|
||||||
volume_level: >-
|
volume_level: >-
|
||||||
{% set numbers_night = [
|
{% set numbers = [
|
||||||
states.input_number.emma_bedroom_google_speaker_night_volume.state,
|
states.sensor.emma_bedroom_google_speaker_volume.state,
|
||||||
states.input_number.kallen_bedroom_google_speaker_night_volume.state
|
states.sensor.kallen_bedroom_google_speaker_volume.state
|
||||||
] %}
|
] %}
|
||||||
{% set numbers_day = [
|
{% set kidsgroup = numbers | list | min | float %}
|
||||||
states.input_number.emma_bedroom_google_speaker_day_volume.state,
|
|
||||||
states.input_number.kallen_bedroom_google_speaker_day_volume.state
|
|
||||||
] %}
|
|
||||||
{% set kidsgroup_night = numbers_night | list | min | float %}
|
|
||||||
{% set kidsgroup_day = numbers_day | list | max | float %}
|
|
||||||
{% if type in ['critical'] %}
|
{% if type in ['critical'] %}
|
||||||
1.0
|
1.0
|
||||||
{% elif is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ kidsgroup_night }}
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
|
||||||
{{ states('input_number.basement_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
0.3
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.kallen_bedroom_google_speaker_volume') }}
|
||||||
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.emma_bedroom_google_speaker_volume') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ kidsgroup_day }}
|
{{ kidsgroup }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.kallen_bedroom_google_speaker_volume') }}
|
||||||
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.emma_bedroom_google_speaker_volume') }}
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
{% elif who in ['Basement Google','basement_google'] %}
|
||||||
{{ states('input_number.basement_google_speaker_day_volume') }}
|
{{ states('sensor.basement_google_speaker_volume') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
0.6
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
0.3
|
||||||
|
{% else %}
|
||||||
|
0.6
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ sensor:
|
|||||||
entity_id: switch.tina_desktop
|
entity_id: switch.tina_desktop
|
||||||
power_sensor_id: sensor.tina_desktop_power
|
power_sensor_id: sensor.tina_desktop_power
|
||||||
- platform: powercalc
|
- platform: powercalc
|
||||||
entity_id: fan.emma_air_conditioner
|
entity_id: switch.emma_bedroom_aircon
|
||||||
power_sensor_id: sensor.emma_air_conditioner_power
|
power_sensor_id: sensor.emma_bedroom_aircon_power
|
||||||
- platform: powercalc
|
- platform: powercalc
|
||||||
entity_id: switch.master_bedroom_aircon
|
entity_id: switch.master_bedroom_aircon
|
||||||
power_sensor_id: sensor.master_bedroom_aircon_power
|
power_sensor_id: sensor.master_bedroom_aircon_power
|
||||||
|
|||||||
+5
-10
@@ -89,7 +89,7 @@ template:
|
|||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: People Present
|
- name: People Present
|
||||||
state: >
|
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"
|
- name: "Tony Home"
|
||||||
unique_id: 4f0d8c3d-dc49-4b7a-a1fc-5d286b4a954d
|
unique_id: 4f0d8c3d-dc49-4b7a-a1fc-5d286b4a954d
|
||||||
state: "{{ is_state('device_tracker.tony_s_iphone', 'home') }}" # Add new tracker when we have one
|
state: "{{ is_state('device_tracker.tony_s_iphone', 'home') }}" # Add new tracker when we have one
|
||||||
@@ -124,6 +124,8 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% if is_state('binary_sensor.basement_studio_motion','on') %}
|
{% if is_state('binary_sensor.basement_studio_motion','on') %}
|
||||||
true
|
true
|
||||||
|
{% elif is_state('sensor.xia_desktop_current_username','tm24f') %}
|
||||||
|
false
|
||||||
{% elif is_state('binary_sensor.tony_desktop_on','off') and
|
{% elif is_state('binary_sensor.tony_desktop_on','off') and
|
||||||
is_state('binary_sensor.kallen_desktop_on','off') %}
|
is_state('binary_sensor.kallen_desktop_on','off') %}
|
||||||
false
|
false
|
||||||
@@ -405,7 +407,6 @@ automation:
|
|||||||
# - light.living_room_led_strip
|
# - light.living_room_led_strip
|
||||||
# - light.tina_lamp_top
|
# - light.tina_lamp_top
|
||||||
# - light.tina_lamp_side
|
# - light.tina_lamp_side
|
||||||
# - light.tina_desk_strip
|
|
||||||
# - alias: "Save Current Adaptive State"
|
# - alias: "Save Current Adaptive State"
|
||||||
# service: scene.create
|
# service: scene.create
|
||||||
# data:
|
# data:
|
||||||
@@ -425,7 +426,6 @@ automation:
|
|||||||
# entity_id:
|
# entity_id:
|
||||||
# - light.living_room_lights
|
# - light.living_room_lights
|
||||||
# - light.tina_lamp
|
# - light.tina_lamp
|
||||||
# - light.tina_desk_strip
|
|
||||||
# - light.living_room_led_strip
|
# - light.living_room_led_strip
|
||||||
# data:
|
# data:
|
||||||
# color_name: green
|
# color_name: green
|
||||||
@@ -613,7 +613,6 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- fan.kallen_bedroom_fan
|
- fan.kallen_bedroom_fan
|
||||||
- fan.emma_air_conditioner
|
|
||||||
- service: button.press
|
- service: button.press
|
||||||
target:
|
target:
|
||||||
entity_id: button.master_bedroom_climate_reset
|
entity_id: button.master_bedroom_climate_reset
|
||||||
@@ -865,9 +864,7 @@ script:
|
|||||||
- front_porch
|
- front_porch
|
||||||
- living_room
|
- living_room
|
||||||
- mud_room
|
- mud_room
|
||||||
- service: input_boolean.turn_on
|
- tina_desk
|
||||||
target:
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
@@ -925,9 +922,7 @@ script:
|
|||||||
area_id:
|
area_id:
|
||||||
- living_room
|
- living_room
|
||||||
- mud_room
|
- mud_room
|
||||||
- service: input_boolean.turn_on
|
- tina_desk
|
||||||
target:
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
|
|||||||
+43
-66
@@ -164,7 +164,7 @@ script:
|
|||||||
time: >
|
time: >
|
||||||
{% from 'time.jinja' import time_from_calendar %}
|
{% from 'time.jinja' import time_from_calendar %}
|
||||||
{% if is_state('input_boolean.two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
10:00
|
{{ time_from_calendar('calendar.kallen_school_days','start_time','set','add',2)}}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ time_from_calendar('calendar.kallen_school_days','start_time','set') }}
|
{{ time_from_calendar('calendar.kallen_school_days','start_time','set') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -247,11 +247,14 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_datetime.kallen_morning_meds_notify
|
entity_id: input_datetime.kallen_morning_meds_notify
|
||||||
data:
|
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') %}
|
{% 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 %}
|
{% else %}
|
||||||
{{ states('input_datetime.kallen_wakeup_time') }}
|
{{ date + ' ' + states('input_datetime.kallen_wakeup_time') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@@ -271,16 +274,16 @@ script:
|
|||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_in_session','on') %}
|
{% if is_state('input_boolean.school_in_session','on') %}
|
||||||
{% if is_state('binary_sensor.kallen_school_tomorrow', '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
|
22:00
|
||||||
{% else %}
|
{% else %}
|
||||||
23:00
|
23:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% if is_state('binary_sensor.kallen_btb_tomorrow','on') %}
|
||||||
|
23:00
|
||||||
|
{% else %}
|
||||||
|
00:00
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
@@ -300,7 +303,7 @@ script:
|
|||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.scheduled_climate_mode_kallen_fan
|
entity_id: input_select.scheduled_climate_mode_kallen_bedroom
|
||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('input_boolean.kallen_overnight','on') %}
|
{% if is_state('input_boolean.kallen_overnight','on') %}
|
||||||
@@ -324,7 +327,15 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_datetime.kallen_night_meds_notify
|
entity_id: input_datetime.kallen_night_meds_notify
|
||||||
data:
|
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:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.kallen_late_bedtime
|
entity_id: input_boolean.kallen_late_bedtime
|
||||||
@@ -354,7 +365,7 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_datetime.kallen_night_meds_notify
|
entity_id: input_datetime.kallen_night_meds_notify
|
||||||
data:
|
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
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.kallen_scheduling_evening_ran
|
entity_id: input_boolean.kallen_scheduling_evening_ran
|
||||||
@@ -383,11 +394,7 @@ script:
|
|||||||
{% set kallenbriefing = state_attr('input_datetime.kallen_morning_briefing','timestamp') %}
|
{% set kallenbriefing = state_attr('input_datetime.kallen_morning_briefing','timestamp') %}
|
||||||
{% set kallenloc = states('input_select.kallen_morning_briefing_location') %}
|
{% set kallenloc = states('input_select.kallen_morning_briefing_location') %}
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.two_hour_delay','on') %}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||||
9:20
|
|
||||||
{% else %}
|
|
||||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2400) | timestamp_custom('%H:%M', false) }}
|
|
||||||
{% endif %}
|
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
{% 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 (state_attr('input_datetime.tina_workday_start','timestamp')) > 43200 %}
|
||||||
{% if kallenloc == 'Common Areas' and kallenbriefing == 43200 %}
|
{% if kallenloc == 'Common Areas' and kallenbriefing == 43200 %}
|
||||||
@@ -411,21 +418,14 @@ script:
|
|||||||
entity_id: input_datetime.daily_briefing
|
entity_id: input_datetime.daily_briefing
|
||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% from 'time.jinja' import time_from_calendar %}
|
{% if is_state('input_boolean.kallen_school_today','off') and is_state('input_boolean.work_today','on') %}
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') or is_state('input_boolean.kallen_btb','on') %}
|
|
||||||
15:30
|
|
||||||
{% else %}
|
|
||||||
{{ time_from_calendar('calendar.kallen_school_days','end_time','set','subtract',1) }}
|
|
||||||
{% endif %}
|
|
||||||
{% elif is_state('input_boolean.kallen_school_today','off') and is_state('input_boolean.work_today','off') %}
|
|
||||||
15:30
|
|
||||||
{% else %}
|
|
||||||
{% if (state_attr('input_datetime.tina_workday_end','timestamp')) > 61200 %}
|
{% if (state_attr('input_datetime.tina_workday_end','timestamp')) > 61200 %}
|
||||||
16:00
|
16:00
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
15:30
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
@@ -554,18 +554,7 @@ script:
|
|||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.master_bedroom_wakeup
|
entity_id: input_datetime.master_bedroom_wakeup
|
||||||
data:
|
data:
|
||||||
time: >
|
time: "16:30"
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') or is_state('input_boolean.kallen_btb','on') %}
|
|
||||||
16:30
|
|
||||||
{% elif is_state('input_boolean.kallen_school_early_release','on') %}
|
|
||||||
12:30
|
|
||||||
{% else %}
|
|
||||||
13:00
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
16:30
|
|
||||||
{% endif %}
|
|
||||||
- delay:
|
- delay:
|
||||||
milliseconds: 500
|
milliseconds: 500
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
@@ -586,11 +575,13 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_datetime.tina_morning_meds_notify
|
entity_id: input_datetime.tina_morning_meds_notify
|
||||||
data:
|
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') %}
|
{% 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 %}
|
{% else %}
|
||||||
{{ states('input_datetime.master_bedroom_wakeup') }}
|
{{ date + ' ' + states('input_datetime.master_bedroom_wakeup') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@@ -676,7 +667,7 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_datetime.tina_night_meds_notify
|
entity_id: input_datetime.tina_night_meds_notify
|
||||||
data:
|
data:
|
||||||
time: '03:00'
|
datetime: "{{ (as_timestamp(now()) + 86400) | timestamp_custom('%Y-%m-%d', True) + ' 03:00:00' }}"
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.master_bedroom_scheduling_evening_ran
|
entity_id: input_boolean.master_bedroom_scheduling_evening_ran
|
||||||
@@ -684,9 +675,6 @@ script:
|
|||||||
emma_bedroom_scheduling_morning:
|
emma_bedroom_scheduling_morning:
|
||||||
alias: 'Emma Bedroom Scheduling Morning'
|
alias: 'Emma Bedroom Scheduling Morning'
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.emma_has_napped
|
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.emma_wakeup_override
|
entity_id: input_boolean.emma_wakeup_override
|
||||||
@@ -696,11 +684,6 @@ script:
|
|||||||
entity_id: input_datetime.emma_wakeup
|
entity_id: input_datetime.emma_wakeup
|
||||||
data:
|
data:
|
||||||
time: "{{ states('input_datetime.master_bedroom_wakeup') }}"
|
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
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.emma_scheduling_morning_ran
|
entity_id: input_boolean.emma_scheduling_morning_ran
|
||||||
@@ -718,15 +701,9 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% set awake = state_attr('input_datetime.emma_awake_at','timestamp') | int %}
|
{% 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 hours = states('input_number.emma_bedtime_hours') | int %}
|
||||||
{% set math = (hours * 60) * 60 %}
|
{% set math = (hours * 60) * 60 %}
|
||||||
{% set math_nap = 14400 %}
|
{{ (awake + math) | timestamp_custom('%H:%M',false) }}
|
||||||
{% 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 %}
|
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.emma_bedroom_climate_override
|
entity_id: input_boolean.emma_bedroom_climate_override
|
||||||
@@ -734,7 +711,7 @@ script:
|
|||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
|
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
|
||||||
@@ -755,11 +732,11 @@ script:
|
|||||||
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
||||||
{% set bedtime = state_attr('input_datetime.emma_bedtime','timestamp') | int %}
|
{% set bedtime = state_attr('input_datetime.emma_bedtime','timestamp') | int %}
|
||||||
{% if is_state('input_boolean.hot_day','on') %}
|
{% if is_state('input_boolean.hot_day','on') %}
|
||||||
{{ (bedtime - 7200) | timestamp_custom('%H:%M',false) }}
|
|
||||||
{% elif high >= 80 or low >= 60 %}
|
|
||||||
{{ (bedtime - 5400) | timestamp_custom('%H:%M',false) }}
|
{{ (bedtime - 5400) | timestamp_custom('%H:%M',false) }}
|
||||||
{% else %}
|
{% elif high >= 80 or low >= 60 %}
|
||||||
{{ (bedtime - 3600) | timestamp_custom('%H:%M',false) }}
|
{{ (bedtime - 3600) | timestamp_custom('%H:%M',false) }}
|
||||||
|
{% else %}
|
||||||
|
{{ (bedtime - 1800) | timestamp_custom('%H:%M',false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
@@ -778,16 +755,16 @@ script:
|
|||||||
{% if ct > state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
{% 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) }}
|
{{ (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') %}
|
{% 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') - 3900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < (state_attr('input_datetime.kallen_school_day_start','timestamp')) %}
|
{% 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) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% 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') - 3900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
{% 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) }}
|
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
{% 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') - 3900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
11:00
|
11:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -288,6 +288,17 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id: input_boolean.school_today_ran
|
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
|
- id: 05ee0f8d-5411-4486-8acf-9bfadad2b23a
|
||||||
alias: End of School Year
|
alias: End of School Year
|
||||||
initial_state: true
|
initial_state: true
|
||||||
|
|||||||
@@ -3,6 +3,53 @@ input_boolean:
|
|||||||
name: Sports Updates
|
name: Sports Updates
|
||||||
icon: mdi:strategy
|
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:
|
template:
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Michigan Wolverines Inhibit
|
- name: Michigan Wolverines Inhibit
|
||||||
|
|||||||
+4
-12
@@ -63,48 +63,40 @@ template:
|
|||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Tony Desktop On
|
- name: Tony Desktop On
|
||||||
unique_id: 82ce673a-96ad-4af5-a8d1-be9ca9fa9c36
|
unique_id: 82ce673a-96ad-4af5-a8d1-be9ca9fa9c36
|
||||||
state: "{{ states('sensor.tony_desktop_power') | int > 10 }}"
|
state: "{{ states('sensor.tony_desktop_power') | int > 25 }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
attributes:
|
attributes:
|
||||||
power_usage: "{{ states('sensor.tony_desktop_power') | int }}W"
|
power_usage: "{{ states('sensor.tony_desktop_power') | int }}W"
|
||||||
- name: Tina Desktop On
|
- name: Tina Desktop On
|
||||||
unique_id: 8484dbd4-2fae-4368-a4bc-d1bdc09e003f
|
unique_id: 8484dbd4-2fae-4368-a4bc-d1bdc09e003f
|
||||||
state: "{{ states('sensor.tina_desktop_power') | int > 10 }}"
|
state: "{{ states('sensor.tina_desktop_power') | int > 25 }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
attributes:
|
attributes:
|
||||||
power_usage: "{{ states('sensor.tina_desktop_power') | int }}W"
|
power_usage: "{{ states('sensor.tina_desktop_power') | int }}W"
|
||||||
- name: Kallen Desktop On
|
- name: Kallen Desktop On
|
||||||
unique_id: ccc25d75-4915-449d-9b2e-09ad14ffac29
|
unique_id: ccc25d75-4915-449d-9b2e-09ad14ffac29
|
||||||
state: "{{ states('sensor.kallen_desktop_power') | int > 10 }}"
|
state: "{{ states('sensor.kallen_desktop_power') | int > 25 }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
attributes:
|
attributes:
|
||||||
power_usage: "{{ states('sensor.kallen_desktop_power') | int }}W"
|
power_usage: "{{ states('sensor.kallen_desktop_power') | int }}W"
|
||||||
- name: Basement Server On
|
- name: Basement Server On
|
||||||
unique_id: e6df7d98-d3ba-4e01-bae2-2ebafc8d78d6
|
unique_id: e6df7d98-d3ba-4e01-bae2-2ebafc8d78d6
|
||||||
state: "{{ states('sensor.basement_server_power') | int > 10 }}"
|
state: "{{ states('sensor.basement_server_power') | int > 25 }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
attributes:
|
attributes:
|
||||||
power_usage: "{{ states('sensor.basement_server_power') | int }}W"
|
power_usage: "{{ states('sensor.basement_server_power') | int }}W"
|
||||||
- name: Tony Desktop Idle
|
- name: Tony Desktop Idle
|
||||||
unique_id: f0ace986-a874-4fb0-ad29-8f3ebf95d8cc
|
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) }}"
|
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
|
- name: Tina Desktop Idle
|
||||||
unique_id: 1933c638-c94b-468e-bb7a-c1c5b36c3651
|
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) }}"
|
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
|
- name: Kallen Desktop Idle
|
||||||
unique_id: 680c6ae3-2ed2-451e-858b-2aee688af461
|
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) }}"
|
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
|
- name: Asus Laptop Idle
|
||||||
unique_id: 7d8eb80a-0a2e-48a9-84b3-33175304dd95
|
unique_id: 7d8eb80a-0a2e-48a9-84b3-33175304dd95
|
||||||
state: "{{ states('sensor.asus_laptop_system_idle_time') | int > 1800 }}"
|
state: "{{ states('sensor.asus_laptop_system_idle_time') | int > 1800 }}"
|
||||||
attributes:
|
|
||||||
idle_time: "{{ states('sensor.asus_laptop_system_idle_time') }}s"
|
|
||||||
- sensor:
|
- sensor:
|
||||||
- name: "Min Ping"
|
- name: "Min Ping"
|
||||||
unique_id: ddcb9f6f-7c94-41fe-9453-2a2205b078e0
|
unique_id: ddcb9f6f-7c94-41fe-9453-2a2205b078e0
|
||||||
|
|||||||
+40
-164
@@ -7,12 +7,30 @@ input_boolean:
|
|||||||
work_today_extended:
|
work_today_extended:
|
||||||
name: Work Today Extended
|
name: Work Today Extended
|
||||||
icon: mdi:briefcase-plus
|
icon: mdi:briefcase-plus
|
||||||
|
tina_morning_meds_reminder:
|
||||||
|
name: Tina Morning Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
tina_morning_meds_taken:
|
tina_morning_meds_taken:
|
||||||
name: Tina Morning Meds Taken
|
name: Tina Morning Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
tina_night_meds_reminder:
|
||||||
|
name: Tina Night Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
tina_night_meds_taken:
|
tina_night_meds_taken:
|
||||||
name: Tina Night Meds Taken
|
name: Tina Night Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
tina_ibuprofen_active:
|
||||||
|
name: Tina Ibuprofen Active
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_ibuprofen_taken:
|
||||||
|
name: Tina Ibuprofen Taken
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_tylenol_active:
|
||||||
|
name: Tina Tylenol Active
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_tylenol_taken:
|
||||||
|
name: Tina Tylenol Taken
|
||||||
|
icon: mdi:medication
|
||||||
tina_awake:
|
tina_awake:
|
||||||
name: Tina Awake
|
name: Tina Awake
|
||||||
icon: mdi:eye-check
|
icon: mdi:eye-check
|
||||||
@@ -35,7 +53,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tina_morning_meds_notify:
|
tina_morning_meds_notify:
|
||||||
name: Tina Morning Meds Notify
|
name: Tina Morning Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tina_night_meds_taken:
|
tina_night_meds_taken:
|
||||||
@@ -45,7 +63,27 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tina_night_meds_notify:
|
tina_night_meds_notify:
|
||||||
name: Tina Night Meds Notify
|
name: Tina Night Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_ibuprofen_taken:
|
||||||
|
name: Tina Ibuprofen Taken
|
||||||
|
has_date: true
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_ibuprofen_notify:
|
||||||
|
name: Tina Ibuprofen Notify
|
||||||
|
has_date: true
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_tylenol_taken:
|
||||||
|
name: Tina Tylenol Taken
|
||||||
|
has_date: true
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:medication
|
||||||
|
tina_tylenol_notify:
|
||||||
|
name: Tina Tylenol Notify
|
||||||
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
|
||||||
@@ -191,165 +229,3 @@ script:
|
|||||||
- service: script.master_bedroom_scheduling_evening
|
- service: script.master_bedroom_scheduling_evening
|
||||||
- service: script.emma_bedroom_scheduling_evening
|
- service: script.emma_bedroom_scheduling_evening
|
||||||
- service: script.security_scheduling
|
- 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:
|
tony_streaming_today:
|
||||||
name: Tony Streaming Today
|
name: Tony Streaming Today
|
||||||
icon: mdi:twitch
|
icon: mdi:twitch
|
||||||
|
tony_morning_meds_reminder:
|
||||||
|
name: Tony Morning Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
tony_morning_meds_taken:
|
tony_morning_meds_taken:
|
||||||
name: Tony Morning Meds Taken
|
name: Tony Morning Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
tony_afternoon_meds_reminder:
|
||||||
|
name: Tony Afternoon Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
tony_afternoon_meds_taken:
|
tony_afternoon_meds_taken:
|
||||||
name: Tony Afternoon Meds Taken
|
name: Tony Afternoon Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
tony_night_meds_reminder:
|
||||||
|
name: Tony Night Meds Reminder
|
||||||
|
icon: mdi:medication
|
||||||
tony_night_meds_taken:
|
tony_night_meds_taken:
|
||||||
name: Tony Night Meds Taken
|
name: Tony Night Meds Taken
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
@@ -64,17 +73,17 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_morning_meds_notify:
|
tony_morning_meds_notify:
|
||||||
name: Tony Morning Meds Notify
|
name: Tony Morning Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_afternoon_meds_notify:
|
tony_afternoon_meds_notify:
|
||||||
name: Tony Afternoon Meds Notify
|
name: Tony Afternoon Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_night_meds_notify:
|
tony_night_meds_notify:
|
||||||
name: Tony Night Meds Notify
|
name: Tony Night Meds Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_taken_p1:
|
tony_custom_meds_taken_p1:
|
||||||
@@ -84,7 +93,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_notify_p1:
|
tony_custom_meds_notify_p1:
|
||||||
name: Tony Custom Meds Notify P1
|
name: Tony Custom Meds Notify P1
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_taken_p2:
|
tony_custom_meds_taken_p2:
|
||||||
@@ -94,7 +103,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_custom_meds_notify_p2:
|
tony_custom_meds_notify_p2:
|
||||||
name: Tony Custom Meds Notify P2
|
name: Tony Custom Meds Notify P2
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_ibuprofen_taken:
|
tony_ibuprofen_taken:
|
||||||
@@ -104,7 +113,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_ibuprofen_notify:
|
tony_ibuprofen_notify:
|
||||||
name: Tony Ibuprofen Notify
|
name: Tony Ibuprofen Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_tylenol_taken:
|
tony_tylenol_taken:
|
||||||
@@ -114,7 +123,7 @@ input_datetime:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
tony_tylenol_notify:
|
tony_tylenol_notify:
|
||||||
name: Tony Tylenol Notify
|
name: Tony Tylenol Notify
|
||||||
has_date: false
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
|
|
||||||
@@ -178,4 +187,34 @@ sensor:
|
|||||||
json_attributes:
|
json_attributes:
|
||||||
- project
|
- project
|
||||||
- items
|
- 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
|
||||||
|
|||||||
@@ -1617,7 +1617,6 @@ script:
|
|||||||
# snapshot_entities:
|
# snapshot_entities:
|
||||||
# - light.tina_lamp_side
|
# - light.tina_lamp_side
|
||||||
# - light.tina_lamp_top
|
# - light.tina_lamp_top
|
||||||
# - light.tina_desk_strip
|
|
||||||
# - switch.adaptive_lighting_living_room
|
# - switch.adaptive_lighting_living_room
|
||||||
# - switch.adaptive_lighting_tina_lamp
|
# - switch.adaptive_lighting_tina_lamp
|
||||||
# - service: switch.turn_off
|
# - service: switch.turn_off
|
||||||
@@ -1631,7 +1630,6 @@ script:
|
|||||||
# entity_id:
|
# entity_id:
|
||||||
# - light.tina_lamp_side
|
# - light.tina_lamp_side
|
||||||
# - light.tina_lamp_top
|
# - light.tina_lamp_top
|
||||||
# - light.tina_desk_strip
|
|
||||||
# data:
|
# data:
|
||||||
# color_name: red
|
# color_name: red
|
||||||
# - service: script.living_room_lights_alert
|
# - service: script.living_room_lights_alert
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ ## HACS Components
|
|||||||
- [Powercalc](https://github.com/bramstroker/homeassistant-powercalc)
|
- [Powercalc](https://github.com/bramstroker/homeassistant-powercalc)
|
||||||
- [Govee LAN Control](https://github.com/wez/govee-lan-hass)
|
- [Govee LAN Control](https://github.com/wez/govee-lan-hass)
|
||||||
- [Discord Game](https://github.com/LordBoos/discord_game)
|
- [Discord Game](https://github.com/LordBoos/discord_game)
|
||||||
|
- [Versatile Thermostat](https://github.com/jmcollin78/versatile_thermostat)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ ## HACS Lovelace Cards
|
|||||||
<details>
|
<details>
|
||||||
<summary>Click here</summary>
|
<summary>Click here</summary>
|
||||||
|
|
||||||
- [Bubble Card](https://github.com/Clooos/Bubble-Card)
|
- [Bubble Card](https://github.com/Clooos/Bubble-Card) Backbone of the new mobile dashboard
|
||||||
- [Config Template Card](https://github.com/iantrich/config-template-card)
|
- [Config Template Card](https://github.com/iantrich/config-template-card)
|
||||||
- [Decluttering Card](https://github.com/custom-cards/decluttering-card)
|
- [Decluttering Card](https://github.com/custom-cards/decluttering-card)
|
||||||
- [Card Tools](https://github.com/thomasloven/lovelace-card-tools) (required for various other cards)
|
- [Card Tools](https://github.com/thomasloven/lovelace-card-tools) (required for various other cards)
|
||||||
@@ -86,7 +87,6 @@ ## HACS Lovelace Cards
|
|||||||
- [Auto Entities Card](https://github.com/thomasloven/lovelace-auto-entities)
|
- [Auto Entities Card](https://github.com/thomasloven/lovelace-auto-entities)
|
||||||
- [Slider Button Card](https://github.com/custom-cards/slider-button-card)
|
- [Slider Button Card](https://github.com/custom-cards/slider-button-card)
|
||||||
- [Weather Radar Card](https://github.com/Makin-Things/weather-radar-card)
|
- [Weather Radar Card](https://github.com/Makin-Things/weather-radar-card)
|
||||||
- [Platinum Weather Card](https://github.com/Makin-Things/platinum-weather-card) (Not currently in use, but VERY nicely done)
|
|
||||||
- [Stack In Card](https://github.com/custom-cards/stack-in-card)
|
- [Stack In Card](https://github.com/custom-cards/stack-in-card)
|
||||||
- [Paper Buttons Row](https://github.com/jcwillox/lovelace-paper-buttons-row)
|
- [Paper Buttons Row](https://github.com/jcwillox/lovelace-paper-buttons-row)
|
||||||
- [State Switch](https://github.com/thomasloven/lovelace-state-switch)
|
- [State Switch](https://github.com/thomasloven/lovelace-state-switch)
|
||||||
@@ -122,6 +122,7 @@ ## HACS Lovelace Cards
|
|||||||
- [Meteoalarm Card](https://github.com/MrBartusek/MeteoalarmCard)
|
- [Meteoalarm Card](https://github.com/MrBartusek/MeteoalarmCard)
|
||||||
- [Weather Chart Card](https://github.com/mlamberts78/weather-chart-card)
|
- [Weather Chart Card](https://github.com/mlamberts78/weather-chart-card)
|
||||||
- [Comfortable Environment Card](https://github.com/argaar/comfortable-environment-card)
|
- [Comfortable Environment Card](https://github.com/argaar/comfortable-environment-card)
|
||||||
|
- [Versatile Thermostat UI Card](https://github.com/jmcollin78/versatile-thermostat-ui-card)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
+53
-11
@@ -1210,14 +1210,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 179
|
brightness: 179
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@@ -1244,14 +1253,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@@ -1278,10 +1296,13 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
@@ -1342,14 +1363,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@@ -1376,14 +1406,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@@ -1441,14 +1480,17 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 204
|
brightness: 204
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
|
|||||||
+1243
-933
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,6 @@
|
|||||||
states.light.downstairs_bathroom_right,
|
states.light.downstairs_bathroom_right,
|
||||||
states.light.tina_lamp_top,
|
states.light.tina_lamp_top,
|
||||||
states.light.tina_lamp_side,
|
states.light.tina_lamp_side,
|
||||||
states.light.tina_desk_strip,
|
|
||||||
states.light.basement_tall_lamp,
|
states.light.basement_tall_lamp,
|
||||||
states.light.basement_short_lamp,
|
states.light.basement_short_lamp,
|
||||||
states.light.basement_stairwell,
|
states.light.basement_stairwell,
|
||||||
@@ -103,7 +102,6 @@
|
|||||||
states.light.downstairs_bathroom_right,
|
states.light.downstairs_bathroom_right,
|
||||||
states.light.tina_lamp_top,
|
states.light.tina_lamp_top,
|
||||||
states.light.tina_lamp_side,
|
states.light.tina_lamp_side,
|
||||||
states.light.tina_desk_strip
|
|
||||||
] %}
|
] %}
|
||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
- name: Second Floor Lights On
|
- name: Second Floor Lights On
|
||||||
@@ -170,7 +168,7 @@
|
|||||||
unit_of_measurement: ''
|
unit_of_measurement: ''
|
||||||
state: >-
|
state: >-
|
||||||
{% set compressors = [
|
{% set compressors = [
|
||||||
states.binary_sensor.emma_aircon_compressor,
|
states.binary_sensor.emma_bedroom_aircon_compressor,
|
||||||
states.binary_sensor.master_bedroom_aircon_compressor
|
states.binary_sensor.master_bedroom_aircon_compressor
|
||||||
] %}
|
] %}
|
||||||
{{ compressors | selectattr('state','eq','on') | list | count | int }}
|
{{ compressors | selectattr('state','eq','on') | list | count | int }}
|
||||||
@@ -179,7 +177,7 @@
|
|||||||
unit_of_measurement: ''
|
unit_of_measurement: ''
|
||||||
state: >-
|
state: >-
|
||||||
{% set fans = [
|
{% set fans = [
|
||||||
states.binary_sensor.emma_aircon_fan,
|
states.binary_sensor.emma_bedroom_aircon_fan,
|
||||||
states.binary_sensor.master_bedroom_aircon_fan
|
states.binary_sensor.master_bedroom_aircon_fan
|
||||||
] %}
|
] %}
|
||||||
{{ fans | selectattr('state','eq','on') | list | count | int }}
|
{{ fans | selectattr('state','eq','on') | list | count | int }}
|
||||||
@@ -198,11 +196,7 @@
|
|||||||
unit_of_measurement: ''
|
unit_of_measurement: ''
|
||||||
state: >-
|
state: >-
|
||||||
{% set climate = states.climate | selectattr('state','ne','off') | rejectattr('state','eq','unavailable') | rejectattr('state','eq','unknown') | list | count | int %}
|
{% set climate = states.climate | selectattr('state','ne','off') | rejectattr('state','eq','unavailable') | rejectattr('state','eq','unknown') | list | count | int %}
|
||||||
{% set fans = [
|
{{ climate | int }}
|
||||||
states.fan.emma_air_conditioner
|
|
||||||
] %}
|
|
||||||
{% set fans_on = fans | selectattr('state','eq','on') | list | count | int %}
|
|
||||||
{{ climate + fans_on | int }}
|
|
||||||
- name: Climate Devices Running
|
- name: Climate Devices Running
|
||||||
unique_id: 3c61c756-2934-4294-8085-7d3855b692dd
|
unique_id: 3c61c756-2934-4294-8085-7d3855b692dd
|
||||||
unit_of_measurement: ''
|
unit_of_measurement: ''
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
{% from 'speech.jinja' import greeting, today_is, sun_status %}
|
{% from 'speech.jinja' import greeting, today_is, sun_status %}
|
||||||
{% from 'weather.jinja' import weatherReport %}
|
{% from 'weather.jinja' import weatherReport %}
|
||||||
{% from 'sports.jinja' import sports_updates %}
|
{% from 'sports.jinja' import sports_updates %}
|
||||||
|
{% from 'server.jinja' import services_down %}
|
||||||
<p>
|
<p>
|
||||||
{{ greeting('date') }}
|
{{ greeting('date') }}
|
||||||
</p>
|
</p>
|
||||||
@@ -22,10 +23,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There are {{ states('sensor.services_down') }} services currently offline.
|
{{ services_down() }}
|
||||||
{% if states('sensor.services_down') | int > 0 %}
|
|
||||||
They are {{ state_attr('sensor.services_down','services') }}.
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -98,12 +98,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
||||||
Today, you will be picked up from school by {{ states('input_text.kallen_pickup') }}.
|
Today, you will be picked up from school by {{ states('input_text.kallen_pickup') }}.
|
||||||
{% elif is_state('input_boolean.work_today','off') %}
|
|
||||||
Today, you will be picked up from school by your parents.
|
|
||||||
{% else %}
|
|
||||||
Today, you will be picked up from school by your dad.
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<s>Pickup today will be at {{ input_datetime_read('input_datetime.kallen_school_day_end') }}</s>
|
|
||||||
{% if count_the_days('input_datetime.school_last_day') | int == 0 -%}
|
{% if count_the_days('input_datetime.school_last_day') | int == 0 -%}
|
||||||
But today is the last day of School!
|
But today is the last day of School!
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{% from 'formatting.jinja' import cleanup %}
|
{% from 'formatting.jinja' import cleanup %}
|
||||||
{%- macro getReport() -%}
|
{%- macro getReport() -%}
|
||||||
{% from 'speech.jinja' import greeting, dadjoke, inspirational_quote, today_is %}
|
{% 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 'easy_time.jinja' import count_the_days %}
|
||||||
{% from 'weather.jinja' import weatherReport %}
|
{% from 'weather.jinja' import weatherReport %}
|
||||||
{% from 'sports.jinja' import sports_updates %}
|
{% from 'sports.jinja' import sports_updates %}
|
||||||
@@ -14,6 +14,10 @@
|
|||||||
{{ today_is() }}
|
{{ today_is() }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ morning_annc('full','tts') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ weatherReport('full','tts','morning') }}
|
{{ weatherReport('full','tts','morning') }}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -61,20 +61,24 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_overnight','off') %}
|
{% if is_state('input_boolean.kallen_overnight','off') %}
|
||||||
{% if not is_state('input_select.scheduled_climate_mode_kallen_fan','N/A') %}
|
{% if not is_state('input_select.scheduled_climate_mode_kallen_bedroom','N/A') %}
|
||||||
{% if is_state('input_select.scheduled_climate_mode_kallen_fan','Fan') and is_state('fan.kallen_bedroom_fan','off') %}
|
{% 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') }}. "
|
"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') }}. "
|
"Collin's white noise generator will activate at {{ input_datetime_read('input_datetime.kallen_bedtime') }}. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
"Collin's room will be left alone, as he is spending the night elsewhere tonight. "
|
"Collin's room will be left alone, as he is spending the night elsewhere tonight. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if states('input_select.scheduled_climate_mode_emma_aircon') != 'N/A' %}
|
{% if states('input_select.scheduled_climate_mode_emma_bedroom_aircon') != 'N/A' %}
|
||||||
{% if is_state('input_select.scheduled_climate_mode_emma_aircon','AC') and is_state('fan.emma_air_conditioner','off') %}
|
{% if is_state('input_select.scheduled_climate_mode_emma_bedroom_aircon','AC') and is_state('input_boolean.hot_day','on') %}
|
||||||
"Emma's air conditioner will be activated at {{ input_datetime_read('input_datetime.emma_bedroom_cooling') }}. "
|
"Today was a hot day, so Emma's bedroom air conditioner will start cooling a bit earlier tonight 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_aircon','AC') %}
|
||||||
|
"Emma's bedroom air conditioner will start cooling at {{ input_datetime_read('input_datetime.emma_bedroom_cooling') }}. "
|
||||||
|
{% elif is_state('input_select.scheduled_climate_mode_emma_bedroom_aircon','Fan') %}
|
||||||
|
"Emma's bedroom air conditioner will activate fan only mode at {{ input_datetime_read('input_datetime.emma_bedroom_cooling') }}. "
|
||||||
|
{% 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') }}. "
|
"Emma's white noise generator will activate at {{ input_datetime_read('input_datetime.emma_bedtime') }}. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -75,28 +75,39 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if (states('sensor.climate_devices_installed') | int) > 0 %}
|
{% if (states('sensor.climate_devices_installed') | int) > 0 %}
|
||||||
{% if is_state('input_boolean.master_bedroom_aircon_installed','on') %}
|
{% if is_state('input_boolean.master_bedroom_aircon_installed','on') %}
|
||||||
"the master bedroom temperature is {{ states('sensor.master_bedroom_aircon_indoor_temperature') | int }} degrees. "
|
"the master bedroom temperature is {{ states('sensor.master_bedroom_temperature') | int }} degrees. "
|
||||||
{% if not is_state('climate.master_bedroom_aircon','off') %}
|
{% if not is_state('climate.master_bedroom_aircon','off') %}
|
||||||
{% if is_state('climate.master_bedroom_aircon','cool') %}
|
{% if is_state('climate.master_bedroom_aircon','cool') %}
|
||||||
"and the master bedroom air conditioner is set for cooling to {{ state_attr('climate.master_bedroom_aircon','temperature') }} degrees. "
|
"and the master bedroom air conditioner is set for cooling to {{ state_attr('climate.master_bedroom_aircon','temperature') }} degrees. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','fan_only') %}
|
{% elif is_state('climate.master_bedroom_aircon','fan_only') %}
|
||||||
"and the master bedroom air conditioner is in fan only mode. "
|
"and the master bedroom air conditioner is in fan only mode. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','dry') %}
|
{% elif is_state('climate.master_bedroom_aircon','dry') %}
|
||||||
"and the master bedroom air conditioner is moonlighting as a dehumidifier. "
|
"and the master bedroom air conditioner is moonlighting as a dehumidifier. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','auto') %}
|
{% elif is_state('climate.master_bedroom_aircon','auto') %}
|
||||||
"and the master bedroom air conditioner is making its own decisions. Be afraid, be very afraid. "
|
"and the master bedroom air conditioner is making its own decisions. Be afraid, be very afraid. "
|
||||||
{% else %}
|
{% else %}
|
||||||
"and the master bedroom air conditioner is currently not speaking to me. Was it something I said? "
|
"and the master bedroom air conditioner is currently not speaking to me. Was it something I said? "
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.master_bedroom_aircon_installed','off') %}
|
{% endif %}
|
||||||
"There is no air conditioner or temperature sensor installed in the master bedroom. "
|
|
||||||
{% endif %}
|
|
||||||
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') and is_state('fan.emma_air_conditioner','on') %}
|
|
||||||
"Emma's air conditioner is {{ states('fan.emma_air_conditioner') }}. "
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
|
||||||
|
"the temperature in Emma's bedroom is {{ states('sensor.emma_bedroom_temperature') | int }} degrees. "
|
||||||
|
{% if not is_state('climate.emma_bedroom_aircon','off') %}
|
||||||
|
{% if is_state('climate.emma_bedroom_aircon','cool') %}
|
||||||
|
"and Emma's bedroom air conditioner is set for cooling to {{ state_attr('climate.emma_bedroom_aircon','temperature') }} degrees. "
|
||||||
|
{% elif is_state('climate.emma_bedroom_aircon','fan_only') %}
|
||||||
|
"and Emma's bedroom air conditioner is in fan only mode. "
|
||||||
|
{% elif is_state('climate.emma_bedroom_aircon','dry') %}
|
||||||
|
"and Emma's bedroom air conditioner is moonlighting as a dehumidifier. "
|
||||||
|
{% elif is_state('climate.emma_bedroom_aircon','auto') %}
|
||||||
|
"and Emma's bedroom air conditioner is making its own decisions. Be afraid, be very afraid. "
|
||||||
|
{% else %}
|
||||||
|
"and Emma's bedroom air conditioner is currently not speaking to me. Was it something I said? "
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -117,7 +128,7 @@
|
|||||||
"Tina has work today. "
|
"Tina has work today. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_at_school','on') %}
|
{% if is_state('input_boolean.kallen_at_school','on') %}
|
||||||
"Collin is at school right now. His pickup time will be at {{ input_datetime_read('input_datetime.kallen_school_day_end') }}. "
|
"Collin is at school right now. His school day ends at {{ input_datetime_read('input_datetime.kallen_school_day_end') }}. "
|
||||||
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||||
"Collin has school today. "
|
"Collin has school today. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -0,0 +1,429 @@
|
|||||||
|
# Bubble Modules
|
||||||
|
#
|
||||||
|
# How to use:
|
||||||
|
#
|
||||||
|
# - To edit or add modules (global styles and templates), first copy the
|
||||||
|
# "bubble-modules.yaml" file from "/www/community/Bubble-Card/" (if installed via HACS)
|
||||||
|
# to "/www/bubble/" (you'll need to create this folder).
|
||||||
|
#
|
||||||
|
# Then add these lines in your "configuration.yaml" under "homeassistant:":
|
||||||
|
#
|
||||||
|
# homeassistant:
|
||||||
|
# allowlist_external_dirs:
|
||||||
|
# - /config/www/bubble
|
||||||
|
# # This step is not needed if you already have this line:
|
||||||
|
# - /config/www
|
||||||
|
#
|
||||||
|
# Then save and restart Home Assistant.
|
||||||
|
#
|
||||||
|
# - After making changes, you need to refresh your page to apply the modifications.
|
||||||
|
#
|
||||||
|
# - Styles and templates defined under "default:" are applied globally to all cards by default.
|
||||||
|
#
|
||||||
|
# - See the final example in this file for further details on how to create a module.
|
||||||
|
#
|
||||||
|
# - You can share/find modules here:
|
||||||
|
# github.com/Clooos/Bubble-Card/discussions/categories/share-your-modules
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
name: Default
|
||||||
|
description: Empty and enabled by default. Move your styles/templates here in the <code>bubble-modules.yaml</code> file to apply them to all cards.
|
||||||
|
code: |
|
||||||
|
/* CSS or JS templates (see examples below) */
|
||||||
|
|
||||||
|
|
||||||
|
home-assistant-default:
|
||||||
|
name: Home Assistant default styling
|
||||||
|
version: "v1.1"
|
||||||
|
creator: "Clooos"
|
||||||
|
link: "https://github.com/Clooos/Bubble-Card/discussions/1230"
|
||||||
|
description: This module applies Home Assistant’s default styling to Bubble Card. To set it as the default, move it under <code>default:</code> in the <code>bubble-modules.yaml</code> file.
|
||||||
|
code: |
|
||||||
|
:host {
|
||||||
|
--bubble-button-accent-color: rgba(0,140,255,0.3); /* Edit this color if needed */
|
||||||
|
--bubble-main-background-color: var(--ha-card-background, var(--card-background-color, #fff));
|
||||||
|
--bubble-border-radius: var(--ha-card-border-radius, 12px);
|
||||||
|
--bubble-icon-border-radius: 32px;
|
||||||
|
--bubble-button-border-radius: var(--bubble-border-radius);
|
||||||
|
--bubble-climate-button-background-color: var(--bubble-icon-background-color);
|
||||||
|
--bubble-border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0));
|
||||||
|
--bubble-secondary-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-container {
|
||||||
|
-webkit-backdrop-filter: var(--ha-card-backdrop-filter, none);
|
||||||
|
backdrop-filter: var(--ha-card-backdrop-filter, none);
|
||||||
|
box-shadow: var(--ha-card-box-shadow, none);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-icon-container,
|
||||||
|
.large .bubble-icon-container {
|
||||||
|
--mdc-icon-size: 22px;
|
||||||
|
min-width: 36px !important;
|
||||||
|
min-height: 36px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large .bubble-cover-card-container > .bubble-buttons {
|
||||||
|
--bubble-cover-main-background-color: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-range-fill {
|
||||||
|
--bubble-accent-color: var(--bubble-button-accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-sub-button.background-on::before,
|
||||||
|
.bubble-sub-button.background-off::before,
|
||||||
|
.bubble-temperature-container::before,
|
||||||
|
.bubble-icon-container::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: var(--control-number-buttons-background-opacity, .2);
|
||||||
|
border-radius: var(--bubble-border-radius);
|
||||||
|
background: var(--control-number-buttons-background-color, var(--disabled-color));
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-on {
|
||||||
|
--bubble-icon-background-color: var(--view-background,var(--lovelace-background,var(--primary-background-color)));
|
||||||
|
transition: all ease-in 0.3s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-icon-container::before {
|
||||||
|
background: var(--state-inactive-color);
|
||||||
|
border-radius: var(--bubble-icon-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-sub-button {
|
||||||
|
border: 0px solid transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-icon-select-arrow {
|
||||||
|
right: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large .bubble-icon-container {
|
||||||
|
margin-left: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-state {
|
||||||
|
opacity: 1;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: .4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(.bubble-separator) > .bubble-name {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
letter-spacing: 0.1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-pop-up-background {
|
||||||
|
filter: brightness(0.96); /* Improve pop-up background contrast */
|
||||||
|
--bubble-pop-up-border-radius: calc(var(--ha-card-border-radius, 12px) * 1.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bubble-header-container {
|
||||||
|
--bubble-secondary-background-color: var(--background-color-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
ha-select {
|
||||||
|
--bubble-list-item-accent-color: none !important;
|
||||||
|
--mdc-theme-surface: var(--card-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
mwc-list-item[selected] {
|
||||||
|
color: inherit !important;
|
||||||
|
--mdc-ripple-press-opacity: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
mwc-list-item[selected]::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
opacity: 0.24;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
icon_container_color:
|
||||||
|
name: "Example: Customize the icon container color"
|
||||||
|
version: "v1.1"
|
||||||
|
creator: "Clooos"
|
||||||
|
link: "https://github.com/Clooos/Bubble-Card/discussions/1231"
|
||||||
|
|
||||||
|
unsupported:
|
||||||
|
- horizontal-buttons-stack
|
||||||
|
- separator
|
||||||
|
|
||||||
|
description: |
|
||||||
|
A list of predefined colors to customize the icon container color.
|
||||||
|
Configure this module via the editor or in YAML, for example:
|
||||||
|
<br><br>
|
||||||
|
<code-block><pre>
|
||||||
|
icon_container_color:
|
||||||
|
color: light-blue
|
||||||
|
</pre></code-block>
|
||||||
|
|
||||||
|
code: |
|
||||||
|
.bubble-icon-container {
|
||||||
|
opacity: 1 !important;
|
||||||
|
background: var(--${this.config.icon_container_color?.color}-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
editor:
|
||||||
|
- name: color
|
||||||
|
label: "Color"
|
||||||
|
selector:
|
||||||
|
ui_color:
|
||||||
|
include_none: true
|
||||||
|
|
||||||
|
|
||||||
|
get_state_attribute:
|
||||||
|
|
||||||
|
# Some informations about your module (this is shown in the editor)
|
||||||
|
name: "Advanced example: Get state/attribute from other entities"
|
||||||
|
version: "v1.1"
|
||||||
|
creator: "Clooos"
|
||||||
|
link: "https://github.com/Clooos/Bubble-Card"
|
||||||
|
|
||||||
|
# Disable this module for unsupported "card_type"
|
||||||
|
unsupported:
|
||||||
|
- horizontal-buttons-stack
|
||||||
|
- separator
|
||||||
|
|
||||||
|
# The description have HTML support like in this example. This model is my favorite.
|
||||||
|
description: |
|
||||||
|
Get state/attribute from other entities and replace the default state/attribute field.
|
||||||
|
<img class="example" src="https://github.com/Clooos/Bubble-Card/blob/main/img/get_state_template_example.png?raw=true" />
|
||||||
|
Configure this module via the editor or in YAML, for example:
|
||||||
|
<br><br>
|
||||||
|
<code-block><pre>
|
||||||
|
get_state_attribute:
|
||||||
|
- entity: weather.home
|
||||||
|
- entity: sensor.weather_station
|
||||||
|
attribute: humidity
|
||||||
|
- entity: sensor.weather_station
|
||||||
|
attribute: temperature
|
||||||
|
</pre></code-block>
|
||||||
|
<br>
|
||||||
|
<b>If it doesn't work, make sure at least one of "Show state" or "Show attribute" is turned on in your card configuration.</b>
|
||||||
|
|
||||||
|
# Code blocks must always start with ${(() => { and end with })()}
|
||||||
|
# Inline codes must always start with ${ and end with }
|
||||||
|
#
|
||||||
|
# This section only supports JavaScript and/or CSS
|
||||||
|
code: |
|
||||||
|
${(() => {
|
||||||
|
// Retrieve the configuration or use an empty array by default
|
||||||
|
const config = this.config.get_state_attribute || [];
|
||||||
|
|
||||||
|
// Format the retrieved value from the entity for each entry
|
||||||
|
const values = config
|
||||||
|
.map(cfg => {
|
||||||
|
const entity = hass.states[cfg.entity];
|
||||||
|
if (entity) {
|
||||||
|
return cfg.attribute
|
||||||
|
? hass.formatEntityAttributeValue(entity, cfg.attribute)
|
||||||
|
: hass.formatEntityState(entity);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
})
|
||||||
|
.filter(value => value !== null); // Remove null values
|
||||||
|
|
||||||
|
// Update the DOM element with the class 'bubble-state'
|
||||||
|
// displaying values separated by ' • '
|
||||||
|
card.querySelector('.bubble-state').innerText = values.join(' • ');
|
||||||
|
})()}
|
||||||
|
|
||||||
|
# The editor part can be tricky, but improves modules a lot!
|
||||||
|
#
|
||||||
|
# In this example, it will create your configuration to this variable:
|
||||||
|
# this.config.get_state_attribute
|
||||||
|
#
|
||||||
|
# To understand what you can do here, take a look at the "ha-form" sources here:
|
||||||
|
# https://github.com/home-assistant/frontend/tree/03a415beff6e6f9c87a95287804f6c03c8fef3d5/src/components/ha-form
|
||||||
|
#
|
||||||
|
# And here for the selectors:
|
||||||
|
# https://github.com/home-assistant/frontend/blob/03a415beff6e6f9c87a95287804f6c03c8fef3d5/src/data/selector.ts
|
||||||
|
#
|
||||||
|
# I will try to document that for clarity!
|
||||||
|
editor:
|
||||||
|
- type: expandable
|
||||||
|
title: "Select entities and attributes"
|
||||||
|
icon: "mdi:list-box-outline"
|
||||||
|
schema:
|
||||||
|
- name: '0'
|
||||||
|
type: expandable
|
||||||
|
title: "Entity 1"
|
||||||
|
schema:
|
||||||
|
- name: entity
|
||||||
|
label: "Entity"
|
||||||
|
selector:
|
||||||
|
entity: {}
|
||||||
|
- name: attribute
|
||||||
|
label: "Attribute"
|
||||||
|
selector:
|
||||||
|
attribute: {}
|
||||||
|
- name: '1'
|
||||||
|
type: expandable
|
||||||
|
title: "Entity 2"
|
||||||
|
schema:
|
||||||
|
- name: entity
|
||||||
|
label: "Entity"
|
||||||
|
selector:
|
||||||
|
entity: {}
|
||||||
|
- name: attribute
|
||||||
|
label: "Attribute"
|
||||||
|
selector:
|
||||||
|
attribute: {}
|
||||||
|
- name: '2'
|
||||||
|
type: expandable
|
||||||
|
title: "Entity 3"
|
||||||
|
schema:
|
||||||
|
- name: entity
|
||||||
|
label: "Entity"
|
||||||
|
selector:
|
||||||
|
entity: {}
|
||||||
|
- name: attribute
|
||||||
|
label: "Attribute"
|
||||||
|
selector:
|
||||||
|
attribute: {}
|
||||||
|
- name: '3'
|
||||||
|
type: expandable
|
||||||
|
title: "Entity 4"
|
||||||
|
schema:
|
||||||
|
- name: entity
|
||||||
|
label: "Entity"
|
||||||
|
selector:
|
||||||
|
entity: {}
|
||||||
|
- name: attribute
|
||||||
|
label: "Attribute"
|
||||||
|
selector:
|
||||||
|
attribute: {}
|
||||||
|
|
||||||
|
# Temperature
|
||||||
|
temperature_colouring:
|
||||||
|
name: "Temperature colouring"
|
||||||
|
version: "v1.0"
|
||||||
|
creator: "Timmy"
|
||||||
|
|
||||||
|
unsupported:
|
||||||
|
- horizontal-buttons-stack
|
||||||
|
- media-player
|
||||||
|
|
||||||
|
description: |
|
||||||
|
This module provides dynamic colouring based on temperature sensor values.
|
||||||
|
Colour adjustments are applied to selected sub-buttons and/or state display elements.
|
||||||
|
|
||||||
|
Required entities:
|
||||||
|
- A temperature sensor
|
||||||
|
|
||||||
|
You can configure which elements should receive dynamic colouring:
|
||||||
|
- Sub-buttons (1-6)
|
||||||
|
- State display
|
||||||
|
|
||||||
|
Example YAML configuration:
|
||||||
|
|
||||||
|
temperature_colouring:
|
||||||
|
temperature_sensor: sensor.kitchen_temperature
|
||||||
|
elements:
|
||||||
|
sub_buttons: [1, 3, 5] # Apply to sub-buttons 1, 3, and 5
|
||||||
|
state_display: true # Apply to state display element
|
||||||
|
|
||||||
|
code: |
|
||||||
|
${(() => {
|
||||||
|
const temperature = parseFloat(hass?.states[this.config?.temperature_colouring?.temperature_sensor]?.state || 0);
|
||||||
|
const elements = this.config?.temperature_colouring?.elements || {};
|
||||||
|
|
||||||
|
let color;
|
||||||
|
if (temperature <= 32) {
|
||||||
|
color = 'rgba(0,0,139,0.8)';
|
||||||
|
} else if (temperature <= 41) {
|
||||||
|
color = 'rgba(0,71,171,0.8)';
|
||||||
|
} else if (temperature <= 50) {
|
||||||
|
color = 'rgba(30,144,255,0.8)';
|
||||||
|
} else if (temperature <= 61) {
|
||||||
|
color = 'rgba(100,149,237,0.8)';
|
||||||
|
} else if (temperature <= 68) {
|
||||||
|
color = 'rgba(60,179,113,0.8)';
|
||||||
|
} else if (temperature <= 73) {
|
||||||
|
color = 'rgba(152,251,152,0.8)';
|
||||||
|
} else if (temperature <= 78) {
|
||||||
|
color = 'rgba(255,223,186,0.8)';
|
||||||
|
} else if (temperature <= 80) {
|
||||||
|
color = 'rgba(255,215,0,0.8)';
|
||||||
|
} else if (temperature <= 95) {
|
||||||
|
color = 'rgba(178,34,34,0.8)';
|
||||||
|
} else {
|
||||||
|
color = 'rgba(139,0,0,0.8)';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply colour to selected sub-buttons
|
||||||
|
if (elements.sub_buttons) {
|
||||||
|
const subButtons = Array.isArray(elements.sub_buttons) ? elements.sub_buttons : [];
|
||||||
|
subButtons.forEach(num => {
|
||||||
|
if (num >= 1 && num <= 6) {
|
||||||
|
const subButton = card?.querySelector(`.bubble-sub-button-${num} ha-icon`);
|
||||||
|
if (subButton) {
|
||||||
|
subButton.style.color = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply colour to state display if enabled
|
||||||
|
if (elements.state_display) {
|
||||||
|
const stateElement = card?.querySelector('.bubble-state.state.display-state');
|
||||||
|
if (stateElement) {
|
||||||
|
stateElement.style.color = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''; // No CSS needed as we're applying styles directly to elements
|
||||||
|
})()}
|
||||||
|
|
||||||
|
editor:
|
||||||
|
- type: expandable
|
||||||
|
title: "Entity Configuration"
|
||||||
|
icon: "mdi:thermometer"
|
||||||
|
schema:
|
||||||
|
- name: temperature_sensor
|
||||||
|
label: "Temperature Sensor (Required)"
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
device_class: temperature
|
||||||
|
required: true
|
||||||
|
- name: elements
|
||||||
|
type: grid
|
||||||
|
schema:
|
||||||
|
- name: sub_buttons
|
||||||
|
label: "Sub-buttons to Style"
|
||||||
|
selector:
|
||||||
|
select:
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- label: "Sub-button 1"
|
||||||
|
value: 1
|
||||||
|
- label: "Sub-button 2"
|
||||||
|
value: 2
|
||||||
|
- label: "Sub-button 3"
|
||||||
|
value: 3
|
||||||
|
- label: "Sub-button 4"
|
||||||
|
value: 4
|
||||||
|
- label: "Sub-button 5"
|
||||||
|
value: 5
|
||||||
|
- label: "Sub-button 6"
|
||||||
|
value: 6
|
||||||
|
- name: state_display
|
||||||
|
label: "State Display"
|
||||||
|
selector:
|
||||||
|
boolean: {}
|
||||||
Reference in New Issue
Block a user