Compare commits
36 Commits
2025.1.4
...
response_v
Author | SHA1 | Date | |
---|---|---|---|
b48380d152
|
|||
d649d0fa5c
|
|||
abd30f7ff2
|
|||
c32c751e97
|
|||
177c4a9a51
|
|||
ec8e22513c
|
|||
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
|
1
.HA_VERSION
Normal file
1
.HA_VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
2025.3.3
|
20
.gitignore
vendored
20
.gitignore
vendored
@ -3,23 +3,20 @@
|
|||||||
/.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/
|
/lightwand/
|
||||||
@ -27,7 +24,6 @@
|
|||||||
# 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
|
||||||
@ -72,12 +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
|
|
||||||
.codegpt
|
|
187
automations.yaml
187
automations.yaml
@ -125,7 +125,6 @@
|
|||||||
- light.basement_studio_lights
|
- light.basement_studio_lights
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.stairwell_led_strip
|
- light.stairwell_led_strip
|
||||||
data:
|
data:
|
||||||
color_name: red
|
color_name: red
|
||||||
@ -152,7 +151,6 @@
|
|||||||
- light.master_bedroom_lights
|
- light.master_bedroom_lights
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_desk_strip
|
|
||||||
data:
|
data:
|
||||||
flash: long
|
flash: long
|
||||||
- alias: Send TTS notification to the common areas
|
- alias: Send TTS notification to the common areas
|
||||||
@ -1151,10 +1149,23 @@
|
|||||||
entity_id: switch.adaptive_lighting_master_bedroom
|
entity_id: switch.adaptive_lighting_master_bedroom
|
||||||
action: switch.turn_off
|
action: switch.turn_off
|
||||||
brightness_down_short_action:
|
brightness_down_short_action:
|
||||||
- data: {}
|
- if:
|
||||||
target:
|
- condition: state
|
||||||
entity_id: switch.adaptive_lighting_master_bedroom
|
entity_id: light.master_bedroom_lights
|
||||||
action: switch.turn_off
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- action: input_select.select_option
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
option: Nightlight
|
||||||
|
target:
|
||||||
|
entity_id: input_select.master_bedroom_scenes
|
||||||
|
else:
|
||||||
|
- data: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.adaptive_lighting_master_bedroom
|
||||||
|
action: switch.turn_off
|
||||||
|
alias: Activate nightlight if lights are off, otherwise act normal
|
||||||
brightness_down_long_action:
|
brightness_down_long_action:
|
||||||
- data: {}
|
- data: {}
|
||||||
target:
|
target:
|
||||||
@ -1299,16 +1310,16 @@
|
|||||||
input:
|
input:
|
||||||
dimmer_device: 40c14ccfe958d21d75888a968bbbf908
|
dimmer_device: 40c14ccfe958d21d75888a968bbbf908
|
||||||
on_short_action:
|
on_short_action:
|
||||||
- service: input_boolean.toggle
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tina_desk_lights
|
entity_id: light.tina_desk_lights
|
||||||
|
action: light.turn_on
|
||||||
on_long_action:
|
on_long_action:
|
||||||
- service: input_select.select_option
|
- data:
|
||||||
data:
|
|
||||||
option: Reset
|
option: Reset
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.tina_desk_scenes
|
entity_id: input_select.tina_desk_scenes
|
||||||
|
action: input_select.select_option
|
||||||
off_short_action: []
|
off_short_action: []
|
||||||
off_long_action: []
|
off_long_action: []
|
||||||
- id: '1693174941627'
|
- id: '1693174941627'
|
||||||
@ -1574,7 +1585,6 @@
|
|||||||
- light.living_room_color_3
|
- light.living_room_color_3
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.stairwell_led_strip
|
- light.stairwell_led_strip
|
||||||
- light.basement_stairwell
|
- light.basement_stairwell
|
||||||
- light.basement_tall_lamp
|
- light.basement_tall_lamp
|
||||||
@ -1590,7 +1600,6 @@
|
|||||||
- light.living_room_color_3
|
- light.living_room_color_3
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.stairwell_led_strip
|
- light.stairwell_led_strip
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
@ -1611,7 +1620,6 @@
|
|||||||
entity_id:
|
entity_id:
|
||||||
- light.living_room_lights
|
- light.living_room_lights
|
||||||
- light.tina_lamp
|
- light.tina_lamp
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.stairwell_led_strip
|
- light.stairwell_led_strip
|
||||||
- light.basement_studio_lights
|
- light.basement_studio_lights
|
||||||
data:
|
data:
|
||||||
@ -1623,7 +1631,6 @@
|
|||||||
entity_id:
|
entity_id:
|
||||||
- light.living_room_lights
|
- light.living_room_lights
|
||||||
- light.tina_lamp
|
- light.tina_lamp
|
||||||
- light.tina_desk_strip
|
|
||||||
- light.stairwell_led_strip
|
- light.stairwell_led_strip
|
||||||
data:
|
data:
|
||||||
color_name: red
|
color_name: red
|
||||||
@ -1695,52 +1702,25 @@
|
|||||||
alias: Tina Desk Lights Handler
|
alias: Tina Desk Lights Handler
|
||||||
description: Handles turning on the desk lights with smart scene selection and also
|
description: Handles turning on the desk lights with smart scene selection and also
|
||||||
turning them off
|
turning them off
|
||||||
trigger:
|
triggers:
|
||||||
- platform: state
|
- entity_id: input_select.tina_desk_scenes
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
from: 'off'
|
|
||||||
to: 'on'
|
|
||||||
id: toggle-on
|
|
||||||
alias: Toggle On
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
from: 'on'
|
|
||||||
to: 'off'
|
|
||||||
id: toggle-off
|
|
||||||
alias: Toggle Off
|
|
||||||
- platform: state
|
|
||||||
entity_id: input_select.tina_desk_scenes
|
|
||||||
to: Reset
|
to: Reset
|
||||||
id: reset
|
id: reset
|
||||||
alias: Reset
|
alias: Reset
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id: light.tina_desk_lights
|
- entity_id: binary_sensor.tina_desktop_on
|
||||||
from: 'on'
|
|
||||||
to: 'off'
|
|
||||||
id: lights-off
|
|
||||||
alias: Lights Off
|
|
||||||
- platform: state
|
|
||||||
entity_id: light.tina_desk_lights
|
|
||||||
from: 'off'
|
|
||||||
to: 'on'
|
|
||||||
id: lights-on
|
|
||||||
alias: Lights On
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.tina_desktop_on
|
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
to: 'on'
|
||||||
id: computer-on
|
id: computer-on
|
||||||
alias: Computer On
|
alias: Computer On
|
||||||
condition: []
|
trigger: state
|
||||||
action:
|
conditions: []
|
||||||
|
actions:
|
||||||
- alias: Reset
|
- alias: Reset
|
||||||
if:
|
if:
|
||||||
- alias: Triggered by Toggle On, Reset, or Computer On
|
- alias: Triggered by Reset or Computer On
|
||||||
condition: or
|
condition: or
|
||||||
conditions:
|
conditions:
|
||||||
- condition: trigger
|
|
||||||
id: toggle-on
|
|
||||||
alias: Toggle On
|
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: reset
|
id: reset
|
||||||
alias: Reset
|
alias: Reset
|
||||||
@ -1748,52 +1728,12 @@
|
|||||||
id: computer-on
|
id: computer-on
|
||||||
alias: Computer On
|
alias: Computer On
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- target:
|
||||||
target:
|
|
||||||
entity_id: input_select.tina_desk_scenes
|
entity_id: input_select.tina_desk_scenes
|
||||||
data:
|
data:
|
||||||
option: '{{ states(''sensor.tina_desk_scene'') }}'
|
option: '{{ states(''sensor.tina_desk_scene'') }}'
|
||||||
alias: Reset to appropriate default scene
|
alias: Reset to appropriate default scene
|
||||||
- if:
|
action: input_select.select_option
|
||||||
- condition: trigger
|
|
||||||
id: toggle-off
|
|
||||||
then:
|
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: light.tina_desk_lights
|
|
||||||
data: {}
|
|
||||||
alias: Toggle Off
|
|
||||||
- if:
|
|
||||||
- condition: trigger
|
|
||||||
id: lights-off
|
|
||||||
then:
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
state: 'on'
|
|
||||||
then:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
data: {}
|
|
||||||
alias: Lights Off
|
|
||||||
- if:
|
|
||||||
- condition: trigger
|
|
||||||
id: lights-on
|
|
||||||
then:
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
state: 'off'
|
|
||||||
then:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.tina_desk_lights
|
|
||||||
data: {}
|
|
||||||
- delay:
|
|
||||||
seconds: 2
|
|
||||||
alias: Prevent script from re-triggering when boolean is turned on
|
|
||||||
alias: Lights On
|
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1696286403914'
|
- id: '1696286403914'
|
||||||
alias: Basement Lights Handling
|
alias: Basement Lights Handling
|
||||||
@ -6094,3 +6034,66 @@
|
|||||||
entity_id: input_datetime.minnesota_wild_start
|
entity_id: input_datetime.minnesota_wild_start
|
||||||
alias: Minnesota Wild Start
|
alias: Minnesota Wild Start
|
||||||
mode: restart
|
mode: restart
|
||||||
|
- id: '1740098474888'
|
||||||
|
alias: Tina Pain Meds Handler
|
||||||
|
description: ''
|
||||||
|
triggers:
|
||||||
|
- at: input_datetime.tina_ibuprofen_notify
|
||||||
|
id: ibuprofen-notify
|
||||||
|
alias: Ibuprofen Notify
|
||||||
|
trigger: time
|
||||||
|
- alias: Tylenol Notify
|
||||||
|
at: input_datetime.tina_tylenol_notify
|
||||||
|
id: tylenol-notify
|
||||||
|
trigger: time
|
||||||
|
- entity_id:
|
||||||
|
- input_boolean.tina_ibuprofen_taken
|
||||||
|
from: 'off'
|
||||||
|
to: 'on'
|
||||||
|
id: ibuprofen-taken
|
||||||
|
alias: Ibuprofen Taken
|
||||||
|
trigger: state
|
||||||
|
- alias: Tylenol Taken
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.tina_tylenol_taken
|
||||||
|
from: 'off'
|
||||||
|
to: 'on'
|
||||||
|
id: tylenol-taken
|
||||||
|
trigger: state
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- ibuprofen-notify
|
||||||
|
- ibuprofen-taken
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.tina_ibuprofen_active
|
||||||
|
state: 'on'
|
||||||
|
alias: Ibuprofen
|
||||||
|
sequence:
|
||||||
|
- data:
|
||||||
|
reason: '{{ trigger.id }}'
|
||||||
|
alias: Call ibuprofen script
|
||||||
|
action: script.tina_ibuprofen
|
||||||
|
- conditions:
|
||||||
|
- condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- tylenol-notify
|
||||||
|
- tylenol-taken
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.tina_tylenol_active
|
||||||
|
state: 'on'
|
||||||
|
alias: Tylenol
|
||||||
|
sequence:
|
||||||
|
- data:
|
||||||
|
reason: '{{ trigger.id }}'
|
||||||
|
alias: Call tylenol script
|
||||||
|
action: script.tina_tylenol
|
||||||
|
mode: parallel
|
||||||
|
max: 10
|
||||||
|
@ -321,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:
|
||||||
@ -498,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
|
||||||
|
@ -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 %}
|
||||||
|
@ -283,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
|
||||||
@ -320,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: >
|
||||||
|
4
packages/basement_studio.yaml
Normal file
4
packages/basement_studio.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
input_boolean:
|
||||||
|
do_not_enter_basement_studio:
|
||||||
|
name: Do Not Enter - Basement Studio
|
||||||
|
icon: mdi:minus-circle
|
@ -2,19 +2,23 @@ template:
|
|||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Emma Aircon - Compressor
|
- name: Emma 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_air_conditioner_power') | int > 150 }}"
|
||||||
|
availability: "{{ states('fan.emma_air_conditioner') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Emma Aircon - Fan
|
- name: Emma 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_air_conditioner_power') | int > 20 }}"
|
||||||
|
availability: "{{ states('fan.emma_air_conditioner') 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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
@ -819,7 +816,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]
|
||||||
|
@ -980,7 +980,33 @@ script:
|
|||||||
- critical
|
- critical
|
||||||
variables:
|
variables:
|
||||||
voice: "{{ states('input_select.jarvis_voice') }}"
|
voice: "{{ states('input_select.jarvis_voice') }}"
|
||||||
|
groupname: >-
|
||||||
|
{% if who == 'kids_bedrooms' %}
|
||||||
|
kids_bedroom_speakers
|
||||||
|
{% elif who == 'all_bedrooms' %}
|
||||||
|
all_bedroom_speakers
|
||||||
|
{% elif who == 'basement' and is_state('input_boolean.studio_quiet','on') %}
|
||||||
|
alexa_no_basement
|
||||||
|
{% else %}
|
||||||
|
{{ who }}
|
||||||
|
{% endif %}
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: script.get_room_speakers
|
||||||
|
data:
|
||||||
|
room: "{{ who }}"
|
||||||
|
response_variable: "get_room_speakers"
|
||||||
|
- choose:
|
||||||
|
- conditions: "{{ who in ['everywhere','Everywhere'] }}"
|
||||||
|
sequence:
|
||||||
|
- service: script.get_all_speakers
|
||||||
|
response_variable: "get_all_speakers"
|
||||||
|
- conditions: "{{ get_room_speakers.jarvis_tts == 'group' }}"
|
||||||
|
sequence:
|
||||||
|
- service: script.get_group_speakers
|
||||||
|
data:
|
||||||
|
group: "{{ who }}"
|
||||||
|
response_variable: "get_group_speakers"
|
||||||
|
# Need to figure out whether to do this part here, or in alexa/jarvis voice scripts, or both
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data:
|
data:
|
||||||
topic: 'house/polly/lastmsg'
|
topic: 'house/polly/lastmsg'
|
||||||
@ -1024,44 +1050,13 @@ script:
|
|||||||
- service: >-
|
- service: >-
|
||||||
{% if voice == 'nabu' %}
|
{% if voice == 'nabu' %}
|
||||||
script.nabu_voice
|
script.nabu_voice
|
||||||
{% elif who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
{% elif get_room_services.jarvis_tts in ['group','alexa'] %}
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['kallen_bedroom','Kallen Bedroom'] %}
|
|
||||||
{% if is_state('input_boolean.kallen_sleeping','on') and type not in ['critical','Critical'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['emma_bedroom','Emma Bedroom'] %}
|
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and type not in ['critical','Critical'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['master_bedroom','master_bedroom_echo_dot','media_player.master_bedroom_echo_dot','Master Bedroom Echo Dot','Master Bedroom'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['kids_bedrooms','Kids Bedrooms'] %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% elif who in ['all_bedrooms','All Bedrooms'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Basement','basement','basement_echo_dot','media_player.basement_echo_dot','Basement Echo Dot'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
|
||||||
{% if is_state('input_boolean.studio_quiet','on') %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['Common Areas','common','common_areas'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['alexa_everywhere','Alexa Everywhere'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Everywhere','everywhere'] %}
|
|
||||||
script.alexa_voice
|
script.alexa_voice
|
||||||
{% else %}
|
{% else %}
|
||||||
script.alexa_voice
|
script.jarvis_voice
|
||||||
{% endif %}
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
# Work on where this redirect logic should go
|
||||||
who: >
|
who: >
|
||||||
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
||||||
living_room
|
living_room
|
||||||
@ -1138,7 +1133,7 @@ script:
|
|||||||
type: '{{ type }}'
|
type: '{{ type }}'
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ who in ['Everywhere','everywhere','all_bedrooms','All Bedrooms','kids_bedrooms','Kids Bedrooms'] }}"
|
value_template: "{{ get_room_speakers.jarvis_tts == 'group' and get_group_speakers.google is defined }}"
|
||||||
then:
|
then:
|
||||||
- service: script.jarvis_voice
|
- service: script.jarvis_voice
|
||||||
data:
|
data:
|
||||||
|
@ -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
|
||||||
@ -865,9 +865,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 +923,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
|
||||||
|
@ -773,16 +773,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') - 3600) | 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') - 3600) | 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') - 3600) | 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 %}
|
||||||
|
@ -19,6 +19,18 @@ input_boolean:
|
|||||||
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
|
||||||
@ -54,6 +66,26 @@ input_datetime:
|
|||||||
has_date: true
|
has_date: true
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:medication
|
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
|
||||||
|
icon: mdi:medication
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- id: cd9f921f-71c7-4e29-9aee-7421ef19bdd3
|
- id: cd9f921f-71c7-4e29-9aee-7421ef19bdd3
|
||||||
|
126
packages/variables.yaml
Normal file
126
packages/variables.yaml
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
script:
|
||||||
|
get_room_speakers:
|
||||||
|
alias: Get Room Speakers
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
room_services: >-
|
||||||
|
{% if room in areas() %}
|
||||||
|
{% set alexa_speaker = states.media_player |
|
||||||
|
selectattr('entity_id', 'in', area_entities(room)) |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | first %}
|
||||||
|
|
||||||
|
{% set google_speaker = states.media_player |
|
||||||
|
selectattr('entity_id', 'in', area_entities(room)) |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | first %}
|
||||||
|
|
||||||
|
{% set tts = "alexa" if alexa_speaker is defined else "google" %}
|
||||||
|
{% else %}
|
||||||
|
{% set tts = "group" %}
|
||||||
|
{% endif %}
|
||||||
|
{"area":"{{room}}","alexa_speaker":"{{alexa_speaker|default({}) }}","jarvis_tts":"{{tts|default("google") }}","google_speaker":"{{google_speaker|default({}) }}"}
|
||||||
|
- stop: "Services acquired"
|
||||||
|
response_variable: "get_room_speakers"
|
||||||
|
|
||||||
|
get_group_speakers:
|
||||||
|
alias: Get Group Speakers
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
get_group_speakers: >-
|
||||||
|
{% set speakers = expand('group.' + group) | map(attribute='entity_id') | list | join(',') %}
|
||||||
|
{% set alexa_speakers = expand('group.' + group) |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{% set google_speakers = expand('group.' + group) |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"alexa":"{{alexa_speakers|default({})}}","google":"{{google_speakers|default({})}}"}
|
||||||
|
- stop: "Speakers acquired"
|
||||||
|
response_variable: "get_group_speakers"
|
||||||
|
|
||||||
|
get_echo_dots:
|
||||||
|
alias: Get Echo Dots
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
get_echo_dots: >-
|
||||||
|
{% if group is defined %}
|
||||||
|
{% set speakers = expand('group.' + group) %}
|
||||||
|
{% else %}
|
||||||
|
{% set speakers = states.media_player %}
|
||||||
|
{% endif %}
|
||||||
|
{% set echo_dots = speakers |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"speakers":"{{echo_dots}}"}
|
||||||
|
- stop: "Echo Dots acquired"
|
||||||
|
response_variable: "get_echo_dots"
|
||||||
|
|
||||||
|
get_google_speakers:
|
||||||
|
alias: Get Google Speakers
|
||||||
|
sequnce:
|
||||||
|
- variables:
|
||||||
|
get_google_speakers: >-
|
||||||
|
{% if group is defined %}
|
||||||
|
{% set speakers = expand('group.' + group) %}
|
||||||
|
{% else %}
|
||||||
|
{% set speakers = states.media_player %}
|
||||||
|
{% endif %}
|
||||||
|
{% set google_speaker = speakers |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"speakers":"{{google_speaker}}"}
|
||||||
|
- stop: "Google speakers acquired"
|
||||||
|
response_variable: "get_google_speakers"
|
||||||
|
|
||||||
|
get_all_speakers:
|
||||||
|
alias: Get All Speakers
|
||||||
|
sequence:
|
||||||
|
- variables: >-
|
||||||
|
get_speakers:
|
||||||
|
{% set alexa_speaker = states.media_player |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id')
|
||||||
|
%}
|
||||||
|
|
||||||
|
{% set google_speaker = states.media_player |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id')
|
||||||
|
%}
|
||||||
|
{% set alexa_list = alexa_speaker | list | join(',') %}
|
||||||
|
{% set google_list = google_speaker | list | join(',') %}
|
||||||
|
{% set all_speakers = alexa_list + ',' + google_list %}
|
||||||
|
{"all_speakers":"{{all_speakers}}"}
|
||||||
|
|
||||||
|
get_room_lights:
|
||||||
|
alias: Get Room Lights
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
area: >
|
||||||
|
{{ room }}
|
||||||
|
entities: >
|
||||||
|
{% set lights = states.light |
|
||||||
|
selectattr('entity_id', 'in', area_entities(area)) |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"lights":"{{lights}}"}
|
||||||
|
- stop: "Lights acquired"
|
||||||
|
response_variable: "entities"
|
@ -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>
|
||||||
|
|
||||||
|
1115
scripts.yaml
1115
scripts.yaml
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
|
||||||
|
@ -75,28 +75,26 @@
|
|||||||
|
|
||||||
<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') and is_state('fan.emma_air_conditioner','on') %}
|
||||||
|
"Emma's air conditioner is {{ states('fan.emma_air_conditioner') }}. "
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
429
www/bubble/bubble-modules.yaml
Normal file
429
www/bubble/bubble-modules.yaml
Normal file
@ -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