Compare commits
114 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a706153a8
|
|||
95b2c8cfc5
|
|||
61b04c05c6
|
|||
41141e94df
|
|||
cc9ec0b211
|
|||
adf881a106
|
|||
6ee298a3d2
|
|||
aa6358ce19
|
|||
abe62888b2
|
|||
0cabab0462
|
|||
034cf2f972
|
|||
1d246e8018
|
|||
5cffb7208f
|
|||
a7b1a53754
|
|||
de5efd39b4
|
|||
0129a56866
|
|||
b305f7c880
|
|||
6ee4bacf55
|
|||
4710700f7e
|
|||
895e99657b
|
|||
0dc7d0f8e4
|
|||
d38cf59812
|
|||
a489ecdf14
|
|||
8698a46d4f
|
|||
7d5aa32834
|
|||
37458be1b8
|
|||
72421b8716
|
|||
8be8f4bb58
|
|||
6e619fa647
|
|||
9dca18048c
|
|||
52bfb8bd49
|
|||
43feaa9b06
|
|||
0847e7fd10
|
|||
425b1fb0cf
|
|||
f589cc0e6c
|
|||
49a4f4650b
|
|||
3a2fc504f3
|
|||
f1180cc34b
|
|||
b936838376
|
|||
2d755be935
|
|||
ed0431ae56
|
|||
a1b68f80b6
|
|||
adc4bc9b42
|
|||
1500151c12
|
|||
67d1d3d43e
|
|||
1c5ccbb926
|
|||
5d4457c198
|
|||
d16a0f8353
|
|||
c8242c2fea
|
|||
713ddb9f75
|
|||
10d7ec5e03
|
|||
95ffb38b7e
|
|||
b5c295a19d
|
|||
bd9dde2455
|
|||
857870e0b1
|
|||
003fe6614d
|
|||
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
|
1
.HA_VERSION
Normal file
1
.HA_VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
2025.6.2
|
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
|
|
951
automations.yaml
951
automations.yaml
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
blueprint:
|
blueprint:
|
||||||
name: Smart Lux Dimmer
|
name: Smart Lux Dimmer
|
||||||
author: AntonH
|
author: AntonH
|
||||||
description: 'Version 4.1
|
description: 'Version 4.3
|
||||||
|
|
||||||
Switch or dim lights based on the value of a light sensor.
|
Switch or dim lights based on the value of a light sensor.
|
||||||
|
|
||||||
@ -24,10 +24,11 @@ blueprint:
|
|||||||
value?
|
value?
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
domain:
|
filter:
|
||||||
- sensor
|
- domain:
|
||||||
device_class:
|
- sensor
|
||||||
- illuminance
|
device_class:
|
||||||
|
- illuminance
|
||||||
multiple: false
|
multiple: false
|
||||||
target_light:
|
target_light:
|
||||||
name: Target lights
|
name: Target lights
|
||||||
@ -81,8 +82,8 @@ blueprint:
|
|||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
|
mode: slider
|
||||||
light_value_2:
|
light_value_2:
|
||||||
name: Brightness at minimum light level
|
name: Brightness at minimum light level
|
||||||
description: Brightness of the light at minimum ambient light.
|
description: Brightness of the light at minimum ambient light.
|
||||||
@ -92,8 +93,8 @@ blueprint:
|
|||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
|
mode: slider
|
||||||
transition_time:
|
transition_time:
|
||||||
name: Transition time
|
name: Transition time
|
||||||
description: 'The time it takes for the light to transition from the set value
|
description: 'The time it takes for the light to transition from the set value
|
||||||
@ -124,9 +125,9 @@ blueprint:
|
|||||||
value: include_color
|
value: include_color
|
||||||
- label: Set temperature
|
- label: Set temperature
|
||||||
value: include_temp
|
value: include_temp
|
||||||
multiple: false
|
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
|
multiple: false
|
||||||
light_color:
|
light_color:
|
||||||
name: Light color
|
name: Light color
|
||||||
description: Color of the light when between minimum and maximum ambient light
|
description: Color of the light when between minimum and maximum ambient light
|
||||||
@ -161,8 +162,8 @@ blueprint:
|
|||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
|
mode: slider
|
||||||
light_brightness_under_min:
|
light_brightness_under_min:
|
||||||
name: Brightness when ambient light value under min.
|
name: Brightness when ambient light value under min.
|
||||||
description: Brightness of the light when the ambient light is lower than the
|
description: Brightness of the light when the ambient light is lower than the
|
||||||
@ -173,8 +174,8 @@ blueprint:
|
|||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
|
mode: slider
|
||||||
include_color_or_temp_over_under:
|
include_color_or_temp_over_under:
|
||||||
name: Include color or temperature values when outside range
|
name: Include color or temperature values when outside range
|
||||||
description: 'Set a color or temperature value for the light when over maximum
|
description: 'Set a color or temperature value for the light when over maximum
|
||||||
@ -193,9 +194,9 @@ blueprint:
|
|||||||
value: include_color_outside_range
|
value: include_color_outside_range
|
||||||
- label: Set temperature when outside range
|
- label: Set temperature when outside range
|
||||||
value: include_temp_outside_range
|
value: include_temp_outside_range
|
||||||
multiple: false
|
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
|
multiple: false
|
||||||
light_color_over_max:
|
light_color_over_max:
|
||||||
name: Color when ambient light value over max.
|
name: Color when ambient light value over max.
|
||||||
description: Color of the light when the ambient light is higher than the set
|
description: Color of the light when the ambient light is higher than the set
|
||||||
@ -236,18 +237,25 @@ variables:
|
|||||||
include_brightness_over_under: !input include_brightness_over_under
|
include_brightness_over_under: !input include_brightness_over_under
|
||||||
include_color_or_temp_over_under: !input include_color_or_temp_over_under
|
include_color_or_temp_over_under: !input include_color_or_temp_over_under
|
||||||
light_sensor: !input light_sensor_entity
|
light_sensor: !input light_sensor_entity
|
||||||
maxB: !input max_brightness_value
|
max_brightness_value: !input max_brightness_value
|
||||||
minB: !input min_brightness_value
|
min_brightness_value: !input min_brightness_value
|
||||||
light1: !input light_value_1
|
maxB: '{{ max_brightness_value * 2.55 }}'
|
||||||
light2: !input light_value_2
|
minB: '{{ min_brightness_value * 2.55 }}'
|
||||||
|
light_value_1: !input light_value_1
|
||||||
|
light_value_2: !input light_value_2
|
||||||
|
light1: '{{ light_value_1 * 2.55 }}'
|
||||||
|
light2: '{{ light_value_2 * 2.55 }}'
|
||||||
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
||||||
constant: '{{ light1 - ( slope * maxB ) }}'
|
constant: '{{ light1 - ( slope * maxB ) }}'
|
||||||
trigger:
|
light_brightness_over_max: !input light_brightness_over_max
|
||||||
platform: state
|
light_brightness_under_min: !input light_brightness_under_min
|
||||||
|
brightness_over_max_pct: '{{ light_brightness_over_max * 2.55 }}'
|
||||||
|
brightness_under_min_pct: '{{ light_brightness_under_min * 2.55 }}'
|
||||||
|
triggers:
|
||||||
|
trigger: state
|
||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
condition:
|
conditions: !input run_conditions
|
||||||
- condition: !input run_conditions
|
actions:
|
||||||
action:
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -258,20 +266,20 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ include_color_or_temp == "include_no_color_temp" }}'
|
value_template: '{{ include_color_or_temp == "include_no_color_temp" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ include_color_or_temp == "include_color" }}'
|
value_template: '{{ include_color_or_temp == "include_color" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
rgb_color: !input light_color
|
rgb_color: !input light_color
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
@ -279,10 +287,10 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ include_color_or_temp == "include_temp" }}'
|
value_template: '{{ include_color_or_temp == "include_temp" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
color_temp: !input light_temp
|
color_temp: !input light_temp
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
@ -302,20 +310,20 @@ action:
|
|||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
above: !input max_brightness_value
|
above: !input max_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_over_max
|
brightness: '{{ brightness_over_max_pct }}'
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
below: !input min_brightness_value
|
below: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_under_min
|
brightness: '{{ brightness_under_min_pct }}'
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
@ -323,10 +331,10 @@ action:
|
|||||||
below: !input max_brightness_value
|
below: !input max_brightness_value
|
||||||
above: !input min_brightness_value
|
above: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -340,10 +348,10 @@ action:
|
|||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
above: !input max_brightness_value
|
above: !input max_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_over_max
|
brightness: '{{ brightness_over_max_pct }}'
|
||||||
rgb_color: !input light_color_over_max
|
rgb_color: !input light_color_over_max
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -351,10 +359,10 @@ action:
|
|||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
below: !input min_brightness_value
|
below: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_under_min
|
brightness: '{{ brightness_under_min_pct }}'
|
||||||
rgb_color: !input light_color_under_min
|
rgb_color: !input light_color_under_min
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -363,10 +371,10 @@ action:
|
|||||||
below: !input max_brightness_value
|
below: !input max_brightness_value
|
||||||
above: !input min_brightness_value
|
above: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
rgb_color: !input light_color
|
rgb_color: !input light_color
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
@ -381,10 +389,10 @@ action:
|
|||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
above: !input max_brightness_value
|
above: !input max_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_over_max
|
brightness: '{{ brightness_over_max_pct }}'
|
||||||
color_temp: !input light_temp_over_max
|
color_temp: !input light_temp_over_max
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -392,10 +400,10 @@ action:
|
|||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
below: !input min_brightness_value
|
below: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: !input light_brightness_under_min
|
brightness: '{{ brightness_under_min_pct }}'
|
||||||
color_temp: !input light_temp_under_min
|
color_temp: !input light_temp_under_min
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -404,10 +412,10 @@ action:
|
|||||||
below: !input max_brightness_value
|
below: !input max_brightness_value
|
||||||
above: !input min_brightness_value
|
above: !input min_brightness_value
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
transition: !input transition_time
|
transition: !input transition_time
|
||||||
brightness_pct: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
brightness: '{{ (( slope * states(light_sensor)|int ) + constant)|round
|
||||||
}}'
|
}}'
|
||||||
color_temp: !input light_temp
|
color_temp: !input light_temp
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
|
@ -31,12 +31,15 @@ blueprint:
|
|||||||
text: {}
|
text: {}
|
||||||
light_sensor_entity:
|
light_sensor_entity:
|
||||||
name: Light Sensor
|
name: Light Sensor
|
||||||
|
description: Which light sensor do you want to use to measure the ambient light
|
||||||
|
value?
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
domain:
|
filter:
|
||||||
- sensor
|
- domain:
|
||||||
device_class:
|
- sensor
|
||||||
- illuminance
|
device_class:
|
||||||
|
- illuminance
|
||||||
multiple: false
|
multiple: false
|
||||||
max_brightness_value:
|
max_brightness_value:
|
||||||
name: Maximum ambient light value
|
name: Maximum ambient light value
|
||||||
@ -94,15 +97,17 @@ variables:
|
|||||||
light_sensor: !input light_sensor_entity
|
light_sensor: !input light_sensor_entity
|
||||||
maxB: !input max_brightness_value
|
maxB: !input max_brightness_value
|
||||||
minB: !input min_brightness_value
|
minB: !input min_brightness_value
|
||||||
light1: !input light_value_1
|
light_value_1: !input light_value_1
|
||||||
light2: !input light_value_2
|
light_value_2: !input light_value_2
|
||||||
|
light1: '{{ light_value_1 * 2.55 }}'
|
||||||
|
light2: '{{ light_value_2 * 2.55 }}'
|
||||||
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
||||||
constant: '{{ light1 - ( slope * maxB ) }}'
|
constant: '{{ light1 - ( slope * maxB ) }}'
|
||||||
days: !input schedule_days
|
days: !input schedule_days
|
||||||
trigger:
|
triggers:
|
||||||
platform: state
|
trigger: state
|
||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
condition:
|
conditions:
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: !input light_sensor_entity
|
entity_id: !input light_sensor_entity
|
||||||
above: !input min_brightness_value
|
above: !input min_brightness_value
|
||||||
@ -111,9 +116,9 @@ condition:
|
|||||||
before: !input schedule_stop
|
before: !input schedule_stop
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ now().strftime(''%a'') | lower in days }}'
|
value_template: '{{ now().strftime(''%a'') | lower in days }}'
|
||||||
action:
|
actions:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data:
|
data:
|
||||||
brightness_pct: "{% if states(light_sensor)|int > maxB %}\n 0\n{% else %}\n {{
|
brightness: "{% if states(light_sensor)|int > maxB %}\n 0\n{% else %}\n {{ ((
|
||||||
(( slope * states(light_sensor)|int ) + constant)|round }}\n{% endif %}\n"
|
slope * states(light_sensor)|int ) + constant)|round }}\n{% endif %}\n"
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
blueprint:
|
blueprint:
|
||||||
name: The Everything Light
|
name: The Everything Light
|
||||||
author: AntonH
|
author: AntonH
|
||||||
description: "**Version 2.5**\nThe Everything Light: select any trigger and turn
|
description: "**Version 2.10**\nThe Everything Light: select any trigger and turn
|
||||||
on your light in multiple ways:\n - just turn the light on in it's default state\n
|
on your light in multiple ways:\n - just turn the light on in it's default state\n
|
||||||
\ - turn it on with a set brightness, color and/or temperature value\n - turn
|
\ - turn it on with a set brightness, color and/or temperature value\n - turn
|
||||||
it on dynamically with a brightness value that changes according to an ambient
|
it on dynamically with a brightness value that changes according to an ambient
|
||||||
@ -55,13 +55,13 @@ blueprint:
|
|||||||
Toggle the light.
|
Toggle the light.
|
||||||
|
|
||||||
|
|
||||||
- **FIXED MODE: **
|
- **FIXED MODE:**
|
||||||
|
|
||||||
The light will turn on at a set brightness percentage, optionally color or
|
The light will turn on at a set brightness percentage, optionally color or
|
||||||
temperature can be set.
|
temperature can be set.
|
||||||
|
|
||||||
|
|
||||||
- **DYNAMIC MODE**
|
- **DYNAMIC MODE:**
|
||||||
|
|
||||||
The light will be assigned a brightness value based on the value of a ambient
|
The light will be assigned a brightness value based on the value of a ambient
|
||||||
light sensor, optionally color or temperature can be set.
|
light sensor, optionally color or temperature can be set.
|
||||||
@ -74,15 +74,15 @@ blueprint:
|
|||||||
options:
|
options:
|
||||||
- label: DEFAULT MODE
|
- label: DEFAULT MODE
|
||||||
value: default
|
value: default
|
||||||
- label: TOGGLE
|
- label: TOGGLE MODE
|
||||||
value: toggle
|
value: toggle
|
||||||
- label: FIXED MODE
|
- label: FIXED MODE
|
||||||
value: fixed
|
value: fixed
|
||||||
- label: DYNAMIC MODE
|
- label: DYNAMIC MODE
|
||||||
value: dynamic
|
value: dynamic
|
||||||
multiple: false
|
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
|
multiple: false
|
||||||
transition_time:
|
transition_time:
|
||||||
name: Transition time (FIXED & DYNAMIC MODE)
|
name: Transition time (FIXED & DYNAMIC MODE)
|
||||||
description: "The time it takes for the light to transition to the assigned
|
description: "The time it takes for the light to transition to the assigned
|
||||||
@ -110,9 +110,9 @@ blueprint:
|
|||||||
value: include_color
|
value: include_color
|
||||||
- label: Set temperature
|
- label: Set temperature
|
||||||
value: include_temperature
|
value: include_temperature
|
||||||
multiple: false
|
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
|
multiple: false
|
||||||
light_color:
|
light_color:
|
||||||
name: Light color (FIXED & DYNAMIC MODE)
|
name: Light color (FIXED & DYNAMIC MODE)
|
||||||
description: Color of the light when between minimum and maximum ambient light
|
description: Color of the light when between minimum and maximum ambient light
|
||||||
@ -125,22 +125,28 @@ blueprint:
|
|||||||
color_rgb: {}
|
color_rgb: {}
|
||||||
light_temperature:
|
light_temperature:
|
||||||
name: Light temperature (FIXED & DYNAMIC MODE)
|
name: Light temperature (FIXED & DYNAMIC MODE)
|
||||||
description: Temperature of the light when between minimum and maximum ambient
|
description: 'Temperature of the light when between minimum and maximum ambient
|
||||||
light values.
|
light values.
|
||||||
|
|
||||||
|
(not all lights will support all values, please consult your lights spec sheet.)
|
||||||
|
|
||||||
|
'
|
||||||
default: 2000
|
default: 2000
|
||||||
selector:
|
selector:
|
||||||
color_temp: {}
|
color_temp:
|
||||||
|
unit: kelvin
|
||||||
|
min: 1500
|
||||||
|
max: 6500
|
||||||
brightness:
|
brightness:
|
||||||
name: Brightness (FIXED BRIGHTNESS MODE)
|
name: Brightness (FIXED BRIGHTNESS MODE)
|
||||||
description: Set the brightness value the light needs to turn on at
|
description: Set the brightness value the light needs to turn on at
|
||||||
default: 0
|
default: 100
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: '%'
|
|
||||||
light_sensor_entity:
|
light_sensor_entity:
|
||||||
name: Light Sensor (DYNAMIC MODE)
|
name: Light Sensor (DYNAMIC MODE)
|
||||||
description: Which light sensor do you want to use to measure the ambient light
|
description: Which light sensor do you want to use to measure the ambient light
|
||||||
@ -188,7 +194,6 @@ blueprint:
|
|||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: '%'
|
|
||||||
light_value_2:
|
light_value_2:
|
||||||
name: Brightness at minimum light level (DYNAMIC MODE)
|
name: Brightness at minimum light level (DYNAMIC MODE)
|
||||||
description: Brightness of the light at minimum ambient light.
|
description: Brightness of the light at minimum ambient light.
|
||||||
@ -199,7 +204,6 @@ blueprint:
|
|||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: '%'
|
|
||||||
light_brightness_over_max:
|
light_brightness_over_max:
|
||||||
name: Brightness when ambient light value over max (DYNAMIC MODE)
|
name: Brightness when ambient light value over max (DYNAMIC MODE)
|
||||||
description: Brightness of the light when the ambient light is higher than the
|
description: Brightness of the light when the ambient light is higher than the
|
||||||
@ -211,19 +215,17 @@ blueprint:
|
|||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: '%'
|
|
||||||
light_brightness_under_min:
|
light_brightness_under_min:
|
||||||
name: Brightness when ambient light value under min (DYNAMIC MODE)
|
name: Brightness when ambient light value under min (DYNAMIC MODE)
|
||||||
description: Brightness of the light when the ambient light is lower than the
|
description: Brightness of the light when the ambient light is lower than the
|
||||||
set minimum value.
|
set minimum value.
|
||||||
default: 100
|
default: 255
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 0.0
|
min: 0.0
|
||||||
max: 100.0
|
max: 100.0
|
||||||
step: 1.0
|
step: 1.0
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: '%'
|
|
||||||
include_color_or_temp_over_under:
|
include_color_or_temp_over_under:
|
||||||
name: Include color or temperature values when outside range (DYNAMIC MODE)
|
name: Include color or temperature values when outside range (DYNAMIC MODE)
|
||||||
description: 'Set a color or temperature value for the light when over maximum
|
description: 'Set a color or temperature value for the light when over maximum
|
||||||
@ -242,9 +244,9 @@ blueprint:
|
|||||||
value: include_color_outside_range
|
value: include_color_outside_range
|
||||||
- label: Set temperature when outside range
|
- label: Set temperature when outside range
|
||||||
value: include_temp_outside_range
|
value: include_temp_outside_range
|
||||||
multiple: false
|
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
|
multiple: false
|
||||||
light_color_over_max:
|
light_color_over_max:
|
||||||
name: Color when ambient light value over max (DYNAMIC MODE)
|
name: Color when ambient light value over max (DYNAMIC MODE)
|
||||||
description: Color of the light when the ambient light is higher than the set
|
description: Color of the light when the ambient light is higher than the set
|
||||||
@ -267,18 +269,32 @@ blueprint:
|
|||||||
color_rgb: {}
|
color_rgb: {}
|
||||||
light_temp_over_max:
|
light_temp_over_max:
|
||||||
name: Temperature when ambient light value over max (DYNAMIC MODE)
|
name: Temperature when ambient light value over max (DYNAMIC MODE)
|
||||||
description: Temperature of the light when the ambient light is higher than
|
description: 'Temperature of the light when the ambient light is higher than
|
||||||
the set maximum value.
|
the set maximum value.
|
||||||
|
|
||||||
|
(not all lights will support all values, please consult your lights spec sheet.)
|
||||||
|
|
||||||
|
'
|
||||||
default: 2000
|
default: 2000
|
||||||
selector:
|
selector:
|
||||||
color_temp: {}
|
color_temp:
|
||||||
|
unit: kelvin
|
||||||
|
min: 1500
|
||||||
|
max: 6500
|
||||||
light_temp_under_min:
|
light_temp_under_min:
|
||||||
name: Temperature when ambient light value under min (DYNAMIC MODE)
|
name: Temperature when ambient light value under min (DYNAMIC MODE)
|
||||||
description: Temperature of the light when the ambient light is lower than the
|
description: 'Temperature of the light when the ambient light is lower than
|
||||||
set minimum value.
|
the set minimum value.
|
||||||
|
|
||||||
|
(not all lights will support all values, please consult your lights spec sheet.)
|
||||||
|
|
||||||
|
'
|
||||||
default: 2000
|
default: 2000
|
||||||
selector:
|
selector:
|
||||||
color_temp: {}
|
color_temp:
|
||||||
|
unit: kelvin
|
||||||
|
min: 1500
|
||||||
|
max: 6500
|
||||||
include_turn_off:
|
include_turn_off:
|
||||||
name: Include light turn off function
|
name: Include light turn off function
|
||||||
description: 'Select if the light needs to turn back off again and how you want
|
description: 'Select if the light needs to turn back off again and how you want
|
||||||
@ -307,8 +323,8 @@ blueprint:
|
|||||||
value: trigger
|
value: trigger
|
||||||
- label: Staircase function
|
- label: Staircase function
|
||||||
value: staircase
|
value: staircase
|
||||||
sort: false
|
|
||||||
custom_value: false
|
custom_value: false
|
||||||
|
sort: false
|
||||||
turn_off_triggers:
|
turn_off_triggers:
|
||||||
name: Turn off triggers
|
name: Turn off triggers
|
||||||
description: Triggers that turn the light off
|
description: Triggers that turn the light off
|
||||||
@ -343,71 +359,75 @@ variables:
|
|||||||
include_color_or_temp: !input include_color_or_temp
|
include_color_or_temp: !input include_color_or_temp
|
||||||
light_color: !input light_color
|
light_color: !input light_color
|
||||||
light_temperature: !input light_temperature
|
light_temperature: !input light_temperature
|
||||||
light_brightness: !input brightness
|
brightness: !input brightness
|
||||||
|
light_brightness: '{{ brightness * 2.55 }}'
|
||||||
light_sensor: !input light_sensor_entity
|
light_sensor: !input light_sensor_entity
|
||||||
maxB: !input max_brightness_value
|
maxB: !input max_brightness_value
|
||||||
minB: !input min_brightness_value
|
minB: !input min_brightness_value
|
||||||
light1: !input light_value_1
|
light_value_1: !input light_value_1
|
||||||
light2: !input light_value_2
|
light_value_2: !input light_value_2
|
||||||
|
light1: '{{ light_value_1 * 2.55 }}'
|
||||||
|
light2: '{{ light_value_2 * 2.55 }}'
|
||||||
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
slope: '{{ ( light1 - light2 ) / ( maxB - minB ) }}'
|
||||||
constant: '{{ light1 - ( slope * maxB ) }}'
|
constant: '{{ light1 - ( slope * maxB ) }}'
|
||||||
dynamic_brightness_pct: "{% if mode == \"dynamic\" %}\n {{ (( slope * states(light_sensor)|int
|
dynamic_brightness: "{% if mode == \"dynamic\" %}\n {{ (( slope * states(light_sensor)|int
|
||||||
) + constant)|round }}\n{% else %}\n 0\n{% endif %}\n"
|
) + constant)|round }}\n{% else %}\n 0\n{% endif %}\n"
|
||||||
include_color_or_temp_over_under: !input include_color_or_temp_over_under
|
include_color_or_temp_over_under: !input include_color_or_temp_over_under
|
||||||
light_brightness_over_max: !input light_brightness_over_max
|
light_brightness_over_max: !input light_brightness_over_max
|
||||||
|
brightness_over_max_pct: '{{ light_brightness_over_max * 2.55 }}'
|
||||||
light_color_over_max: !input light_color_over_max
|
light_color_over_max: !input light_color_over_max
|
||||||
light_temp_over_max: !input light_temp_over_max
|
light_temp_over_max: !input light_temp_over_max
|
||||||
light_brightness_under_min: !input light_brightness_under_min
|
light_brightness_under_min: !input light_brightness_under_min
|
||||||
|
brightness_under_min_pct: '{{ light_brightness_under_min * 2.55 }}'
|
||||||
light_color_under_min: !input light_color_under_min
|
light_color_under_min: !input light_color_under_min
|
||||||
light_temp_under_min: !input light_temp_under_min
|
light_temp_under_min: !input light_temp_under_min
|
||||||
include_turn_off: !input include_turn_off
|
include_turn_off: !input include_turn_off
|
||||||
trigger: !input triggers
|
trigger: !input triggers
|
||||||
condition:
|
conditions: !input run_conditions
|
||||||
- condition: !input run_conditions
|
actions:
|
||||||
action:
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: '{{ mode == "toggle" }}'
|
- conditions: '{{ mode == "toggle" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: homeassistant.toggle
|
- action: homeassistant.toggle
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions: '{{ mode == "default" }}'
|
- conditions: '{{ mode == "default" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: homeassistant.turn_on
|
- action: homeassistant.turn_on
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions: '{{ mode == "fixed" }}'
|
- conditions: '{{ mode == "fixed" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data: "{% if include_color_or_temp == \"include_color\" %}\n {{ { \"transition\":
|
data: "{% if include_color_or_temp == \"include_color\" %}\n {{ { \"transition\":
|
||||||
transition_time, \"brightness_pct\": light_brightness, \"rgb_color\": light_color
|
transition_time, \"brightness\": light_brightness, \"rgb_color\": light_color
|
||||||
} }}\n{% elif include_color_or_temp == \"include_temperature\" %}\n {{ {
|
} }}\n{% elif include_color_or_temp == \"include_temperature\" %}\n {{ {
|
||||||
\"transition\": transition_time, \"brightness_pct\": light_brightness, \"color_temp\":
|
\"transition\": transition_time, \"brightness\": light_brightness, \"color_temp\":
|
||||||
light_temperature } }}\n{% else %}\n {{ { \"transition\": transition_time,
|
light_temperature } }}\n{% else %}\n {{ { \"transition\": transition_time,
|
||||||
\"brightness_pct\": light_brightness } }}\n{% endif %}\n"
|
\"brightness\": light_brightness } }}\n{% endif %}\n"
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions: '{{ mode == "dynamic" }}'
|
- conditions: '{{ mode == "dynamic" }}'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- action: light.turn_on
|
||||||
data: "{% if states(light_sensor)|int > maxB %}\n {% if include_color_or_temp_over_under
|
data: "{% if states(light_sensor)|int > maxB %}\n {% if include_color_or_temp_over_under
|
||||||
== \"include_color_outside_range\" %}\n {{ { \"transition\": transition_time,
|
== \"include_color_outside_range\" %}\n {{ { \"transition\": transition_time,
|
||||||
\"brightness_pct\": light_brightness_over_max, \"rgb_color\": light_color_over_max
|
\"brightness\": brightness_over_max_pct, \"rgb_color\": light_color_over_max
|
||||||
} }}\n {% elif include_color_or_temp_over_under == \"include_temp_outside_range\"
|
} }}\n {% elif include_color_or_temp_over_under == \"include_temp_outside_range\"
|
||||||
%}\n {{ { \"transition\": transition_time, \"brightness_pct\": light_brightness_over_max,
|
%}\n {{ { \"transition\": transition_time, \"brightness\": brightness_over_max_pct,
|
||||||
\"color_temp\": light_temp_over_max } }}\n {% else %}\n {{ { \"transition\":
|
\"color_temp\": light_temp_over_max } }}\n {% else %}\n {{ { \"transition\":
|
||||||
transition_time, \"brightness_pct\": light_brightness_over_max } }}\n {%
|
transition_time, \"brightness\": brightness_over_max_pct } }}\n {% endif
|
||||||
endif %}\n{% elif states(light_sensor)|int < minB %}\n {% if include_color_or_temp_over_under
|
%}\n{% elif states(light_sensor)|int < minB %}\n {% if include_color_or_temp_over_under
|
||||||
== \"include_color_outside_range\" %}\n {{ { \"transition\": transition_time,
|
== \"include_color_outside_range\" %}\n {{ { \"transition\": transition_time,
|
||||||
\"brightness_pct\": light_brightness_under_min, \"rgb_color\": light_color_under_min
|
\"brightness\": brightness_under_min_pct, \"rgb_color\": light_color_under_min
|
||||||
} }}\n {% elif include_color_or_temp_over_under == \"include_temp_outside_range\"
|
} }}\n {% elif include_color_or_temp_over_under == \"include_temp_outside_range\"
|
||||||
%}\n {{ { \"transition\": transition_time, \"brightness_pct\": light_brightness_under_min,
|
%}\n {{ { \"transition\": transition_time, \"brightness\": brightness_under_min_pct,
|
||||||
\"color_temp\": light_temp_under_min } }}\n {% else %}\n {{ { \"transition\":
|
\"color_temp\": light_temp_under_min } }}\n {% else %}\n {{ { \"transition\":
|
||||||
transition_time, \"brightness_pct\": light_brightness_under_min } }}\n {%
|
transition_time, \"brightness\": brightness_under_min_pct } }}\n {% endif
|
||||||
endif %}\n{% else %}\n {% if include_color_or_temp == \"include_color\" %}\n
|
%}\n{% else %}\n {% if include_color_or_temp == \"include_color\" %}\n {{
|
||||||
\ {{ { \"transition\": transition_time, \"brightness_pct\": light_brightness,
|
{ \"transition\": transition_time, \"brightness\": light_brightness, \"rgb_color\":
|
||||||
\"rgb_color\": light_color } }}\n {% elif include_color_or_temp == \"include_temperature\"
|
light_color } }}\n {% elif include_color_or_temp == \"include_temperature\"
|
||||||
%}\n {{ { \"transition\": transition_time, \"brightness_pct\": dynamic_brightness_pct,
|
%}\n {{ { \"transition\": transition_time, \"brightness\": dynamic_brightness,
|
||||||
\"color_temp\": light_temperature } }}\n {% else %}\n {{ { \"transition\":
|
\"color_temp\": light_temperature } }}\n {% else %}\n {{ { \"transition\":
|
||||||
transition_time, \"brightness_pct\": dynamic_brightness_pct } }}\n {% endif
|
transition_time, \"brightness\": dynamic_brightness } }}\n {% endif %}\n{%
|
||||||
%}\n{% endif %}\n"
|
endif %}\n"
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- if: !input turn_off_conditions
|
- if: !input turn_off_conditions
|
||||||
then:
|
then:
|
||||||
@ -420,11 +440,11 @@ action:
|
|||||||
timeout: !input staircase_duration
|
timeout: !input staircase_duration
|
||||||
else:
|
else:
|
||||||
- delay: !input staircase_duration
|
- delay: !input staircase_duration
|
||||||
- service: homeassistant.turn_off
|
- action: homeassistant.turn_off
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
- conditions: '{{ "trigger" in include_turn_off and not "staircase" in include_turn_off
|
- conditions: '{{ "trigger" in include_turn_off and not "staircase" in include_turn_off
|
||||||
}}'
|
}}'
|
||||||
sequence:
|
sequence:
|
||||||
- wait_for_trigger: !input turn_off_triggers
|
- wait_for_trigger: !input turn_off_triggers
|
||||||
- service: homeassistant.turn_off
|
- action: homeassistant.turn_off
|
||||||
target: !input target_light
|
target: !input target_light
|
||||||
|
@ -10,6 +10,7 @@ blueprint:
|
|||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
integration: cast
|
integration: cast
|
||||||
|
multiple: false
|
||||||
view:
|
view:
|
||||||
name: Lovelace view path
|
name: Lovelace view path
|
||||||
description: Path of the view to cast. A path has to be defined in your Lovelace
|
description: Path of the view to cast. A path has to be defined in your Lovelace
|
||||||
@ -21,11 +22,11 @@ blueprint:
|
|||||||
source_url: https://community.home-assistant.io/t/cast-and-re-cast-a-lovelace-view-to-a-google-hub/259631
|
source_url: https://community.home-assistant.io/t/cast-and-re-cast-a-lovelace-view-to-a-google-hub/259631
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
to: 'off'
|
to: 'off'
|
||||||
for: 00:00:20
|
for: 00:00:20
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
to: paused
|
to: paused
|
||||||
for: 00:00:20
|
for: 00:00:20
|
||||||
- platform: time_pattern
|
- platform: time_pattern
|
||||||
@ -38,38 +39,38 @@ action:
|
|||||||
- condition: or
|
- condition: or
|
||||||
conditions:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
state: 'off'
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
state: paused
|
state: paused
|
||||||
for: 00:00:20
|
for: 00:00:20
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
data:
|
data:
|
||||||
is_volume_muted: true
|
is_volume_muted: true
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
- service: media_player.turn_off
|
- service: media_player.turn_off
|
||||||
data:
|
data:
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 2
|
seconds: 2
|
||||||
- service: media_player.turn_on
|
- service: media_player.turn_on
|
||||||
data:
|
data:
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
- service: cast.show_lovelace_view
|
- service: cast.show_lovelace_view
|
||||||
data:
|
data:
|
||||||
view_path: !input 'view'
|
view_path: !input view
|
||||||
dashboard_path: !input 'dashboard'
|
dashboard_path: !input dashboard
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
- service: cast.show_lovelace_view
|
- service: cast.show_lovelace_view
|
||||||
data:
|
data:
|
||||||
view_path: !input 'view'
|
view_path: !input view
|
||||||
dashboard_path: !input 'dashboard'
|
dashboard_path: !input dashboard
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 10
|
seconds: 10
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
data:
|
data:
|
||||||
is_volume_muted: false
|
is_volume_muted: false
|
||||||
entity_id: !input 'player'
|
entity_id: !input player
|
||||||
|
@ -32,8 +32,16 @@ frontend:
|
|||||||
extra_module_url:
|
extra_module_url:
|
||||||
- /hacsfiles/hass-hue-icons/hass-hue-icons.js
|
- /hacsfiles/hass-hue-icons/hass-hue-icons.js
|
||||||
- /hacsfiles/hass-bha-icons/hass-bha-icons.js
|
- /hacsfiles/hass-bha-icons/hass-bha-icons.js
|
||||||
|
- /hacsfiles/material-you-utilities/material-you-utilities.min.js
|
||||||
javascript_version: latest
|
javascript_version: latest
|
||||||
|
|
||||||
|
panel_custom:
|
||||||
|
- name: material-you-panel
|
||||||
|
url_path: material-you-configuration
|
||||||
|
sidebar_title: Material You Utilities
|
||||||
|
sidebar_icon: mdi:material-design
|
||||||
|
module_url: /hacsfiles/material-you-utilities/material-you-utilities.min.js
|
||||||
|
|
||||||
http:
|
http:
|
||||||
use_x_forwarded_for: true
|
use_x_forwarded_for: true
|
||||||
trusted_proxies:
|
trusted_proxies:
|
||||||
@ -107,6 +115,8 @@ recorder:
|
|||||||
- sensor.*gpu_core_load
|
- sensor.*gpu_core_load
|
||||||
- sensor.portainer*
|
- sensor.portainer*
|
||||||
- sensor.mosquitto*
|
- sensor.mosquitto*
|
||||||
|
- sensor.*_rssi
|
||||||
|
- sensor.weatherflow_hub*
|
||||||
entities:
|
entities:
|
||||||
- sensor.avg_ping
|
- sensor.avg_ping
|
||||||
- sensor.max_ping
|
- sensor.max_ping
|
||||||
@ -121,6 +131,8 @@ recorder:
|
|||||||
- sensor.mariadb_database_size
|
- sensor.mariadb_database_size
|
||||||
- sensor.random_joke
|
- sensor.random_joke
|
||||||
- sensor.bypassed_sensors
|
- sensor.bypassed_sensors
|
||||||
|
- sensor.home_tempest_signal_strength
|
||||||
|
- sensor.home_tempest_uptime
|
||||||
include:
|
include:
|
||||||
entities:
|
entities:
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
@ -166,6 +178,8 @@ influxdb:
|
|||||||
entity_globs:
|
entity_globs:
|
||||||
- binary_sensor.*tamper*
|
- binary_sensor.*tamper*
|
||||||
- light.*screen*
|
- light.*screen*
|
||||||
|
- sensor.weatherflow_hub*
|
||||||
|
- sensor.home_tempest*
|
||||||
entities:
|
entities:
|
||||||
- sensor.last_boot
|
- sensor.last_boot
|
||||||
- sensor.date
|
- sensor.date
|
||||||
@ -178,6 +192,8 @@ influxdb:
|
|||||||
- light.all_lights
|
- light.all_lights
|
||||||
- fan.all_fans
|
- fan.all_fans
|
||||||
- sensor.random_joke
|
- sensor.random_joke
|
||||||
|
- sensor.home_tempest_signal_strength
|
||||||
|
- sensor.home_tempest_uptime
|
||||||
include:
|
include:
|
||||||
domains:
|
domains:
|
||||||
- sun
|
- sun
|
||||||
@ -321,6 +337,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:
|
||||||
@ -344,6 +363,8 @@ prometheus:
|
|||||||
exclude_entity_globs:
|
exclude_entity_globs:
|
||||||
- binary_sensor.*tamper*
|
- binary_sensor.*tamper*
|
||||||
- light.*screen*
|
- light.*screen*
|
||||||
|
- sensor.weatherflow_hub*
|
||||||
|
- sensor.home_tempest*
|
||||||
exclude_entities:
|
exclude_entities:
|
||||||
- sensor.last_boot
|
- sensor.last_boot
|
||||||
- sensor.date
|
- sensor.date
|
||||||
@ -356,6 +377,8 @@ prometheus:
|
|||||||
- light.all_lights
|
- light.all_lights
|
||||||
- fan.all_fans
|
- fan.all_fans
|
||||||
- sensor.random_joke
|
- sensor.random_joke
|
||||||
|
- sensor.home_tempest_signal_strength
|
||||||
|
- sensor.home_tempest_uptime
|
||||||
include_domains:
|
include_domains:
|
||||||
- sun
|
- sun
|
||||||
- light
|
- light
|
||||||
@ -498,3 +521,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
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
45: 'quarter to {hour}',
|
45: 'quarter to {hour}',
|
||||||
59: 'a minute to {hour}',
|
59: 'a minute to {hour}',
|
||||||
'past_hour': '{minute} past {hour}',
|
'past_hour': '{minute} past {hour}',
|
||||||
'to_hour': '{minute} to {hour}',
|
'to_hour': '{minute} to {hour}',
|
||||||
},
|
},
|
||||||
'time_of_day':{
|
'time_of_day':{
|
||||||
'midnight': 'midnight',
|
'midnight': 'midnight',
|
||||||
@ -157,7 +157,7 @@
|
|||||||
'November',
|
'November',
|
||||||
'December',
|
'December',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'nl':{
|
'nl':{
|
||||||
'_language': 'Nederlands',
|
'_language': 'Nederlands',
|
||||||
'and': 'en',
|
'and': 'en',
|
||||||
@ -203,6 +203,8 @@
|
|||||||
'today': 'vandaag',
|
'today': 'vandaag',
|
||||||
'tomorrow': 'morgen',
|
'tomorrow': 'morgen',
|
||||||
'yesterday': 'gisteren',
|
'yesterday': 'gisteren',
|
||||||
|
'next': 'volgende',
|
||||||
|
'last': 'afgelopen',
|
||||||
},
|
},
|
||||||
'days':[
|
'days':[
|
||||||
"maandag",
|
"maandag",
|
||||||
@ -226,12 +228,30 @@
|
|||||||
'oktober',
|
'oktober',
|
||||||
'november',
|
'november',
|
||||||
'december',
|
'december',
|
||||||
]
|
],
|
||||||
|
'time_of_hour':{
|
||||||
|
0: '{hour} uur',
|
||||||
|
1: '1 over {hour}',
|
||||||
|
15: 'kwart over {hour}',
|
||||||
|
30: 'half {hour}',
|
||||||
|
45: 'kwart voor {hour}',
|
||||||
|
59: '1 voor {hour}',
|
||||||
|
'past_hour': '{minute} over {hour}',
|
||||||
|
'to_hour': '{minute} voor {hour}',
|
||||||
|
'to_half_hour': '{minute} voor half {hour}',
|
||||||
|
'past_half_hour': '{minute} over half {hour}',
|
||||||
|
'half_hour': 'half {hour}',
|
||||||
|
'use_twelve': true,
|
||||||
|
},
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': 'middernacht',
|
||||||
|
'noon': 'middag',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'sv':{
|
'sv':{
|
||||||
'_language': 'Svenska',
|
'_language': 'Svenska',
|
||||||
'and': 'och',
|
'and': 'och',
|
||||||
'in': 'i',
|
'in': 'om',
|
||||||
'ago': 'sedan',
|
'ago': 'sedan',
|
||||||
'now': 'nu',
|
'now': 'nu',
|
||||||
'lose': 'förlora',
|
'lose': 'förlora',
|
||||||
@ -273,6 +293,7 @@
|
|||||||
'today': 'idag',
|
'today': 'idag',
|
||||||
'tomorrow': 'imorgon',
|
'tomorrow': 'imorgon',
|
||||||
'yesterday': 'igår',
|
'yesterday': 'igår',
|
||||||
|
'next': 'nästa',
|
||||||
},
|
},
|
||||||
'days':[
|
'days':[
|
||||||
"måndag",
|
"måndag",
|
||||||
@ -302,7 +323,7 @@
|
|||||||
'_language': 'Deutsch',
|
'_language': 'Deutsch',
|
||||||
'and': 'und',
|
'and': 'und',
|
||||||
'in': 'in',
|
'in': 'in',
|
||||||
'ago': 'vor',
|
'ago': 'vor %s',
|
||||||
'now': 'jetzt',
|
'now': 'jetzt',
|
||||||
'lose': 'Du verlierst',
|
'lose': 'Du verlierst',
|
||||||
'gain': 'Du gewinnst',
|
'gain': 'Du gewinnst',
|
||||||
@ -363,7 +384,7 @@
|
|||||||
'Juli',
|
'Juli',
|
||||||
'August',
|
'August',
|
||||||
'September',
|
'September',
|
||||||
'October',
|
'Oktober',
|
||||||
'November',
|
'November',
|
||||||
'Dezember',
|
'Dezember',
|
||||||
]
|
]
|
||||||
@ -623,6 +644,8 @@
|
|||||||
'today': "aujourd'hui",
|
'today': "aujourd'hui",
|
||||||
'tomorrow': 'demain',
|
'tomorrow': 'demain',
|
||||||
'yesterday': 'hier',
|
'yesterday': 'hier',
|
||||||
|
'next': 'prochain',
|
||||||
|
'last': 'dernier',
|
||||||
},
|
},
|
||||||
'days':[
|
'days':[
|
||||||
"lundi",
|
"lundi",
|
||||||
@ -693,6 +716,8 @@
|
|||||||
'today': 'hoy',
|
'today': 'hoy',
|
||||||
'tomorrow': 'mañana',
|
'tomorrow': 'mañana',
|
||||||
'yesterday': 'ayer',
|
'yesterday': 'ayer',
|
||||||
|
'next': 'el próximo',
|
||||||
|
'last': 'el pasado',
|
||||||
},
|
},
|
||||||
'days':[
|
'days':[
|
||||||
'lunes',
|
'lunes',
|
||||||
@ -711,12 +736,26 @@
|
|||||||
'mayo',
|
'mayo',
|
||||||
'junio',
|
'junio',
|
||||||
'julio',
|
'julio',
|
||||||
'agosto'
|
'agosto',
|
||||||
'septiembre',
|
'septiembre',
|
||||||
'octubre',
|
'octubre',
|
||||||
'noviembre',
|
'noviembre',
|
||||||
'diciembre'
|
'diciembre'
|
||||||
]
|
],
|
||||||
|
'time_of_hour':{
|
||||||
|
0: '{hour} en punto',
|
||||||
|
1: '{hour} y un minuto',
|
||||||
|
15: '{hour} y quarto',
|
||||||
|
30: '{hour} y media',
|
||||||
|
45: '{hour} menos quarto',
|
||||||
|
59: '{hour} menos uno',
|
||||||
|
'past_hour': '{hour} y {minute}',
|
||||||
|
'to_hour': '{hour} menos {minute}',
|
||||||
|
},
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': 'medianoche',
|
||||||
|
'noon': 'mediodía',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'it':{
|
'it':{
|
||||||
'_language': 'Italiano',
|
'_language': 'Italiano',
|
||||||
@ -786,7 +825,21 @@
|
|||||||
'ottobre',
|
'ottobre',
|
||||||
'novembre',
|
'novembre',
|
||||||
'dicembre',
|
'dicembre',
|
||||||
]
|
],
|
||||||
|
'time_of_hour':{
|
||||||
|
0: '{hour}',
|
||||||
|
1: '{hour} e un minuto',
|
||||||
|
15: '{hour} ed un quarto',
|
||||||
|
30: '{hour} e mezzo',
|
||||||
|
45: '15 minuti alle {hour}',
|
||||||
|
59: 'un minuto alle {hour}',
|
||||||
|
'past_hour': '{hour} e {minute}',
|
||||||
|
'to_hour': '{hour} meno {minute}',
|
||||||
|
},
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': 'mezzanotte',
|
||||||
|
'noon': 'mezzogiorno',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
'pt':{
|
'pt':{
|
||||||
'_language': 'Português',
|
'_language': 'Português',
|
||||||
@ -865,9 +918,9 @@
|
|||||||
'and': 'i',
|
'and': 'i',
|
||||||
'in': 'u',
|
'in': 'u',
|
||||||
'ago': 'prije',
|
'ago': 'prije',
|
||||||
'now': 'sad',
|
'now': 'sada',
|
||||||
'lose': 'gubiš',
|
'lose': 'gubiš',
|
||||||
'gain': 'dobijaš',
|
'gain': 'dobivaš',
|
||||||
'time':{
|
'time':{
|
||||||
'format': '24-hr',
|
'format': '24-hr',
|
||||||
'year': [
|
'year': [
|
||||||
@ -905,8 +958,8 @@
|
|||||||
'today': 'danas',
|
'today': 'danas',
|
||||||
'tomorrow': 'sutra',
|
'tomorrow': 'sutra',
|
||||||
'yesterday': 'jučer',
|
'yesterday': 'jučer',
|
||||||
'next': 'slijedeći',
|
'next': 'sljedeći',
|
||||||
'last': 'prošli',
|
'last': 'protekli',
|
||||||
},
|
},
|
||||||
'days':[
|
'days':[
|
||||||
"Ponedjeljak",
|
"Ponedjeljak",
|
||||||
@ -1002,12 +1055,436 @@
|
|||||||
'Październik',
|
'Październik',
|
||||||
'Listopad',
|
'Listopad',
|
||||||
'Grudzień',
|
'Grudzień',
|
||||||
]
|
],
|
||||||
|
'time_of_hour': {
|
||||||
|
0: '{hour}',
|
||||||
|
1: 'minuta po {hour}',
|
||||||
|
15: 'kwadrans po {hour}',
|
||||||
|
30: 'pół godziny po {hour}',
|
||||||
|
45: 'za kwadrans {hour}',
|
||||||
|
59: 'za minutę {hour}',
|
||||||
|
'past_hour': '{minute} po {hour}',
|
||||||
|
'to_hour': '{minute} do {hour}'
|
||||||
|
},
|
||||||
|
'time_of_day': {
|
||||||
|
'midnight': 'północ',
|
||||||
|
'noon': 'południe'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'ru':{
|
||||||
|
'_language': 'Русский',
|
||||||
|
'and': 'и',
|
||||||
|
'in': 'в',
|
||||||
|
'ago': 'назад',
|
||||||
|
'now': 'сейчас',
|
||||||
|
'lose': 'уменьшение',
|
||||||
|
'gain': 'увеличение',
|
||||||
|
'time':{
|
||||||
|
'format': '24-hr',
|
||||||
|
'year': [
|
||||||
|
'г',
|
||||||
|
'год',
|
||||||
|
'лет',
|
||||||
|
],
|
||||||
|
'week': [
|
||||||
|
'нед',
|
||||||
|
'неделя',
|
||||||
|
'недель',
|
||||||
|
],
|
||||||
|
'day': [
|
||||||
|
'д',
|
||||||
|
'день',
|
||||||
|
'дней',
|
||||||
|
],
|
||||||
|
'hour': [
|
||||||
|
'ч',
|
||||||
|
'час',
|
||||||
|
'часов',
|
||||||
|
],
|
||||||
|
'minute': [
|
||||||
|
'мин',
|
||||||
|
'минута',
|
||||||
|
'минут',
|
||||||
|
],
|
||||||
|
'second': [
|
||||||
|
'сек',
|
||||||
|
'секунда',
|
||||||
|
'секунд',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'delta':{
|
||||||
|
'today': 'сегодня',
|
||||||
|
'tomorrow': 'завтра',
|
||||||
|
'yesterday': 'вчера',
|
||||||
|
'next': 'следующий',
|
||||||
|
'last': 'последний',
|
||||||
|
},
|
||||||
|
'days':[
|
||||||
|
"Понедельник",
|
||||||
|
"Вторник",
|
||||||
|
"Среда",
|
||||||
|
"Четверг",
|
||||||
|
"Пятница",
|
||||||
|
"Суббота",
|
||||||
|
"Воскресенье",
|
||||||
|
],
|
||||||
|
'months':[
|
||||||
|
'Январь',
|
||||||
|
'Февраль',
|
||||||
|
'Март',
|
||||||
|
'Апрель',
|
||||||
|
'Май',
|
||||||
|
'Июнь',
|
||||||
|
'Июль',
|
||||||
|
'Август',
|
||||||
|
'Сентябрь',
|
||||||
|
'Октябрь',
|
||||||
|
'Ноябрь',
|
||||||
|
'Декабрь',
|
||||||
|
],
|
||||||
|
'time_of_hour':{
|
||||||
|
0: '{hour} часов ровно',
|
||||||
|
1: '{hour} и 1 минута',
|
||||||
|
15: '{hour} с четвертью',
|
||||||
|
30: '{hour} с половиной',
|
||||||
|
45: 'без четверти {hour}',
|
||||||
|
59: 'без минуты {hour}',
|
||||||
|
'past_hour': '{hour} и {minute} минут',
|
||||||
|
'to_hour': 'без {minute} минут {hour}',
|
||||||
|
},
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': 'полночь',
|
||||||
|
'noon': 'полдень',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'uk':{
|
||||||
|
'_language': 'Українська',
|
||||||
|
'and': 'і',
|
||||||
|
'in': 'в',
|
||||||
|
'ago': 'тому',
|
||||||
|
'now': 'зараз',
|
||||||
|
'lose': 'зменшення',
|
||||||
|
'gain': 'збільшення',
|
||||||
|
'time':{
|
||||||
|
'format': '24-hr',
|
||||||
|
'year': [
|
||||||
|
'р',
|
||||||
|
'рік',
|
||||||
|
'роки',
|
||||||
|
],
|
||||||
|
'week': [
|
||||||
|
'тиж',
|
||||||
|
'тиждень',
|
||||||
|
'тижні',
|
||||||
|
],
|
||||||
|
'day': [
|
||||||
|
'д',
|
||||||
|
'день',
|
||||||
|
'дні',
|
||||||
|
],
|
||||||
|
'hour': [
|
||||||
|
'год',
|
||||||
|
'година',
|
||||||
|
'години',
|
||||||
|
],
|
||||||
|
'minute': [
|
||||||
|
'хв',
|
||||||
|
'хвилина',
|
||||||
|
'хвилини',
|
||||||
|
],
|
||||||
|
'second': [
|
||||||
|
'сек',
|
||||||
|
'секунда',
|
||||||
|
'секунди',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'delta':{
|
||||||
|
'today': 'сьогодні',
|
||||||
|
'tomorrow': 'завтра',
|
||||||
|
'yesterday': 'вчора',
|
||||||
|
'next': 'наступний',
|
||||||
|
'last': 'останній',
|
||||||
|
},
|
||||||
|
'days':[
|
||||||
|
"Понеділок",
|
||||||
|
"Вівторок",
|
||||||
|
"Середа",
|
||||||
|
"Четвер",
|
||||||
|
"П'ятниця",
|
||||||
|
"Субота",
|
||||||
|
"Неділя",
|
||||||
|
],
|
||||||
|
'months':[
|
||||||
|
'Січень',
|
||||||
|
'Лютий',
|
||||||
|
'Березень',
|
||||||
|
'Квітень',
|
||||||
|
'Травень',
|
||||||
|
'Червень',
|
||||||
|
'Липень',
|
||||||
|
'Серпень',
|
||||||
|
'Вересень',
|
||||||
|
'Жовтень',
|
||||||
|
'Листопад',
|
||||||
|
'Грудень',
|
||||||
|
],
|
||||||
|
'time_of_hour':{
|
||||||
|
0: '{hour} годин',
|
||||||
|
1: '{hour} годин(а) одна хвилина',
|
||||||
|
15: 'чверть на {hour}',
|
||||||
|
30: 'пів на {hour}',
|
||||||
|
45: 'за чверть {hour}',
|
||||||
|
59: 'за хвилину {hour}',
|
||||||
|
'past_hour': '{hour} та {minute} хвилин',
|
||||||
|
'to_hour': 'за {minute} хвилин {hour}',
|
||||||
|
},
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': 'опівночі',
|
||||||
|
'noon': 'опівдні',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'zh-Hans':{
|
||||||
|
'_language': '简体中文',
|
||||||
|
'and': '',
|
||||||
|
'in': '',
|
||||||
|
'ago': '之前',
|
||||||
|
'now': '现在',
|
||||||
|
'lose': '失去',
|
||||||
|
'gain': '获得',
|
||||||
|
'time':{
|
||||||
|
'format': '24-hr',
|
||||||
|
'year': [
|
||||||
|
'年',
|
||||||
|
'年',
|
||||||
|
'年',
|
||||||
|
],
|
||||||
|
'week': [
|
||||||
|
'周',
|
||||||
|
'星期',
|
||||||
|
'星期',
|
||||||
|
],
|
||||||
|
'day': [
|
||||||
|
'天',
|
||||||
|
'天',
|
||||||
|
'天',
|
||||||
|
],
|
||||||
|
'hour': [
|
||||||
|
'时',
|
||||||
|
'小时',
|
||||||
|
'小时',
|
||||||
|
],
|
||||||
|
'minute': [
|
||||||
|
'分',
|
||||||
|
'分钟',
|
||||||
|
'分钟',
|
||||||
|
],
|
||||||
|
'second': [
|
||||||
|
'秒',
|
||||||
|
'秒',
|
||||||
|
'秒',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'delta':{
|
||||||
|
'today': '今天',
|
||||||
|
'tomorrow': '明天',
|
||||||
|
'yesterday': '昨天',
|
||||||
|
'next': '下一个',
|
||||||
|
'last': '上一个',
|
||||||
|
},
|
||||||
|
'days':[
|
||||||
|
"星期一",
|
||||||
|
"星期二",
|
||||||
|
"星期三",
|
||||||
|
"星期四",
|
||||||
|
"星期五",
|
||||||
|
"星期六",
|
||||||
|
"星期日",
|
||||||
|
],
|
||||||
|
'months':[
|
||||||
|
'一月',
|
||||||
|
'二月',
|
||||||
|
'三月',
|
||||||
|
'四月',
|
||||||
|
'五月',
|
||||||
|
'六月',
|
||||||
|
'七月',
|
||||||
|
'八月',
|
||||||
|
'九月',
|
||||||
|
'十月',
|
||||||
|
'十一月',
|
||||||
|
'十二月',
|
||||||
|
],
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight': '午夜',
|
||||||
|
'noon': '正午',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'ko':{
|
||||||
|
'_language':'Korean',
|
||||||
|
'and':'',
|
||||||
|
'in':'후',
|
||||||
|
'ago':'전',
|
||||||
|
'now':'지금',
|
||||||
|
'lose':'감소',
|
||||||
|
'gain':'증가',
|
||||||
|
'time':{
|
||||||
|
'format':'24-hr',
|
||||||
|
'year':[
|
||||||
|
'년',
|
||||||
|
'년',
|
||||||
|
'년',
|
||||||
|
],
|
||||||
|
'week':[
|
||||||
|
'주',
|
||||||
|
'주',
|
||||||
|
'주',
|
||||||
|
],
|
||||||
|
'day':[
|
||||||
|
'일',
|
||||||
|
'일',
|
||||||
|
'일',
|
||||||
|
],
|
||||||
|
'hour':[
|
||||||
|
'시',
|
||||||
|
'시간',
|
||||||
|
'시간',
|
||||||
|
],
|
||||||
|
'minute':[
|
||||||
|
'분',
|
||||||
|
'분',
|
||||||
|
'분',
|
||||||
|
],
|
||||||
|
'second':[
|
||||||
|
'초',
|
||||||
|
'초',
|
||||||
|
'초',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'delta':{
|
||||||
|
'today':'오늘',
|
||||||
|
'tomorrow':'내일',
|
||||||
|
'yesterday':'어제',
|
||||||
|
'next':'다음',
|
||||||
|
'last':'지난',
|
||||||
|
},
|
||||||
|
'days':[
|
||||||
|
'월요일',
|
||||||
|
'화요일',
|
||||||
|
'수요일',
|
||||||
|
'목요일',
|
||||||
|
'금요일',
|
||||||
|
'토요일',
|
||||||
|
'일요일',
|
||||||
|
],
|
||||||
|
'months':[
|
||||||
|
'1월',
|
||||||
|
'2월',
|
||||||
|
'3월',
|
||||||
|
'4월',
|
||||||
|
'5월',
|
||||||
|
'6월',
|
||||||
|
'7월',
|
||||||
|
'8월',
|
||||||
|
'9월',
|
||||||
|
'10월',
|
||||||
|
'11월',
|
||||||
|
'12월',
|
||||||
|
],
|
||||||
|
'time_of_day':{
|
||||||
|
'midnight':'자정',
|
||||||
|
'noon':'정오',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'cs': {
|
||||||
|
'_language': 'Čeština',
|
||||||
|
'and': 'a',
|
||||||
|
'in': 'za',
|
||||||
|
'ago': 'před %s',
|
||||||
|
'now': 'nyní',
|
||||||
|
'lose': 'ztratit',
|
||||||
|
'gain': 'získat',
|
||||||
|
'time': {
|
||||||
|
'format': '12-hodin',
|
||||||
|
'year': [
|
||||||
|
'rok',
|
||||||
|
'rok',
|
||||||
|
'roky'
|
||||||
|
],
|
||||||
|
'week': [
|
||||||
|
'týd',
|
||||||
|
'týden',
|
||||||
|
'týdny'
|
||||||
|
],
|
||||||
|
'day': [
|
||||||
|
'd',
|
||||||
|
'den',
|
||||||
|
'dny'
|
||||||
|
],
|
||||||
|
'hour': [
|
||||||
|
'hod',
|
||||||
|
'hodina',
|
||||||
|
'hodiny'
|
||||||
|
],
|
||||||
|
'minute': [
|
||||||
|
'min',
|
||||||
|
'minuta',
|
||||||
|
'minuty'
|
||||||
|
],
|
||||||
|
'second': [
|
||||||
|
'sek',
|
||||||
|
'sekunda',
|
||||||
|
'sekundy'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'delta': {
|
||||||
|
'today': 'dnes',
|
||||||
|
'tomorrow': 'zítra',
|
||||||
|
'yesterday': 'včera',
|
||||||
|
'next': 'příští',
|
||||||
|
'last': 'poslední'
|
||||||
|
},
|
||||||
|
'days': [
|
||||||
|
'Pondělí',
|
||||||
|
'Úterý',
|
||||||
|
'Středa',
|
||||||
|
'Čtvrtek',
|
||||||
|
'Pátek',
|
||||||
|
'Sobota',
|
||||||
|
'Neděle'
|
||||||
|
],
|
||||||
|
'months': [
|
||||||
|
'Leden',
|
||||||
|
'Únor',
|
||||||
|
'Březen',
|
||||||
|
'Duben',
|
||||||
|
'Květen',
|
||||||
|
'Červen',
|
||||||
|
'Červenec',
|
||||||
|
'Srpen',
|
||||||
|
'Září',
|
||||||
|
'Říjen',
|
||||||
|
'Listopad',
|
||||||
|
'Prosinec'
|
||||||
|
],
|
||||||
|
'time_of_hour': {
|
||||||
|
0: '{hour} hodin',
|
||||||
|
1: 'minuta po {hour}',
|
||||||
|
15: 'čtvrt na {hour}',
|
||||||
|
30: 'půl {hour}',
|
||||||
|
45: 'tři čtvrtě na {hour}',
|
||||||
|
59: 'minuta do {hour}',
|
||||||
|
'past_hour': '{minute} po {hour}',
|
||||||
|
'to_hour': '{minute} do {hour}'
|
||||||
|
},
|
||||||
|
'time_of_day': {
|
||||||
|
'midnight': 'půlnoc',
|
||||||
|
'noon': 'poledne'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
{# DO NOT MODIFY BELOW THIS LINE #}
|
{# DO NOT MODIFY BELOW THIS LINE #}
|
||||||
|
{% set valid_entity_id_pattern = '^(?!.+__)(?!_)[\\da-z_]+(?<!_)\\.(?!_)[\\da-z_]+(?<!_)$' %}
|
||||||
{% set _bad_value = '?' %}
|
{% set _bad_value = '?' %}
|
||||||
{% set _durations = {
|
{% set _durations = {
|
||||||
'year': 31536000,
|
'year': 31536000,
|
||||||
@ -1091,10 +1568,10 @@
|
|||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro _check_for_duration_sensor(input) %}
|
{%- macro _check_for_duration_sensor(input) %}
|
||||||
{%- if input is string and input | regex_search('^(?!.+__)(?!_)[\da-z_]+(?<!_)\.(?!_)[\da-z_]+(?<!_)$') and input.startswith('sensor') and states[input] is not none and states[input].attributes.device_class is defined and states[input].attributes.unit_of_measurement is defined -%}
|
{%- if input is string and input | regex_search(valid_entity_id_pattern) and input.startswith('sensor') and states[input] is not none and states[input].attributes.device_class is defined and states[input].attributes.unit_of_measurement is defined -%}
|
||||||
{%- set obj = states[input] -%}
|
{%- set obj = states[input] -%}
|
||||||
{%- set divisor = _duration_sensor.get(obj.attributes.unit_of_measurement) -%}
|
{%- set multiplier = _duration_sensor.get(obj.attributes.unit_of_measurement) -%}
|
||||||
{{- (obj.state | float / divisor) | string | as_timedelta -}}
|
{{- (obj.state | float * multiplier) | string | as_timedelta -}}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{- '' -}}
|
{{- '' -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -1116,7 +1593,7 @@
|
|||||||
{#- assume time as string or entity_id -#}
|
{#- assume time as string or entity_id -#}
|
||||||
{%- elif input is string and input not in ['', 'None'] -%}
|
{%- elif input is string and input not in ['', 'None'] -%}
|
||||||
{#- if entity_id -#}
|
{#- if entity_id -#}
|
||||||
{%- if input | regex_search('^(?!.+__)(?!_)[\da-z_]+(?<!_)\.(?!_)[\da-z_]+(?<!_)$') -%}
|
{%- if input | regex_search(valid_entity_id_pattern) -%}
|
||||||
{%- if attribute is not none and attribute is string -%}
|
{%- if attribute is not none and attribute is string -%}
|
||||||
{{- _to_datetime(state_attr(input, attribute), None) -}}
|
{{- _to_datetime(state_attr(input, attribute), None) -}}
|
||||||
{%- elif input.startswith('input_datetime') and is_state_attr(input, 'has_date', False) -%}
|
{%- elif input.startswith('input_datetime') and is_state_attr(input, 'has_date', False) -%}
|
||||||
@ -1201,7 +1678,7 @@
|
|||||||
{%- set index = values.index(values | first | default) %}
|
{%- set index = values.index(values | first | default) %}
|
||||||
{%- for item in values[index:] %}
|
{%- for item in values[index:] %}
|
||||||
{%- set duration = _durations.get(item, 1) %}
|
{%- set duration = _durations.get(item, 1) %}
|
||||||
{%- set period = _periods.get(item, 1) %}
|
{%- set period = _periods.get(item, 0) %}
|
||||||
{%- set value = ((seconds // duration) % (period if period else duration)) | int %}
|
{%- set value = ((seconds // duration) % (period if period else duration)) | int %}
|
||||||
{%- if value > 0 or raw %}
|
{%- if value > 0 or raw %}
|
||||||
{%- if ns.ret | length == 0 %}
|
{%- if ns.ret | length == 0 %}
|
||||||
@ -1252,8 +1729,8 @@
|
|||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro _time_between(func, input1, attr1, utc1, input2, attr2, utc2) -%}
|
{%- macro _time_between(func, input1, attr1, utc1, input2, attr2, utc2) -%}
|
||||||
{%- set t1 = _to_datetime(input1, attr1, utc1) | as_datetime -%}
|
{%- set t1 = _to_datetime(input1, attr1, utc1) | as_datetime | as_local -%}
|
||||||
{%- set t2 = _to_datetime(input2, attr2, utc2) | as_datetime -%}
|
{%- set t2 = _to_datetime(input2, attr2, utc2) | as_datetime | as_local -%}
|
||||||
{%- if t1 is not none and t2 is not none -%}
|
{%- if t1 is not none and t2 is not none -%}
|
||||||
{{- func(t1, t2) -}}
|
{{- func(t1, t2) -}}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
@ -1320,16 +1797,19 @@
|
|||||||
{%- if uptime %}
|
{%- if uptime %}
|
||||||
{%- set value = _delta_seconds(now(), uptime) | int %}
|
{%- set value = _delta_seconds(now(), uptime) | int %}
|
||||||
{%- set seconds = value | abs %}
|
{%- set seconds = value | abs %}
|
||||||
{%- set future = value / seconds > 0 %}
|
{%- set current = value == 0 %}
|
||||||
|
{%- set future = not current and value / seconds > 0 %}
|
||||||
{%- set items = _just_time(seconds, language, values, biggest, short=short, floor=floor) %}
|
{%- set items = _just_time(seconds, language, values, biggest, short=short, floor=floor) %}
|
||||||
{%- if future %}
|
{%- if current %}
|
||||||
|
{{- items }}
|
||||||
|
{%- elif future %}
|
||||||
{{- translate('in', language=language) }} {{ items }}
|
{{- translate('in', language=language) }} {{ items }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{%- set t = translate('ago', language=language) %}
|
{%- set t = translate('ago', language=language) %}
|
||||||
{%- if '%s' in t %}
|
{%- if '%s' in t %}
|
||||||
{{ t % items }}
|
{{- t % items }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{- items }} {{ translate('ago', language=language) }}
|
{{- items }} {{ t }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
@ -1411,6 +1891,16 @@
|
|||||||
{{- _next_weekday(weekday, -7) }}
|
{{- _next_weekday(weekday, -7) }}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
{%- macro nearest_day(weekday) %}
|
||||||
|
{%- set today_timestamp = as_timestamp(today_at())|int %}
|
||||||
|
{%- set this_weekday_timestamp = as_timestamp(this_weekday(weekday))|int %}
|
||||||
|
{%- if today_timestamp < this_weekday_timestamp %}
|
||||||
|
{{- _next_weekday(weekday, 0) }}
|
||||||
|
{%- else %}
|
||||||
|
{{- _next_weekday(weekday, 7) }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro days_in_month(month=None) %}
|
{%- macro days_in_month(month=None) %}
|
||||||
{%- set today = today_at() %}
|
{%- set today = today_at() %}
|
||||||
{%- set input = month if month is not none else today.month %}
|
{%- set input = month if month is not none else today.month %}
|
||||||
@ -1527,30 +2017,36 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro month(month=None, language=None) %}
|
{%- macro month(month=None, language=None, short=False) %}
|
||||||
{%- if month is datetime %}
|
{%- if month is datetime %}
|
||||||
{%- set idx = month.month - 1 %}
|
{%- set idx = month.month - 1 %}
|
||||||
{%- elif month is integer and month > 0 %}
|
{%- elif month is integer and month > 0 %}
|
||||||
{%- set idx = (month - 1) % 12 %}
|
{%- set idx = (month - 1) % 12 %}
|
||||||
|
{%- elif month | regex_match(valid_entity_id_pattern) %}
|
||||||
|
{%- set idx = (states(month) | as_datetime | as_local).month - 1 %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{%- set idx = now().month - 1 %}
|
{%- set idx = now().month - 1 %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{{- translate('months', index=idx, language=language) }}
|
{%- set ret = translate('months', index=idx, language=language) %}
|
||||||
|
{{- ret[:3] if short else ret }}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro weekday(weekday=None, language=None) %}
|
{%- macro weekday(weekday=None, language=None, short=False) %}
|
||||||
{%- if weekday is datetime %}
|
{%- if weekday is datetime %}
|
||||||
{%- set idx = weekday.weekday() %}
|
{%- set idx = weekday.weekday() %}
|
||||||
{%- elif weekday is integer and weekday > 0 %}
|
{%- elif weekday is integer and weekday > 0 %}
|
||||||
{%- set idx = (weekday - 1) % 7 %}
|
{%- set idx = (weekday - 1) % 7 %}
|
||||||
|
{%- elif weekday | regex_match(valid_entity_id_pattern) %}
|
||||||
|
{%- set idx = (states(weekday) | as_datetime | as_local).weekday() %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{%- set idx = now().weekday() %}
|
{%- set idx = now().weekday() %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{{- translate('days', index=idx, language=language) }}
|
{%- set ret = translate('days', index=idx, language=language) %}
|
||||||
|
{{- ret[:3] if short else ret }}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro count_the_days(input, attr, utc=False) %}
|
{%- macro count_the_days(input, attr, utc=False) %}
|
||||||
{%- set input = _to_datetime(input, attr, utc) | as_datetime %}
|
{%- set input = _to_datetime(input, attr, utc) | as_datetime | as_local %}
|
||||||
{%- set midnight = today_at() %}
|
{%- set midnight = today_at() %}
|
||||||
{{- (input - midnight).days }}
|
{{- (input - midnight).days }}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
@ -1561,7 +2057,7 @@
|
|||||||
{%- set ns = namespace(days=[]) %}
|
{%- set ns = namespace(days=[]) %}
|
||||||
{%- for i in range(-7, 14) %}
|
{%- for i in range(-7, 14) %}
|
||||||
{%- set prefix = translate('delta', 'last', language=language) ~ ' ' if i < -1 else translate('delta', 'next', language=language) ~ ' ' if i > 6 else '' %}
|
{%- set prefix = translate('delta', 'last', language=language) ~ ' ' if i < -1 else translate('delta', 'next', language=language) ~ ' ' if i > 6 else '' %}
|
||||||
{%- set ns.days = ns.days + [ (i | string, prefix ~ _days.get(i, weekday(midnight.weekday() + i + 1, language))) ] %}
|
{%- set ns.days = ns.days + [ (i | string, prefix ~ _days.get(i, weekday(midnight.weekday() + (i % 7) + 1, language))) ] %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- set collection = dict.from_keys(ns.days) %}
|
{%- set collection = dict.from_keys(ns.days) %}
|
||||||
{%- set days = count_the_days(input, attr, utc) %}
|
{%- set days = count_the_days(input, attr, utc) %}
|
||||||
@ -1577,7 +2073,7 @@
|
|||||||
{%- if '%s' in t %}
|
{%- if '%s' in t %}
|
||||||
{{- t % ret }}
|
{{- t % ret }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{- ret }} {{ translate('ago', language=language) }}
|
{{- ret }} {{ t }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@ -1586,16 +2082,20 @@
|
|||||||
{%- macro hour(hour, language=None) %}
|
{%- macro hour(hour, language=None) %}
|
||||||
{%- if hour is datetime %}
|
{%- if hour is datetime %}
|
||||||
{%- set hour = hour.hour %}
|
{%- set hour = hour.hour %}
|
||||||
|
{%- elif hour | regex_match(valid_entity_id_pattern) %}
|
||||||
|
{%- set hour = (states(hour) | as_datetime | as_local).hour %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- set _12 = not (hour % 12) %}
|
{%- set _12 = not (hour % 12) %}
|
||||||
{%- set _24 = not (hour % 24) %}
|
{%- set _24 = not (hour % 24) %}
|
||||||
{%- set _12hr = translate('time','format') == '12-hr' %}
|
{%- set use_twelve = translate('time_of_day', 'use_twelve', language=language, fallback=false) %}
|
||||||
{%- if _12 and _24 and _12hr %}
|
{%- set _12hr = translate('time','format', language=language) == '12-hr' %}
|
||||||
|
{%- if _12 and _24 and _12hr and not use_twelve %}
|
||||||
{{- translate('time_of_day', 'midnight', language=language) }}
|
{{- translate('time_of_day', 'midnight', language=language) }}
|
||||||
{%- elif _12 and _12hr %}
|
{%- elif _12 and _12hr and not use_twelve %}
|
||||||
{{- translate('time_of_day', 'noon', language=language) }}
|
{{- translate('time_of_day', 'noon', language=language) }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{{- hour % 12 if _12hr else hour }}
|
{%- set ret = hour % 12 if _12hr else hour %}
|
||||||
|
{{- 12 if ret == 0 and use_twelve else ret }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
@ -1617,7 +2117,22 @@
|
|||||||
{%- set hour_phrase = hour(this_hour, language=language) %}
|
{%- set hour_phrase = hour(this_hour, language=language) %}
|
||||||
{%- set minute_phrase = _phrase('minute', 60 * this_minute, language, True, True) if this_minute % 5 else this_minute | string %}
|
{%- set minute_phrase = _phrase('minute', 60 * this_minute, language, True, True) if this_minute % 5 else this_minute | string %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if this_minute in [0, 1, 15, 30, 45, 59] %}
|
{%- set this_config = translate('time_of_hour', language=language) %}
|
||||||
|
{%- if (16 <= this_minute <= 29 and 'to_half_hour' in this_config) or (31 <= this_minute <= 44 and 'past_half_hour' in this_config) or (this_minute == 30 and 'half_hour' in this_config) %}
|
||||||
|
{%- set hour_phrase = hour(this_hour + 1, language=language) %}
|
||||||
|
{%- if 16 <= this_minute <= 29 %}
|
||||||
|
{%- set minute_calc = 30 - this_minute %}
|
||||||
|
{%- set fmat = translate('time_of_hour', 'to_half_hour', language=language) %}
|
||||||
|
{%- set minute_phrase = _phrase('minute', 60 * minute_calc, language, True, True) if this_minute % 5 else minute_calc | string %}
|
||||||
|
{%- elif 31 <= this_minute <= 44 %}
|
||||||
|
{%- set minute_calc = this_minute - 30 %}
|
||||||
|
{%- set fmat = translate('time_of_hour', 'past_half_hour', language=language) %}
|
||||||
|
{%- set minute_phrase = _phrase('minute', 60 * minute_calc, language, True, True) if this_minute % 5 else minute_calc | string %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set minute_calc = None %}
|
||||||
|
{%- set fmat = translate('time_of_hour', 'half_hour', language=language) %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- elif this_minute in [0, 1, 15, 30, 45, 59] %}
|
||||||
{%- if hour_phrase in ['noon', 'midnight'] and this_minute == 0 %}
|
{%- if hour_phrase in ['noon', 'midnight'] and this_minute == 0 %}
|
||||||
{%- set fmat = '{hour}' %}
|
{%- set fmat = '{hour}' %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
@ -1,234 +1,358 @@
|
|||||||
{#
|
{#
|
||||||
set phrases to be used in the relative_time_period macro
|
set phrases to be used in the relative_time_period macro
|
||||||
one list item per language, each time fraction contains a list with the singular, plural and abbriviated phrase
|
one list item per language, each time fraction contains a list with the short and several long forms of time units
|
||||||
combine contains the text to combine the last time fraction, and error the text to display on wrong date input
|
combine contains the text to combine the last time fraction, and error the text to display on wrong date input
|
||||||
|
Plural forms for languages: https://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
|
||||||
|
asian: ja, vi, ko
|
||||||
|
english: en, de, nl, sv, da, no, nb, nn, fo, es, pt, it, bg, el, fi, et, he, eo, hu, tr, ca
|
||||||
|
french: pt_BR, fr
|
||||||
|
latvian: lv
|
||||||
|
irish: ga
|
||||||
|
romanian: ro
|
||||||
|
lithuanian: lv
|
||||||
|
russian: ru, uk, be, sr, hr
|
||||||
|
slovak: cs, sk
|
||||||
|
polish: pl
|
||||||
|
slovenian: sl
|
||||||
|
arabic: ar
|
||||||
#}
|
#}
|
||||||
{%- set _time_period_phrases = [
|
{%- set _time_period_phrases = [
|
||||||
{
|
{
|
||||||
'language': 'en',
|
'language': 'en',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['year', 'years', 'yr'],
|
'year': ['yr', 'year', 'years'],
|
||||||
'month': ['month', 'months', 'mth'],
|
'month': ['mth', 'month', 'months'],
|
||||||
'week': ['week', 'weeks', 'wk'],
|
'week': ['wk', 'week', 'weeks'],
|
||||||
'day': ['day', 'days', 'day'],
|
'day': ['day', 'day', 'days'],
|
||||||
'hour': ['hour', 'hours', 'hr'],
|
'hour': ['hr', 'hour', 'hours'],
|
||||||
'minute': ['minute', 'minutes', 'min'],
|
'minute': ['min', 'minute', 'minutes'],
|
||||||
'second': ['second', 'seconds', 'sec'],
|
'second': ['sec', 'second', 'seconds'],
|
||||||
'millisecond': ['millisecond', 'milliseconds', 'ms'],
|
'millisecond': ['ms', 'millisecond', 'milliseconds'],
|
||||||
'combine': 'and',
|
'combine': 'and',
|
||||||
'error': 'Invalid date',
|
'error': 'Invalid date',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'pl',
|
'language': 'pl',
|
||||||
|
'plural_form': 'polish',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['rok', 'lat', 'r'],
|
'year': ['r', 'rok', 'lata', 'lat'],
|
||||||
'month': ['miesiąc', 'miesięcy', 'msc'],
|
'month': ['msc', 'miesiąc', 'miesiące', 'miesięcy'],
|
||||||
'week': ['tydzień', 'tygodni', 'tyg'],
|
'week': ['tyg', 'tydzień', 'tygodnie', 'tygodni'],
|
||||||
'day': ['dzień', 'dni', 'dzień'],
|
'day': ['dzień', 'dzień', 'dni', 'dni'],
|
||||||
'hour': ['godzina', 'godzin', 'godz'],
|
'hour': ['godz', 'godzina', 'godziny', 'godzin'],
|
||||||
'minute': ['minuta', 'minut', 'min'],
|
'minute': ['min', 'minuta', 'minuty', 'minut'],
|
||||||
'second': ['sekunda', 'sekund', 'sek'],
|
'second': ['sek', 'sekunda', 'sekundy', 'sekund'],
|
||||||
'millisecond': ['milisekunda', 'milisekund', 'ms'],
|
'millisecond': ['ms', 'milisekunda', 'milisekundy', 'milisekund'],
|
||||||
'combine': 'i',
|
'combine': 'i',
|
||||||
'error': 'Niepoprawna data',
|
'error': 'Niepoprawna data',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'fr',
|
'language': 'fr',
|
||||||
|
'plural_form': 'french',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['année', 'années', 'an'],
|
'year': ['an', 'année', 'années'],
|
||||||
'month': ['mois', 'mois', 'mois'],
|
'month': ['mois', 'mois', 'mois'],
|
||||||
'week': ['semaine', 'semaines', 'sem'],
|
'week': ['sem', 'semaine', 'semaines'],
|
||||||
'day': ['jour', 'jours', 'j'],
|
'day': ['j', 'jour', 'jours'],
|
||||||
'hour': ['heure', 'heures', 'h'],
|
'hour': ['h', 'heure', 'heures'],
|
||||||
'minute': ['minute', 'minutes', 'min'],
|
'minute': ['min', 'minute', 'minutes'],
|
||||||
'second': ['seconde', 'secondes', 'sec'],
|
'second': ['sec', 'seconde', 'secondes'],
|
||||||
'millisecond': ['milliseconde', 'millisecondes', 'ms'],
|
'millisecond': ['ms', 'milliseconde', 'millisecondes'],
|
||||||
'combine': 'et',
|
'combine': 'et',
|
||||||
'error': 'Date non valide',
|
'error': 'Date non valide',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'it',
|
'language': 'it',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['anno', 'anni', 'aa'],
|
'year': ['aa', 'anno', 'anni'],
|
||||||
'month': ['mese', 'mesi', 'mm'],
|
'month': ['mm', 'mese', 'mesi'],
|
||||||
'week': ['settimana', 'settimane', 'set'],
|
'week': ['set', 'settimana', 'settimane'],
|
||||||
'day': ['giorno', 'giorni', 'gg'],
|
'day': ['gg', 'giorno', 'giorni'],
|
||||||
'hour': ['ora', 'ore', 'h'],
|
'hour': ['h', 'ora', 'ore'],
|
||||||
'minute': ['minuto', 'minuti', 'min'],
|
'minute': ['min', 'minuto', 'minuti'],
|
||||||
'second': ['secondo', 'secondi', 'sec'],
|
'second': ['sec', 'secondo', 'secondi'],
|
||||||
'millisecond': ['millisecondo', 'millisecondi', 'ms'],
|
'millisecond': ['ms', 'millisecondo', 'millisecondi'],
|
||||||
'combine': 'e',
|
'combine': 'e',
|
||||||
'error': 'Data non valida',
|
'error': 'Data non valida',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'nb',
|
'language': 'nb',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['år', 'år', 'år'],
|
'year': ['år', 'år', 'år'],
|
||||||
'month': ['måned', 'måneder', 'mnd'],
|
'month': ['mnd', 'måned', 'måneder'],
|
||||||
'week': ['uke', 'uker', 'u'],
|
'week': ['u', 'uke', 'uker'],
|
||||||
'day': ['dag', 'dager', 'd'],
|
'day': ['d', 'dag', 'dager'],
|
||||||
'hour': ['time', 'timer', 't'],
|
'hour': ['t', 'time', 'timer'],
|
||||||
'minute': ['minutt', 'minutter', 'min'],
|
'minute': ['min', 'minutt', 'minutter'],
|
||||||
'second': ['sekund', 'sekunder', 'sek'],
|
'second': ['sek', 'sekund', 'sekunder'],
|
||||||
'millisecond': ['millisekund', 'millisekunder', 'ms'],
|
'millisecond': ['ms', 'millisekund', 'millisekunder'],
|
||||||
'combine': 'og',
|
'combine': 'og',
|
||||||
'error': 'Ugyldig dato',
|
'error': 'Ugyldig dato',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'nl',
|
'language': 'nl',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['jaar', 'jaar', 'jr'],
|
'year': ['jr', 'jaar', 'jaar'],
|
||||||
'month': ['maand', 'maanden', 'mnd'],
|
'month': ['mnd', 'maand', 'maanden'],
|
||||||
'week': ['week', 'weken', 'wk'],
|
'week': ['wk', 'week', 'weken'],
|
||||||
'day': ['dag', 'dagen', 'dg'],
|
'day': ['dg', 'dag', 'dagen'],
|
||||||
'hour': ['uur', 'uur', 'u'],
|
'hour': ['u', 'uur', 'uur'],
|
||||||
'minute': ['minuut', 'minuten', 'min'],
|
'minute': ['min', 'minuut', 'minuten'],
|
||||||
'second': ['seconde', 'seconden', 'sec'],
|
'second': ['sec', 'seconde', 'seconden'],
|
||||||
'millisecond': ['milliseconde', 'milliseconden', 'ms'],
|
'millisecond': ['ms', 'milliseconde', 'milliseconden'],
|
||||||
'combine': 'en',
|
'combine': 'en',
|
||||||
'error': 'Ongeldige datum',
|
'error': 'Ongeldige datum',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'nn',
|
'language': 'nn',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['år', 'år', 'år'],
|
'year': ['år', 'år', 'år'],
|
||||||
'month': ['månad', 'månader', 'mnd'],
|
'month': ['mnd', 'månad', 'månader'],
|
||||||
'week': ['veke', 'veker', 'v'],
|
'week': ['v', 'veke', 'veker'],
|
||||||
'day': ['dag', 'dagar', 'd'],
|
'day': ['d', 'dag', 'dagar'],
|
||||||
'hour': ['time', 'timar', 't'],
|
'hour': ['t', 'time', 'timar'],
|
||||||
'minute': ['minutt', 'minutt', 'min'],
|
'minute': ['min', 'minutt', 'minutt'],
|
||||||
'second': ['sekund', 'sekund', 'sek'],
|
'second': ['sek', 'sekund', 'sekund'],
|
||||||
'millisecond': ['millisekund', 'millisekund', 'ms'],
|
'millisecond': ['ms', 'millisekund', 'millisekund'],
|
||||||
'combine': 'og',
|
'combine': 'og',
|
||||||
'error': 'Ugyldig dato',
|
'error': 'Ugyldig dato',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'de',
|
'language': 'de',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['Jahr', 'Jahre', 'J.'],
|
'year': ['J.', 'Jahr', 'Jahre'],
|
||||||
'month': ['Monat', 'Monate', 'M.'],
|
'month': ['M.', 'Monat', 'Monate'],
|
||||||
'week': ['Woche', 'Wochen', 'Wo.'],
|
'week': ['Wo.', 'Woche', 'Wochen'],
|
||||||
'day': ['Tag', 'Tage', 'Tg.'],
|
'day': ['Tg.', 'Tag', 'Tage'],
|
||||||
'hour': ['Stunde', 'Stunden', 'Std.'],
|
'hour': ['Std.', 'Stunde', 'Stunden'],
|
||||||
'minute': ['Minute', 'Minuten', 'Min.'],
|
'minute': ['Min.', 'Minute', 'Minuten'],
|
||||||
'second': ['Sekunde', 'Sekunden', 'Sek.'],
|
'second': ['Sek.', 'Sekunde', 'Sekunden'],
|
||||||
'millisecond': ['Millisekunde', 'Millisekunden', 'ms'],
|
'millisecond': ['ms', 'Millisekunde', 'Millisekunden'],
|
||||||
'combine': 'und',
|
'combine': 'und',
|
||||||
'error': 'Falsches Datum',
|
'error': 'Falsches Datum',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'pt',
|
'language': 'pt',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['ano', 'anos', 'aa'],
|
'year': ['aa', 'ano', 'anos'],
|
||||||
'month': ['mês', 'meses', 'mm'],
|
'month': ['mm', 'mês', 'meses'],
|
||||||
'week': ['semana', 'semanas', 'sem'],
|
'week': ['sem', 'semana', 'semanas'],
|
||||||
'day': ['dia', 'dias', 'd'],
|
'day': ['d', 'dia', 'dias'],
|
||||||
'hour': ['hora', 'horas', 'h'],
|
'hour': ['h', 'hora', 'horas'],
|
||||||
'minute': ['minuto', 'minutos', 'min'],
|
'minute': ['min', 'minuto', 'minutos'],
|
||||||
'second': ['segundo', 'segundos', 'seg'],
|
'second': ['seg', 'segundo', 'segundos'],
|
||||||
'millisecond': ['millissegundo', 'millissegundos', 'ms'],
|
'millisecond': ['ms', 'millissegundo', 'millissegundos'],
|
||||||
'combine': 'e',
|
'combine': 'e',
|
||||||
'error': 'Data Inválida',
|
'error': 'Data Inválida',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'dk',
|
'language': 'dk',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['år', 'år', 'år'],
|
'year': ['år', 'år', 'år'],
|
||||||
'month': ['måned', 'måneder', 'mnd'],
|
'month': ['mnd', 'måned', 'måneder'],
|
||||||
'week': ['uge', 'uger', 'uge'],
|
'week': ['uge', 'uge', 'uger'],
|
||||||
'day': ['dag', 'dage', 'dag'],
|
'day': ['dag', 'dag', 'dage'],
|
||||||
'hour': ['time', 'timer', 't.'],
|
'hour': ['t.', 'time', 'timer'],
|
||||||
'minute': ['minut', 'minuter', 'min.'],
|
'minute': ['min.', 'minut', 'minuter'],
|
||||||
'second': ['sekund', 'sekunder', 'sek.'],
|
'second': ['sek.', 'sekund', 'sekunder'],
|
||||||
'millisecond': ['millisekund', 'millisekunder', 'ms.'],
|
'millisecond': ['ms.', 'millisekund', 'millisekunder'],
|
||||||
'combine': 'og',
|
'combine': 'og',
|
||||||
'error': 'Ugyldig dato',
|
'error': 'Ugyldig dato',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'sv',
|
'language': 'sv',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['år', 'år', 'år'],
|
'year': ['år', 'år', 'år'],
|
||||||
'month': ['månad', 'månader', 'mån'],
|
'month': ['mån', 'månad', 'månader'],
|
||||||
'week': ['vecka', 'veckor', 'v'],
|
'week': ['v', 'vecka', 'veckor'],
|
||||||
'day': ['dag', 'dagar', 'dag'],
|
'day': ['dag', 'dag', 'dagar'],
|
||||||
'hour': ['timme', 'timmar', 'tim'],
|
'hour': ['tim', 'timme', 'timmar'],
|
||||||
'minute': ['minut', 'minuter', 'min'],
|
'minute': ['min', 'minut', 'minuter'],
|
||||||
'second': ['sekund', 'sekunder', 'sek'],
|
'second': ['sek', 'sekund', 'sekunder'],
|
||||||
'millisecond': ['millisekund', 'millisekunder', 'ms'],
|
'millisecond': ['ms', 'millisekund', 'millisekunder'],
|
||||||
'combine': 'och',
|
'combine': 'och',
|
||||||
'error': 'Ogiltigt datum',
|
'error': 'Ogiltigt datum',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'cs',
|
'language': 'cs',
|
||||||
|
'plural_form': 'slovak',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['rok', 'roky', 'rok'],
|
'year': ['rok', 'rok', 'roky', 'let'],
|
||||||
'month': ['měsíc', 'měsíce', 'měs'],
|
'month': ['měs', 'měsíc', 'měsíce', 'měsíců'],
|
||||||
'week': ['týden', 'týdny', 'týd'],
|
'week': ['týd', 'týden', 'týdny', 'týdnů'],
|
||||||
'day': ['den', 'dny', 'd'],
|
'day': ['d', 'den', 'dny', 'dní'],
|
||||||
'hour': ['hodina', 'hodiny', 'hod'],
|
'hour': ['hod', 'hodina', 'hodiny', 'hodin'],
|
||||||
'minute': ['minuta', 'minuty', 'min'],
|
'minute': ['min', 'minuta', 'minuty', 'minut'],
|
||||||
'second': ['sekunda', 'sekundy', 'sek'],
|
'second': ['sek', 'sekunda', 'sekundy', 'sekund'],
|
||||||
'millisecond': ['millisekunda', 'millisekundy', 'ms'],
|
'millisecond': ['ms', 'millisekunda', 'millisekundy', 'millisekund'],
|
||||||
'combine': 'a',
|
'combine': 'a',
|
||||||
'error': 'špatný datum'
|
'error': 'špatné datum'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'fi',
|
'language': 'fi',
|
||||||
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['vuosi', 'vuotta', 'v'],
|
'year': ['v', 'vuosi', 'vuotta'],
|
||||||
'month': ['kuukausi', 'kuukautta', 'kk'],
|
'month': ['kk', 'kuukausi', 'kuukautta'],
|
||||||
'week': ['viikko', 'viikkoa', 'vk'],
|
'week': ['vk', 'viikko', 'viikkoa'],
|
||||||
'day': ['päivä', 'päivää', 'pv'],
|
'day': ['pv', 'päivä', 'päivää'],
|
||||||
'hour': ['tunti', 'tuntia', 't'],
|
'hour': ['t', 'tunti', 'tuntia'],
|
||||||
'minute': ['minuutti', 'minuuttia', 'min'],
|
'minute': ['min', 'minuutti', 'minuuttia'],
|
||||||
'second': ['sekunti', 'sekuntia', 's'],
|
'second': ['s', 'sekunti', 'sekuntia'],
|
||||||
'millisecond': ['millisekunti', 'millisekuntia', 'ms'],
|
'millisecond': ['ms', 'millisekunti', 'millisekuntia'],
|
||||||
'combine': 'ja',
|
'combine': 'ja',
|
||||||
'error': 'Väärä päivämäärä',
|
'error': 'Väärä päivämäärä',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'ru',
|
'language': 'ru',
|
||||||
|
'plural_form': 'russian',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['год', 'года', 'г'],
|
'year': ['г', 'год', 'года', 'лет'],
|
||||||
'month': ['месяц', 'месяцы', 'м'],
|
'month': ['м', 'месяц', 'месяца', 'месяцев'],
|
||||||
'week': ['неделя', 'недели', 'н'],
|
'week': ['н', 'неделя', 'недели', 'недель'],
|
||||||
'day': ['день', 'дни', 'д'],
|
'day': ['д', 'день', 'дня', 'дней'],
|
||||||
'hour': ['час', 'часы', 'ч'],
|
'hour': ['ч', 'час', 'часа', 'часов'],
|
||||||
'minute': ['минута', 'минут', 'м'],
|
'minute': ['м', 'минута', 'минуты', 'минут'],
|
||||||
'second': ['секунд', 'секунды', 'с'],
|
'second': ['с', 'секунда', 'секунды', 'секунд'],
|
||||||
'millisecond': ['милисекунд', 'милисекунды', 'мс'],
|
'millisecond': ['мс', 'миллисекунда', 'миллисекунды', 'миллисекунд'],
|
||||||
'combine': 'и',
|
'combine': 'и',
|
||||||
'error': 'Неверная дата',
|
'error': 'Неверная дата',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'language': 'uk',
|
'language': 'uk',
|
||||||
|
'plural_form': 'russian',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
'year': ['рік', 'років', 'р'],
|
'year': ['р', 'рік', 'роки', 'років'],
|
||||||
'month': ['місяць', 'місяців', 'м'],
|
'month': ['м', 'місяць', 'місяці', 'місяців'],
|
||||||
'week': ['тиждень', 'тижнів', 'тижд'],
|
'week': ['тижд', 'тиждень', 'тижні', 'тижнів'],
|
||||||
'day': ['день', 'днів', 'дн'],
|
'day': ['дн', 'день', 'дні', 'днів'],
|
||||||
'hour': ['годину', 'годин', 'год'],
|
'hour': ['год', 'година', 'години', 'годин'],
|
||||||
'minute': ['хвилину', 'хвилин', 'хв'],
|
'minute': ['хв', 'хвилина', 'хвилини', 'хвилин'],
|
||||||
'second': ['секунду', 'секунд', 'сек'],
|
'second': ['сек', 'секунда', 'секунди', 'секунд'],
|
||||||
'millisecond': ['мілісекунду', 'мілісекунд', 'мсек'],
|
'millisecond': ['мсек', 'мілісекунда', 'мілісекунди', 'мілісекунд'],
|
||||||
'combine': 'та',
|
'combine': 'та',
|
||||||
'error': 'Недійсна дата',
|
'error': 'Недійсна дата',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'language': 'bg',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['г', 'година', 'години'],
|
||||||
|
'month': ['м', 'месец', 'месеца'],
|
||||||
|
'week': ['седм', 'седмица', 'седмици'],
|
||||||
|
'day': ['д', 'ден', 'дни'],
|
||||||
|
'hour': ['ч', 'час', 'часа'],
|
||||||
|
'minute': ['м', 'минута', 'минути'],
|
||||||
|
'second': ['с', 'секунда', 'секунди'],
|
||||||
|
'millisecond': ['мс', 'милисекунда', 'милисекунди'],
|
||||||
|
'combine': 'и',
|
||||||
|
'error': 'Невалидна дата',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'language': 'vi',
|
||||||
|
'plural_form': 'asian',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['y', 'năm'],
|
||||||
|
'month': ['m', 'tháng'],
|
||||||
|
'week': ['w', 'tuần'],
|
||||||
|
'day': ['d', 'ngày'],
|
||||||
|
'hour': ['h', 'giờ'],
|
||||||
|
'minute': ['m', 'phút', 'phút'],
|
||||||
|
'second': ['s', 'giây'],
|
||||||
|
'millisecond': ['ms', 'mili giây'],
|
||||||
|
'combine': 'và',
|
||||||
|
'error': 'Ngày không hợp lệ',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'language': 'es',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['a', 'año', 'años'],
|
||||||
|
'month': ['m', 'mes', 'meses'],
|
||||||
|
'week': ['sem', 'semana', 'semanas'],
|
||||||
|
'day': ['d', 'día', 'días'],
|
||||||
|
'hour': ['h', 'hora', 'horas'],
|
||||||
|
'minute': ['min', 'minuto', 'minutos'],
|
||||||
|
'second': ['s', 'segundo', 'segundos'],
|
||||||
|
'millisecond': ['ms', 'milisegundo', 'milisegundos'],
|
||||||
|
'combine': 'y',
|
||||||
|
'error': 'Fecha inválida',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'language': 'he',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['שנה', 'שנה', 'שנים'],
|
||||||
|
'month': ['חודש', 'חודש', 'חודשים'],
|
||||||
|
'week': ['שבוע', 'שבוע', 'שבועות'],
|
||||||
|
'day': ['יום', 'יום', 'ימים'],
|
||||||
|
'hour': ['שעה', 'שעה', 'שעות'],
|
||||||
|
'minute': ['דקה', 'דקה', 'דקות'],
|
||||||
|
'second': ['שניה', 'שניה', 'שניות'],
|
||||||
|
'millisecond': ['מילי', 'מילישניה', 'מילישניות'],
|
||||||
|
'combine': 'ו',
|
||||||
|
'error': 'תאריך לא חוקי',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'language': 'hu',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['é', 'év', 'év'],
|
||||||
|
'month': ['hó', 'hónap', 'hónap'],
|
||||||
|
'week': ['hét', 'hét', 'hét'],
|
||||||
|
'day': ['n', 'nap', 'nap'],
|
||||||
|
'hour': ['ó', 'óra', 'óra'],
|
||||||
|
'minute': ['p', 'perc', 'perc'],
|
||||||
|
'second': ['mp', 'másodperc', 'másodperc'],
|
||||||
|
'millisecond': ['ms', 'ezredmásodperc', 'ezredmásodperc'],
|
||||||
|
'combine': 'és',
|
||||||
|
'error': 'Érvénytelen dátum',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'language': 'tr',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['yıl', 'yıl', 'yıl'],
|
||||||
|
'month': ['ay', 'ay', 'ay'],
|
||||||
|
'week': ['hf', 'hafta', 'hafta'],
|
||||||
|
'day': ['gün', 'gün', 'gün'],
|
||||||
|
'hour': ['sa', 'saat', 'saat'],
|
||||||
|
'minute': ['dk', 'dakika', 'dakika'],
|
||||||
|
'second': ['sn', 'saniye', 'saniye'],
|
||||||
|
'millisecond': ['ms', 'milisaniye', 'milisaniye'],
|
||||||
|
'combine': 've',
|
||||||
|
'error': 'Geçersiz tarih',
|
||||||
|
}
|
||||||
|
},
|
||||||
] -%}
|
] -%}
|
||||||
|
|
||||||
{# macro to convert the abbreviated input for the not_use and always_show lists to the full time part names #}
|
{# macro to convert the abbreviated input for the not_use and always_show lists to the full time part names #}
|
||||||
@ -255,12 +379,14 @@
|
|||||||
{%- set date = date if date is datetime else date | as_datetime('invalid') -%}
|
{%- set date = date if date is datetime else date | as_datetime('invalid') -%}
|
||||||
{%- set compare_date = compare_date if compare_date is datetime else compare_date | as_datetime('invalid') -%}
|
{%- set compare_date = compare_date if compare_date is datetime else compare_date | as_datetime('invalid') -%}
|
||||||
{%- set time = time | bool(true) -%}
|
{%- set time = time | bool(true) -%}
|
||||||
{%- set parts = [parts | int(1), always_show | count] | max -%}
|
{%- set parts = [parts | int(1), always_show | count] | max -%}
|
||||||
|
{# create namespace to store debug data #}
|
||||||
|
{%- set debug = namespace(debug="") -%}
|
||||||
{# 1: check if date input is correct #}
|
{# 1: check if date input is correct #}
|
||||||
{%- if date is datetime and compare_date is datetime -%}
|
{%- if date is datetime and compare_date is datetime -%}
|
||||||
{# convert date input to local or date only #}
|
{# convert date input to local or date only #}
|
||||||
{%- set date = date | as_local if time else (date | as_local).date() -%}
|
{%- set date = date | as_local if time else (date | as_local).date() -%}
|
||||||
{%- set compare_date = compare_date | as_local if time else (compare_date | as_local).date() -%}
|
{%- set compare_date = compare_date | as_local if time else (compare_date | as_local).date() -%}
|
||||||
{# determine highest and lowest date #}
|
{# determine highest and lowest date #}
|
||||||
{%- set date_max = [compare_date, date] | max -%}
|
{%- set date_max = [compare_date, date] | max -%}
|
||||||
{%- set date_min = [compare_date, date] | min -%}
|
{%- set date_min = [compare_date, date] | min -%}
|
||||||
@ -282,7 +408,7 @@
|
|||||||
{%- if not not_use in [['millisecond'], []] -%}
|
{%- if not not_use in [['millisecond'], []] -%}
|
||||||
{%- set not_use = _abbr_to_full(not_use) | from_json -%}
|
{%- set not_use = _abbr_to_full(not_use) | from_json -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- set not_use = not_use + ['hour', 'minute', 'second', 'millisecond' ] if not time else not_use -%}
|
{%- set not_use = not_use + ['hour', 'minute', 'second', 'millisecond' ] if not time else not_use -%}
|
||||||
{%- if always_show in [['all'], 'all'] -%}
|
{%- if always_show in [['all'], 'all'] -%}
|
||||||
{%- set always_show = dur.keys() | list -%}
|
{%- set always_show = dur.keys() | list -%}
|
||||||
{%- elif always_show != [] -%}
|
{%- elif always_show != [] -%}
|
||||||
@ -296,7 +422,7 @@
|
|||||||
{%- if do_use and ms < dur[do_use|last] -%}
|
{%- if do_use and ms < dur[do_use|last] -%}
|
||||||
{{- {do_use | last: (ms / dur[do_use|last]) | round(0, round_mode)} | to_json -}}
|
{{- {do_use | last: (ms / dur[do_use|last]) | round(0, round_mode)} | to_json -}}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{# check if it is needed to determine years #}
|
{# check if it is needed to determine years #}
|
||||||
{%- if ms >= dur.day * 365 -%}
|
{%- if ms >= dur.day * 365 -%}
|
||||||
{#- set numer of years, and set highest date using this number of years #}
|
{#- set numer of years, and set highest date using this number of years #}
|
||||||
{%- set yrs = date_max.year - date_min.year - (1 if date_max.replace(year=date_min.year) < date_min else 0) -%}
|
{%- set yrs = date_max.year - date_min.year - (1 if date_max.replace(year=date_min.year) < date_min else 0) -%}
|
||||||
@ -305,7 +431,7 @@
|
|||||||
{%- set ms_yrs = ms -%}
|
{%- set ms_yrs = ms -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- set yrs = yrs | default(0) -%}
|
{%- set yrs = yrs | default(0) -%}
|
||||||
{# check if it is needed to determine months #}
|
{# check if it is needed to determine months #}
|
||||||
{%- set check_mth =
|
{%- set check_mth =
|
||||||
ms >= dur.day * 28
|
ms >= dur.day * 28
|
||||||
and 'month' in do_use
|
and 'month' in do_use
|
||||||
@ -354,7 +480,7 @@
|
|||||||
{%- set first = keys | select('in', always_show | default([], true) + [first]) | first -%}
|
{%- set first = keys | select('in', always_show | default([], true) + [first]) | first -%}
|
||||||
{%- set to_use = keys[keys.index(first):] -%}
|
{%- set to_use = keys[keys.index(first):] -%}
|
||||||
{%- set to_output = to_use[:parts] -%}
|
{%- set to_output = to_use[:parts] -%}
|
||||||
{%- set last = to_output | last |default('millisecond') -%}
|
{%- set last = dur.items() | selectattr('0', 'in', to_output) | map(attribute='0') | list | last | default('millisecond') -%}
|
||||||
{# 3: check if there is anything left to use #}
|
{# 3: check if there is anything left to use #}
|
||||||
{%- if to_use -%}
|
{%- if to_use -%}
|
||||||
{%- set to_output = to_use[:parts] -%}
|
{%- set to_output = to_use[:parts] -%}
|
||||||
@ -365,9 +491,10 @@
|
|||||||
{%- set to_reject = to_use | reject('in', to_output) | reject('in', always_show) | list -%}
|
{%- set to_reject = to_use | reject('in', to_output) | reject('in', always_show) | list -%}
|
||||||
{%- set not_use = not_use + to_output[as_check*-1:] + to_reject -%}
|
{%- set not_use = not_use + to_output[as_check*-1:] + to_reject -%}
|
||||||
{%- set to_output = to_output | reject('in', not_use) | list + always_show -%}
|
{%- set to_output = to_output | reject('in', not_use) | list + always_show -%}
|
||||||
{%- set to_output = keys | select('in', to_output) | list -%}
|
{%- set to_output = keys | select('in', to_output) | list + ['extra']-%}
|
||||||
{%- set output = time_split(date, parts, compare_date, not_use, always_show, time, round_mode) | from_json -%}
|
{%- set output = time_split(date, parts, compare_date, not_use, always_show, time, round_mode) | from_json -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{# apply round if needed #}
|
{# apply round if needed #}
|
||||||
{%- if round_mode in ['common', 'ceil'] and last != 'millisecond' -%}
|
{%- if round_mode in ['common', 'ceil'] and last != 'millisecond' -%}
|
||||||
{# determine first and last item with data #}
|
{# determine first and last item with data #}
|
||||||
@ -376,22 +503,59 @@
|
|||||||
{%- set remain_part = remain / dur[last] -%}
|
{%- set remain_part = remain / dur[last] -%}
|
||||||
{%- set to_round = 1 if remain_part >= 0.5 and round_mode == 'common' else remain_part | round(0, round_mode) -%}
|
{%- set to_round = 1 if remain_part >= 0.5 and round_mode == 'common' else remain_part | round(0, round_mode) -%}
|
||||||
{%- set sec_to_add = ((dur[last] + (dur.day if last in ['year', 'month'] else 1) - remain) | round(0, 'ceil') * to_round) / 1000 -%}
|
{%- set sec_to_add = ((dur[last] + (dur.day if last in ['year', 'month'] else 1) - remain) | round(0, 'ceil') * to_round) / 1000 -%}
|
||||||
{%- set round_mode = 'floor' -%}
|
|
||||||
{%- set date_max = [compare_date, date] | max + timedelta(seconds=sec_to_add) -%}
|
{%- set date_max = [compare_date, date] | max + timedelta(seconds=sec_to_add) -%}
|
||||||
{%- set date_min = [compare_date, date] | min -%}
|
{%- set date_min = [compare_date, date] | min -%}
|
||||||
{%- set output = time_split(date_max, parts, date_min, not_use, always_show, time, round_mode) | from_json -%}
|
{%- set output = time_split(date_max, parts, date_min, not_use, always_show, time, 'floor') | from_json -%}
|
||||||
|
{%- set output = dict(output.items() | selectattr('0', 'in', do_use)) -%}
|
||||||
|
{%- set keys = output.keys() | list -%}
|
||||||
|
{%- set with_value = output.items() | rejectattr('1', 'eq', 0) | map(attribute='0') | list -%}
|
||||||
|
{%- set first = with_value | first | default('millisecond') -%}
|
||||||
|
{%- set first = keys | select('in', always_show | default([], true) + [first]) | first -%}
|
||||||
|
{%- set to_use = keys[keys.index(first):] -%}
|
||||||
|
{%- set to_output = to_use[:parts] -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{# output result #}
|
{# output result #}
|
||||||
{%- set zero_values = output.items() | selectattr('1', 'eq', 0) | map(attribute='0') | list -%}
|
{%- set zero_values = output.items() | selectattr('1', 'eq', 0) | map(attribute='0') | list -%}
|
||||||
{%- set reject_list = zero_values | reject('in', always_show) | list -%}
|
{%- set reject_list = zero_values | reject('in', always_show) | list -%}
|
||||||
{{- dict(output.items() | selectattr('0', 'in', to_output) | rejectattr('0', 'in', reject_list)) | default({always_return: 0}, true) | to_json -}}
|
{{- dict(output.items() | selectattr('0', 'in', to_output) | rejectattr('0', 'in', reject_list), **dict(debug=debug.debug) if debug.debug else dict()) | default({always_return: 0}, true) | to_json-}}
|
||||||
{%- else -%} {{- dict(error='No time parts left to output') | to_json -}}
|
{%- else -%} {{- dict(error='No time parts left to output') -}}
|
||||||
{%- endif -%} {# 3 #}
|
{%- endif -%} {# 3 #}
|
||||||
{%- endif -%} {# 2 #}
|
{%- endif -%} {# 2 #}
|
||||||
{%- else -%} {{- dict(error='Invalid date input') | to_json -}}
|
{%- else -%} {{- dict(error='Invalid date input')-}}
|
||||||
{%- endif -%} {# 1 #}
|
{%- endif -%} {# 1 #}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
{# macro for determining the time unit variant depending on the language #}
|
||||||
|
{%- macro plural(number=0, rule='english') -%}
|
||||||
|
{%- set mod100 = number % 100 -%}
|
||||||
|
{%- set mod10 = number % 10 -%}
|
||||||
|
{%- set form = 1 -%}
|
||||||
|
{%- if rule == 'english' -%}
|
||||||
|
{%- set form = 1 if number == 1 else 2 -%}
|
||||||
|
{%- elif rule == 'french' -%}
|
||||||
|
{%- set form = 1 if number <= 1 else 2 -%}
|
||||||
|
{%- elif rule == 'latvian' -%}
|
||||||
|
{%- set form = 1 if (mod10 == 1 and mod100 != 11) else 2 if number != 0 else 3 -%}
|
||||||
|
{%- elif rule == 'irish' -%}
|
||||||
|
{%- set form = 1 if number == 1 else 2 if number == 2 else 3 -%}
|
||||||
|
{%- elif rule == 'romanian' -%}
|
||||||
|
{%- set form = 1 if number == 1 else 2 if (number == 0 or (mod100 > 0 and mod100 < 20 )) else 3 -%}
|
||||||
|
{%- elif rule == 'lithuanian' -%}
|
||||||
|
{%- set form = 1 if (mod10 == 1 and mod100 != 11) else 2 if (mod10 >= 2 and (mod100 < 10 or mod100 >= 20)) else 3 -%}
|
||||||
|
{%- elif rule == 'russian' -%}
|
||||||
|
{%- set form = 1 if (mod10 == 1 and mod100 != 11) else 2 if (mod10 >= 2 and mod10 <= 4 and (mod100 < 10 or mod100 >= 20)) else 3 -%}
|
||||||
|
{%- elif rule == 'slovak' -%}
|
||||||
|
{%- set form = 1 if number == 1 else 2 if (number >= 2 and number <= 4) else 3 -%}
|
||||||
|
{%- elif rule == 'polish' -%}
|
||||||
|
{%- set form = 1 if number == 1 else 2 if (mod10 >= 2 and mod10 <= 4 and (mod100 < 10 or mod100 >= 20)) else 3 -%}
|
||||||
|
{%- elif rule == 'slovenian' -%}
|
||||||
|
{%- set form = 1 if mod100 == 1 else 2 if mod100 == 2 else 3 if (mod100 == 3 or mod100 == 4) else 4 -%}
|
||||||
|
{%- elif rule == 'arabic' -%}
|
||||||
|
{%- set form = 1 if number == 0 else 2 if number == 1 else 3 if number == 2 else 4 if (mod100 >= 3 and mod100 <= 10) else 5 if mod100 >= 11 else 6 -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- form -}}
|
||||||
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# macro to output a timedelta in a readable format #}
|
{# macro to output a timedelta in a readable format #}
|
||||||
{%- macro relative_time_plus(date, parts=1, abbr=false, language='en', compare_date=now(), not_use=['millisecond'], always_show=[], time=true, round_mode='floor') -%}
|
{%- macro relative_time_plus(date, parts=1, abbr=false, language='en', compare_date=now(), not_use=['millisecond'], always_show=[], time=true, round_mode='floor') -%}
|
||||||
{#- select correct phrases bases on language input #}
|
{#- select correct phrases bases on language input #}
|
||||||
@ -399,6 +563,7 @@
|
|||||||
{%- set languages = phrases | map(attribute='language') | list -%}
|
{%- set languages = phrases | map(attribute='language') | list -%}
|
||||||
{%- set language = iif(language in languages, language, 'en') -%}
|
{%- set language = iif(language in languages, language, 'en') -%}
|
||||||
{%- set phr = phrases | selectattr('language', 'eq', language) | map(attribute='phrases') | list | first -%}
|
{%- set phr = phrases | selectattr('language', 'eq', language) | map(attribute='phrases') | list | first -%}
|
||||||
|
{%- set plural_form = phrases | selectattr('language', 'eq', language) | map(attribute='plural_form') | list | first -%}
|
||||||
{%- set abbr = abbr | bool(false) -%}
|
{%- set abbr = abbr | bool(false) -%}
|
||||||
{# split timedelta #}
|
{# split timedelta #}
|
||||||
{%- set time_parts = time_split(date, parts, compare_date, not_use, always_show, time, round_mode) | from_json -%}
|
{%- set time_parts = time_split(date, parts, compare_date, not_use, always_show, time, round_mode) | from_json -%}
|
||||||
@ -409,9 +574,9 @@
|
|||||||
{# convert to phrases #}
|
{# convert to phrases #}
|
||||||
{%- set ns = namespace(phrases=[]) -%}
|
{%- set ns = namespace(phrases=[]) -%}
|
||||||
{%- for i in time_parts.keys() -%}
|
{%- for i in time_parts.keys() -%}
|
||||||
{%- set phr_abbr = phr[i][2] -%}
|
{%- set plural_variant = plural(time_parts[i], plural_form) | int -%}
|
||||||
{%- set phr_verb = phr[i][1] if time_parts[i] != 1 else phr[i][0] -%}
|
{%- set phr_form = phr[i][0] if abbr else phr[i][plural_variant] -%}
|
||||||
{%- set phrase = '{} {}'.format(time_parts[i], phr_abbr if abbr else phr_verb) -%}
|
{%- set phrase = '{} {}'.format(time_parts[i], phr_form) -%}
|
||||||
{%- set ns.phrases = ns.phrases + [phrase] -%}
|
{%- set ns.phrases = ns.phrases + [phrase] -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{#- join phrases in a string, using phr.combine for the last item #}
|
{#- join phrases in a string, using phr.combine for the last item #}
|
||||||
|
@ -12,21 +12,71 @@
|
|||||||
{% 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' %}
|
||||||
|
{% if 'rain delay' in game_clock %}
|
||||||
|
{# Handle cases like "Rain Delay, Top 1st" #}
|
||||||
|
{% set status, inning = game_clock.split(',', 1) %}
|
||||||
|
{% set inning_parts = inning.split(' ') %}
|
||||||
|
in a {{ status | trim }} in the {{ inning_parts[1] ~ ' of the ' ~ inning_parts[2] }} {{ period_str }}
|
||||||
|
{% else %}
|
||||||
|
{% set inning_parts = game_clock.split(' ') %}
|
||||||
|
in the {{ inning_parts[0] ~ ' of the ' ~ inning_parts[1] ~ ' ' ~ period_str }}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% if ' - ' in game_clock %}
|
||||||
|
{% set clock_time, quarter = game_clock.split(' - ') %}
|
||||||
|
{% if quarter == 'ot' %}
|
||||||
|
with {{ clock_time ~ ' remaining in overtime' }}
|
||||||
|
{% else %}
|
||||||
|
with {{ clock_time ~ ' remaining in the ' ~ quarter ~ ' ' ~ period_str }}
|
||||||
|
{% endif %}
|
||||||
|
{% 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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ 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 +84,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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
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 +97,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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
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 +109,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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
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 {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
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 %}
|
||||||
|
@ -473,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. '
|
||||||
@ -544,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.
|
||||||
|
@ -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,43 @@
|
|||||||
{% 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') %}
|
||||||
|
{% if states('sensor.home_tempest_cloud_sensors_precipitation_intensity') not in ['unavailable','unknown','no_rain'] %}
|
||||||
|
{% set intensity = states('sensor.home_tempest_cloud_sensors_precipitation_intensity') %}
|
||||||
|
{% if intensity == 'very_light' %}
|
||||||
|
There is currently a very light drizzle falling.
|
||||||
|
{% elif intensity == 'light' %}
|
||||||
|
There is currently light rain falling. Front porch windows should be okay, but other windows should be closed.
|
||||||
|
{% elif intensity == 'moderate' %}
|
||||||
|
It is raining pretty good outside, you should probably make sure all windows are closed.
|
||||||
|
{% elif intensity in ['heavy','very_heavy'] %}
|
||||||
|
There is heavy rain falling, please make sure all doors and windows are closed at this time.
|
||||||
|
{% elif intensity == 'extreme' %}
|
||||||
|
It is raining extremely hard outside. Make sure all doors and windows are closed, and I recommend staying inside until it calms down. Perhaps check for roof leaks as well.
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
It is currently raining. Make sure all doors and windows are closed!
|
||||||
|
{% endif %}
|
||||||
|
{% 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 +75,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. ",
|
||||||
@ -66,12 +105,49 @@
|
|||||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('binary_sensor.raining','on') %}
|
{% if is_state('binary_sensor.raining','on') %}
|
||||||
{{ [
|
{% if states('sensor.home_tempest_cloud_sensors_precipitation_intensity') not in ['unavailable','unknown','no_rain'] %}
|
||||||
"I have looked outside and determined that it is raining. ",
|
{% set intensity = states('sensor.home_tempest_cloud_sensors_precipitation_intensity') %}
|
||||||
"If you look outside the window, you will notice, it wainin. ",
|
{% if intensity == 'very_light' %}
|
||||||
"It wainin sideways! ",
|
{{ [
|
||||||
"There appears to be excessive moisture currently falling from the sky. Plan accordingly. ",
|
"There is currently a very light drizzle falling. ",
|
||||||
] | random }}
|
"It is drizzling outside, but it is not too bad. ",
|
||||||
|
"The sky is spitting on us. That's not very nice, but a mild inconvenience at most. "
|
||||||
|
] | random }}
|
||||||
|
{% elif intensity == 'light' %}
|
||||||
|
{{ [
|
||||||
|
"There is currently light rain falling. ",
|
||||||
|
"It is raining lightly outside, but it is not too bad. ",
|
||||||
|
"It kinda wainin outside, but just a little. "
|
||||||
|
] | random }}
|
||||||
|
"Front porch windows should be okay, but other windows should be closed. "
|
||||||
|
{% elif intensity == 'moderate' %}
|
||||||
|
{{ [
|
||||||
|
"It is raining pretty good outside, you should probably make sure all windows are closed. ",
|
||||||
|
"It is raining at a decent rate outside, please make sure all windows are closed. "
|
||||||
|
"If you look outside, you will see that it wainin. "
|
||||||
|
] | random }}
|
||||||
|
{% elif intensity in ['heavy','very_heavy'] %}
|
||||||
|
{{ [
|
||||||
|
"There is heavy rain falling, please make sure all doors and windows are closed at this time. ",
|
||||||
|
"It is raining heavily outside, please make sure all doors and windows are closed. ",
|
||||||
|
"It wainin sideways! Please make sure all doors and windows are closed. "
|
||||||
|
] | random }}
|
||||||
|
{% elif intensity == 'extreme' %}
|
||||||
|
{{ [
|
||||||
|
"It is raining extremely hard outside. ",
|
||||||
|
"There is a torrential downpour outside. ",
|
||||||
|
"Holy crap, I have never seen it rain this hard before. "
|
||||||
|
] | random }}
|
||||||
|
"Make sure all doors and windows are closed, and I recommend staying inside until it calms down. Perhaps check for roof leaks as well. "
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{{ [
|
||||||
|
"I have looked outside and determined that it is raining. ",
|
||||||
|
"If you look outside the window, you will notice, it wainin. ",
|
||||||
|
"It wainin sideways! ",
|
||||||
|
"There appears to be excessive moisture currently falling from the sky. Plan accordingly. ",
|
||||||
|
] | random }}
|
||||||
|
{% 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 %}
|
||||||
{{ [
|
{{ [
|
||||||
@ -101,7 +177,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:
|
||||||
|
@ -239,6 +239,9 @@ script:
|
|||||||
server_maintenance_annc:
|
server_maintenance_annc:
|
||||||
alias: Server Maintenance Announcement
|
alias: Server Maintenance Announcement
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.server_maintenance
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ who|default('everywhere') }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
@ -248,6 +251,9 @@ script:
|
|||||||
server_maintenance_done_annc:
|
server_maintenance_done_annc:
|
||||||
alias: Server Maintenance Done Announcement
|
alias: Server Maintenance Done Announcement
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.server_maintenance
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data:
|
data:
|
||||||
who: "{{ who|default('everywhere') }}"
|
who: "{{ who|default('everywhere') }}"
|
||||||
@ -283,7 +289,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 +325,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
|
@ -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
|
||||||
@ -112,16 +116,6 @@ template:
|
|||||||
unique_id: 2ce31844-b115-42b8-8213-feccf24e236c
|
unique_id: 2ce31844-b115-42b8-8213-feccf24e236c
|
||||||
state: "{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}"
|
state: "{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}"
|
||||||
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"
|
|
||||||
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
|
||||||
state: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}"
|
|
||||||
icon: >-
|
|
||||||
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
|
|
||||||
mdi:home-lightning-bolt
|
|
||||||
{% else %}
|
|
||||||
mdi:home-lightning-bolt-outline
|
|
||||||
{% endif %}
|
|
||||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
|
||||||
- name: "Master Bedroom Aircon Fan Mode"
|
- name: "Master Bedroom Aircon Fan Mode"
|
||||||
unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8
|
unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8
|
||||||
state: "{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}"
|
state: "{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}"
|
||||||
@ -138,6 +132,26 @@ 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 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 +197,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 +216,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:
|
||||||
@ -243,6 +261,7 @@ input_select:
|
|||||||
name: Scheduled Climate Mode - Emma Bedroom
|
name: Scheduled Climate Mode - Emma Bedroom
|
||||||
options:
|
options:
|
||||||
- AC
|
- AC
|
||||||
|
- Fan
|
||||||
- Heat
|
- Heat
|
||||||
- White Noise
|
- White Noise
|
||||||
- N/A
|
- N/A
|
||||||
@ -305,13 +324,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_bedroom_aircon_mode_threshold:
|
||||||
|
name: Emma Bedroom Aircon Mode Threshold
|
||||||
|
min: 40
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
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
|
||||||
|
@ -3,6 +3,7 @@ weather:
|
|||||||
name: "Iron Nerd Weather Station"
|
name: "Iron Nerd Weather Station"
|
||||||
condition_template: >
|
condition_template: >
|
||||||
{% set stations = [
|
{% set stations = [
|
||||||
|
states.weather.home_tempest_forecast_home,
|
||||||
states.weather.home,
|
states.weather.home,
|
||||||
states.weather.kdfi_daynight,
|
states.weather.kdfi_daynight,
|
||||||
states.weather.iron_nerd_studios,
|
states.weather.iron_nerd_studios,
|
||||||
@ -12,6 +13,7 @@ weather:
|
|||||||
{{ states(result) }}
|
{{ states(result) }}
|
||||||
temperature_template: >
|
temperature_template: >
|
||||||
{% set temps = [
|
{% set temps = [
|
||||||
|
states.sensor.home_tempest_temperature,
|
||||||
states.sensor.home_temperature,
|
states.sensor.home_temperature,
|
||||||
states.sensor.kdfi_temperature,
|
states.sensor.kdfi_temperature,
|
||||||
states.sensor.pirateweather_temperature,
|
states.sensor.pirateweather_temperature,
|
||||||
@ -20,8 +22,28 @@ weather:
|
|||||||
{% set sensor = temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
{% set sensor = temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
{{ states(sensor) | float }}
|
{{ states(sensor) | float }}
|
||||||
temperature_unit: °F
|
temperature_unit: °F
|
||||||
|
dew_point_template: >
|
||||||
|
{% set dewpoints = [
|
||||||
|
states.sensor.home_tempest_dew_point,
|
||||||
|
states.sensor.home_dew_point,
|
||||||
|
states.sensor.kdfi_dew_point,
|
||||||
|
states.sensor.pirateweather_dew_point,
|
||||||
|
states.sensor.openweathermap_dew_point
|
||||||
|
] %}
|
||||||
|
{% set sensor = dewpoints | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
|
{{ states(sensor) | float }}
|
||||||
|
apparent_temperature_template: >
|
||||||
|
{% set apparent_temps = [
|
||||||
|
states.sensor.home_tempest_feels_like,
|
||||||
|
states.sensor.home_temperature_feels_like,
|
||||||
|
states.sensor.pirateweather_apparent_temperature,
|
||||||
|
states.sensor.stratton_ave_apparent_temperature
|
||||||
|
] %}
|
||||||
|
{% set sensor = apparent_temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
|
{{ states(sensor) | float }}
|
||||||
humidity_template: >
|
humidity_template: >
|
||||||
{% set humidity = [
|
{% set humidity = [
|
||||||
|
states.sensor.home_tempest_humidity,
|
||||||
states.sensor.home_relative_humidity,
|
states.sensor.home_relative_humidity,
|
||||||
states.sensor.kdfi_relative_humidity,
|
states.sensor.kdfi_relative_humidity,
|
||||||
states.sensor.pirateweather_humidity,
|
states.sensor.pirateweather_humidity,
|
||||||
@ -40,12 +62,14 @@ weather:
|
|||||||
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
||||||
forecast_hourly_template: >
|
forecast_hourly_template: >
|
||||||
{% set forecasts = [
|
{% set forecasts = [
|
||||||
states.sensor.weather_com_hourly_weather_forecast,
|
states.sensor.weather_com_hourly_weather_forecast.attributes,
|
||||||
states.sensor.pirateweather_hourly_weather_forecast.attributes
|
states.sensor.pirateweather_hourly_weather_forecast.attributes
|
||||||
] %}
|
] %}
|
||||||
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
||||||
pressure_template: >
|
pressure_template: >
|
||||||
{% set pressures = [
|
{% set pressures = [
|
||||||
|
states.sensor.home_tempest_local_slp,
|
||||||
|
states.sensor.home_tempest_cloud_sensors_sea_level_pressure,
|
||||||
states.sensor.home_pressure,
|
states.sensor.home_pressure,
|
||||||
states.sensor.kdfi_barometric_pressure
|
states.sensor.kdfi_barometric_pressure
|
||||||
] %}
|
] %}
|
||||||
@ -92,6 +116,7 @@ weather:
|
|||||||
name: "Iron Nerd Weather Station - Hourly"
|
name: "Iron Nerd Weather Station - Hourly"
|
||||||
condition_template: >
|
condition_template: >
|
||||||
{% set stations = [
|
{% set stations = [
|
||||||
|
states.weather.home_tempest_forecast_home,
|
||||||
states.weather.home,
|
states.weather.home,
|
||||||
states.weather.tomorrow_io_stratton_ave_hourly,
|
states.weather.tomorrow_io_stratton_ave_hourly,
|
||||||
states.weather.iron_nerd_studios,
|
states.weather.iron_nerd_studios,
|
||||||
@ -102,6 +127,7 @@ weather:
|
|||||||
{{ states(result) }}
|
{{ states(result) }}
|
||||||
temperature_template: >
|
temperature_template: >
|
||||||
{% set temps = [
|
{% set temps = [
|
||||||
|
states.sensor.home_tempest_temperature,
|
||||||
states.sensor.home_temperature,
|
states.sensor.home_temperature,
|
||||||
states.sensor.kdfi_temperature,
|
states.sensor.kdfi_temperature,
|
||||||
states.sensor.pirateweather_temperature,
|
states.sensor.pirateweather_temperature,
|
||||||
@ -110,8 +136,28 @@ weather:
|
|||||||
{% set sensor = temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
{% set sensor = temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
{{ states(sensor) | float }}
|
{{ states(sensor) | float }}
|
||||||
temperature_unit: °F
|
temperature_unit: °F
|
||||||
|
dew_point_template: >
|
||||||
|
{% set dewpoints = [
|
||||||
|
states.sensor.home_tempest_dew_point,
|
||||||
|
states.sensor.home_dew_point,
|
||||||
|
states.sensor.kdfi_dew_point,
|
||||||
|
states.sensor.pirateweather_dew_point,
|
||||||
|
states.sensor.openweathermap_dew_point
|
||||||
|
] %}
|
||||||
|
{% set sensor = dewpoints | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
|
{{ states(sensor) | float }}
|
||||||
|
apparent_temperature_template: >
|
||||||
|
{% set apparent_temps = [
|
||||||
|
states.sensor.home_tempest_feels_like,
|
||||||
|
states.sensor.home_temperature_feels_like,
|
||||||
|
states.sensor.pirateweather_apparent_temperature,
|
||||||
|
states.sensor.stratton_ave_apparent_temperature
|
||||||
|
] %}
|
||||||
|
{% set sensor = apparent_temps | selectattr('state','ne','unavailable') | selectattr('state','ne','unknown') | map(attribute='entity_id') | list | first %}
|
||||||
|
{{ states(sensor) | float }}
|
||||||
humidity_template: >
|
humidity_template: >
|
||||||
{% set humidity = [
|
{% set humidity = [
|
||||||
|
states.sensor.home_tempest_humidity,
|
||||||
states.sensor.home_relative_humidity,
|
states.sensor.home_relative_humidity,
|
||||||
states.sensor.kdfi_relative_humidity,
|
states.sensor.kdfi_relative_humidity,
|
||||||
states.sensor.pirateweather_humidity,
|
states.sensor.pirateweather_humidity,
|
||||||
@ -121,13 +167,15 @@ weather:
|
|||||||
{{ states(result) | float }}
|
{{ states(result) | float }}
|
||||||
forecast_hourly_template: >
|
forecast_hourly_template: >
|
||||||
{% set forecasts = [
|
{% set forecasts = [
|
||||||
states.sensor.weather_com_hourly_weather_forecast,
|
states.sensor.weather_com_hourly_weather_forecast.attributes,
|
||||||
states.weather.tomorrow_io_stratton_ave_hourly.attributes,
|
states.weather.tomorrow_io_stratton_ave_hourly.attributes,
|
||||||
states.sensor.pirateweather_hourly_weather_forecast.attributes
|
states.sensor.pirateweather_hourly_weather_forecast.attributes
|
||||||
] %}
|
] %}
|
||||||
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
{{ forecasts | selectattr('forecast','defined') | map(attribute='forecast') | list | first }}
|
||||||
pressure_template: >
|
pressure_template: >
|
||||||
{% set pressures = [
|
{% set pressures = [
|
||||||
|
states.sensor.home_tempest_local_slp,
|
||||||
|
states.sensor.home_tempest_cloud_sensors_sea_level_pressure,
|
||||||
states.sensor.home_pressure,
|
states.sensor.home_pressure,
|
||||||
states.sensor.kdfi_barometric_pressure
|
states.sensor.kdfi_barometric_pressure
|
||||||
] %}
|
] %}
|
||||||
@ -322,6 +370,60 @@ sensor:
|
|||||||
# days: 7
|
# days: 7
|
||||||
|
|
||||||
template:
|
template:
|
||||||
|
- trigger:
|
||||||
|
- platform: time_pattern
|
||||||
|
minutes: /15
|
||||||
|
- platform: state
|
||||||
|
entity_id: weather.home_tempest_forecast_home
|
||||||
|
- platform: homeassistant
|
||||||
|
event: start
|
||||||
|
action:
|
||||||
|
- service: weather.get_forecasts
|
||||||
|
data:
|
||||||
|
type: daily
|
||||||
|
target:
|
||||||
|
entity_id: weather.home_tempest_forecast_home
|
||||||
|
response_variable: daily
|
||||||
|
- variables:
|
||||||
|
today: "{{ daily['weather.home_tempest_forecast_home'].forecast[0] }}"
|
||||||
|
sensor:
|
||||||
|
- name: Weatherflow Daily Weather Forecast
|
||||||
|
unique_id: 2c70c4ee-7f7f-42b4-ad40-90ce2b6c6d77
|
||||||
|
state: "{{ now().isoformat() }}"
|
||||||
|
attributes:
|
||||||
|
forecast: "{{ daily['weather.home_tempest_forecast_home'].forecast }}"
|
||||||
|
- name: Weatherflow High
|
||||||
|
unique_id: 296b4361-459a-48e7-9793-c003b88fcdef
|
||||||
|
state: "{{ today.temperature }}"
|
||||||
|
unit_of_measurement: °F
|
||||||
|
- name: Weatherflow Low
|
||||||
|
unique_id: 61c344be-33d3-4e1d-8d0d-277c2b850c0d
|
||||||
|
state: "{{ today.templow }}"
|
||||||
|
unit_of_measurement: °F
|
||||||
|
- name: Weatherflow Rain Chance Today
|
||||||
|
unique_id: ab0327ff-f20f-4d16-aeb5-78682b3e2397
|
||||||
|
state: "{{ today.precipitation_probability }}"
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
- trigger:
|
||||||
|
- platform: time_pattern
|
||||||
|
minutes: /15
|
||||||
|
- platform: state
|
||||||
|
entity_id: weather.home_tempest_forecast_home
|
||||||
|
- platform: homeassistant
|
||||||
|
event: start
|
||||||
|
action:
|
||||||
|
- service: weather.get_forecasts
|
||||||
|
data:
|
||||||
|
type: hourly
|
||||||
|
target:
|
||||||
|
entity_id: weather.home_tempest_forecast_home
|
||||||
|
response_variable: hourly
|
||||||
|
sensor:
|
||||||
|
- name: Weatherflow Hourly Weather Forecast
|
||||||
|
unique_id: aa0b368c-ea23-4514-a697-e122353eb76d
|
||||||
|
state: "{{ now().isoformat() }}"
|
||||||
|
attributes:
|
||||||
|
forecast: "{{ hourly['weather.home_tempest_forecast_home'].forecast }}"
|
||||||
- trigger:
|
- trigger:
|
||||||
- platform: time_pattern
|
- platform: time_pattern
|
||||||
minutes: /15
|
minutes: /15
|
||||||
@ -668,10 +770,10 @@ template:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
- name: "Lightning Warning"
|
- name: "Lightning Warning"
|
||||||
unique_id: edaddfc4-f7f0-4d75-aada-a2c588afe029
|
unique_id: edaddfc4-f7f0-4d75-aada-a2c588afe029
|
||||||
state: "{{ states('sensor.blitzortung_lightning_counter') | int > 0 }}"
|
state: "{{ states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int > 0 }}"
|
||||||
device_class: safety
|
device_class: safety
|
||||||
attributes:
|
attributes:
|
||||||
current_strikes: "{{ states('sensor.blitzortung_lightning_counter') | int }}"
|
current_strikes: "{{ states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int }}"
|
||||||
icon: "{{ 'mdi:flash-alert' if states('sensor.blitzortung_lightning_counter') | int > 0 else 'mdi:flash-outline'}}"
|
icon: "{{ 'mdi:flash-alert' if states('sensor.blitzortung_lightning_counter') | int > 0 else 'mdi:flash-outline'}}"
|
||||||
- name: "Audible Weather Alerts Allowed"
|
- name: "Audible Weather Alerts Allowed"
|
||||||
unique_id: 03851823-32d5-44c1-af42-256fcd922069
|
unique_id: 03851823-32d5-44c1-af42-256fcd922069
|
||||||
@ -701,52 +803,57 @@ template:
|
|||||||
- name: Raining
|
- name: Raining
|
||||||
unique_id: 232b43a4-4598-4315-ab76-42348c11e6ff
|
unique_id: 232b43a4-4598-4315-ab76-42348c11e6ff
|
||||||
state: >
|
state: >
|
||||||
{{ states('sensor.total_rain_sensors') | int > 1 }}
|
{{ states('sensor.home_tempest_precipitation_intensity') | float > 0 or
|
||||||
icon: "{{ 'mdi:weather-rainy' if states('sensor.total_rain_sensors') | int > 1 else 'mdi:weather-cloudy' }}"
|
states('sensor.home_tempest_precipitation_type') in ['rain','hail','rain_hail'] or
|
||||||
|
states('sensor.home_tempest_cloud_sensors_precipitation_description') in ['rain','heavy_rain'] or
|
||||||
|
is_state('binary_sensor.home_tempest_cloud_binary_sensors_is_raining','on') }}
|
||||||
|
icon: "{{ 'mdi:weather-rainy' if this.state == 'on' else 'mdi:weather-cloudy' }}"
|
||||||
- sensor:
|
- sensor:
|
||||||
- name: Total Rain Sensors
|
# - name: Total Rain Sensors
|
||||||
unique_id: b7c2e709-8f5c-4263-aa1d-fa8280afcddb
|
# unique_id: b7c2e709-8f5c-4263-aa1d-fa8280afcddb
|
||||||
unit_of_measurement: 'sensors'
|
# unit_of_measurement: 'sensors'
|
||||||
state: >
|
# state: >
|
||||||
{% set sensors = [
|
# {% set sensors = [
|
||||||
states.sensor.pirateweather_precip,
|
# states.sensor.home_tempest_precipitation_type,
|
||||||
states.sensor.openweathermap_precipitation_kind,
|
# states.sensor.pirateweather_precip,
|
||||||
states.sensor.tomorrow_io_stratton_ave_precipitation_type
|
# states.sensor.openweathermap_precipitation_kind,
|
||||||
] %}
|
# states.sensor.tomorrow_io_stratton_ave_precipitation_type
|
||||||
{% set numeric_sensors = [
|
# ] %}
|
||||||
states.sensor.stratton_ave_precipitation
|
# {% set numeric_sensors = [
|
||||||
] %}
|
# states.sensor.home_tempest_precipitation_intensity,
|
||||||
{% set c1 = sensors | selectattr('state','eq','rain') | list | count %}
|
# states.sensor.stratton_ave_precipitation
|
||||||
{% set c2 = numeric_sensors | map(attribute='state') | map('float') | select('gt',0) | list | count %}
|
# ] %}
|
||||||
{{ (c1 + c2) | int }}
|
# {% set c1 = sensors | selectattr('state','eq','rain') | list | count %}
|
||||||
|
# {% set c2 = numeric_sensors | map(attribute='state') | map('float') | select('gt',0) | list | count %}
|
||||||
|
# {{ (c1 + c2) | int }}
|
||||||
- name: Current Forecast
|
- name: Current Forecast
|
||||||
unique_id: c0faea33-2ac3-40f1-8558-584c3f5d6b16
|
unique_id: c0faea33-2ac3-40f1-8558-584c3f5d6b16
|
||||||
icon: mdi:weather-sunny
|
icon: mdi:weather-sunny
|
||||||
state: >-
|
state: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.condition }}
|
{{ forecast.condition }}
|
||||||
attributes:
|
attributes:
|
||||||
high_temp: >-
|
high_temp: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.temperature }}
|
{{ forecast.temperature }}
|
||||||
overnight_low: >-
|
overnight_low: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.templow }}
|
{{ forecast.templow }}
|
||||||
wind_bearing: >-
|
wind_bearing: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.wind_bearing }}
|
{{ forecast.wind_bearing }}
|
||||||
wind_speed: >-
|
wind_speed: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.wind_speed }}
|
{{ forecast.wind_speed }}
|
||||||
precipitation: >-
|
precipitation: >-
|
||||||
{% if state_attr('weather.iron_nerd_weather_station','precipitation') %}
|
{% if state_attr('weather.iron_nerd_weather_station','precipitation') %}
|
||||||
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}
|
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ forecast.precipitation }}
|
{{ forecast.precipitation }}
|
||||||
friendly: >-
|
friendly: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.condition | replace("partlycloudy","partly cloudy") }}
|
{{ forecast.condition | replace("partlycloudy","partly cloudy") }}
|
||||||
- name: Current Forecast Detail
|
- name: Current Forecast Detail
|
||||||
unique_id: e5ae9864-70b5-402c-9d2f-c4d6a10085df
|
unique_id: e5ae9864-70b5-402c-9d2f-c4d6a10085df
|
||||||
@ -861,23 +968,23 @@ template:
|
|||||||
unique_id: a8ae26b0-ed26-4568-bb2b-f7c72707b009
|
unique_id: a8ae26b0-ed26-4568-bb2b-f7c72707b009
|
||||||
icon: mdi:weather-sunny
|
icon: mdi:weather-sunny
|
||||||
state: >-
|
state: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.condition }}
|
{{ forecast.condition }}
|
||||||
attributes:
|
attributes:
|
||||||
high_temp: >-
|
high_temp: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.temperature }}
|
{{ forecast.temperature }}
|
||||||
overnight_low: >-
|
overnight_low: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.templow }}
|
{{ forecast.templow }}
|
||||||
wind_bearing: >-
|
wind_bearing: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.wind_bearing }}
|
{{ forecast.wind_bearing }}
|
||||||
wind_speed: >-
|
wind_speed: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.wind_speed }}
|
{{ forecast.wind_speed }}
|
||||||
precipitation: >-
|
precipitation: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[1] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[1] %}
|
||||||
{{ forecast.precipitation }}
|
{{ forecast.precipitation }}
|
||||||
- name: Tomorrow Forecast Detail
|
- name: Tomorrow Forecast Detail
|
||||||
unique_id: 21374ed0-80d1-49ba-817d-3e93eb3865e4
|
unique_id: 21374ed0-80d1-49ba-817d-3e93eb3865e4
|
||||||
@ -1182,7 +1289,7 @@ template:
|
|||||||
unit_of_measurement: '°F'
|
unit_of_measurement: '°F'
|
||||||
device_class: temperature
|
device_class: temperature
|
||||||
state: >-
|
state: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{% if is_number(forecast.temperature) %}
|
{% if is_number(forecast.temperature) %}
|
||||||
{{ forecast.temperature }}
|
{{ forecast.temperature }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -1193,14 +1300,14 @@ template:
|
|||||||
unit_of_measurement: '°F'
|
unit_of_measurement: '°F'
|
||||||
device_class: temperature
|
device_class: temperature
|
||||||
state: >-
|
state: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[2] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[2] %}
|
||||||
{{ forecast.temperature }}
|
{{ forecast.temperature }}
|
||||||
- name: "Tonight's Low Temp"
|
- name: "Tonight's Low Temp"
|
||||||
unique_id: 8ddc55b6-4728-4897-a32f-90be970f744b
|
unique_id: 8ddc55b6-4728-4897-a32f-90be970f744b
|
||||||
unit_of_measurement: '°F'
|
unit_of_measurement: '°F'
|
||||||
device_class: temperature
|
device_class: temperature
|
||||||
state: >-
|
state: >-
|
||||||
{% set forecast = state_attr('sensor.weather_com_daily_weather_forecast','forecast')[0] %}
|
{% set forecast = state_attr('sensor.weatherflow_daily_weather_forecast','forecast')[0] %}
|
||||||
{{ forecast.templow }}
|
{{ forecast.templow }}
|
||||||
- name: "Clothing Forecast"
|
- name: "Clothing Forecast"
|
||||||
unique_id: 8ed2684b-d0ad-402c-bc3c-340cb9b2437a
|
unique_id: 8ed2684b-d0ad-402c-bc3c-340cb9b2437a
|
||||||
@ -1461,8 +1568,8 @@ template:
|
|||||||
unit_of_measurement: '°F'
|
unit_of_measurement: '°F'
|
||||||
state: >
|
state: >
|
||||||
{% set ns = namespace(temps=[]) %}
|
{% set ns = namespace(temps=[]) %}
|
||||||
{% set x = state_attr('sensor.weather_com_hourly_weather_forecast','forecast') | count %}
|
{% set x = state_attr('sensor.weatherflow_hourly_weather_forecast','forecast') | count %}
|
||||||
{% set pd = state_attr('sensor.weather_com_hourly_weather_forecast','forecast') %}
|
{% set pd = state_attr('sensor.weatherflow_hourly_weather_forecast','forecast') %}
|
||||||
{% for i in range(0,x) %}
|
{% for i in range(0,x) %}
|
||||||
{% set hr = as_timestamp(as_local(as_datetime(pd[i].datetime))) | timestamp_custom('%H') | int %}
|
{% set hr = as_timestamp(as_local(as_datetime(pd[i].datetime))) | timestamp_custom('%H') | int %}
|
||||||
{% if hr in range(21,24) or hr in range(0,8) %}
|
{% if hr in range(21,24) or hr in range(0,8) %}
|
||||||
|
11
packages/dashboards.yaml
Normal file
11
packages/dashboards.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
template:
|
||||||
|
- trigger:
|
||||||
|
- trigger: event
|
||||||
|
event_type: bubble_card_update_modules
|
||||||
|
sensor:
|
||||||
|
- name: "Bubble Card Modules"
|
||||||
|
state: "saved"
|
||||||
|
icon: "mdi:puzzle"
|
||||||
|
attributes:
|
||||||
|
modules: "{{ trigger.event.data.modules }}"
|
||||||
|
last_updated: "{{ trigger.event.data.last_updated }}"
|
@ -257,6 +257,9 @@ automation:
|
|||||||
time: >
|
time: >
|
||||||
{% 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
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: bedtime-timer-finished
|
id: bedtime-timer-finished
|
||||||
@ -281,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
|
||||||
@ -804,16 +810,11 @@ 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
|
|
||||||
data:
|
|
||||||
who: basement
|
|
||||||
type: normal
|
|
||||||
message: Emma has awoken, so it is time to make your way upstairs now
|
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.emma_awake_at
|
entity_id: input_datetime.emma_awake_at
|
||||||
@ -898,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:
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -47,6 +44,9 @@ input_boolean:
|
|||||||
adaptive_lighting_adjustments:
|
adaptive_lighting_adjustments:
|
||||||
name: Adaptive Lighting Adjustments
|
name: Adaptive Lighting Adjustments
|
||||||
icon: mdi:knob
|
icon: mdi:knob
|
||||||
|
sunset_lights_triggered:
|
||||||
|
name: Sunset Lights Triggered
|
||||||
|
icon: mdi:weather-sunset
|
||||||
|
|
||||||
input_number:
|
input_number:
|
||||||
upstairs_bathroom_motion_off_delay:
|
upstairs_bathroom_motion_off_delay:
|
||||||
@ -210,6 +210,21 @@ input_number:
|
|||||||
step: 5
|
step: 5
|
||||||
unit_of_measurement: lx
|
unit_of_measurement: lx
|
||||||
icon: mdi:sun-wireless
|
icon: mdi:sun-wireless
|
||||||
|
front_porch_lux_threshold:
|
||||||
|
name: Front Porch Lux Threshold
|
||||||
|
min: 0
|
||||||
|
max: 2000
|
||||||
|
step: 5
|
||||||
|
mode: box
|
||||||
|
unit_of_measurement: lx
|
||||||
|
icon: mdi:sun-wireless
|
||||||
|
sunset_lights_outdoor_lux_threshold:
|
||||||
|
name: Sunset Lights Outdoor Lux Threshold
|
||||||
|
min: 0
|
||||||
|
max: 10000
|
||||||
|
step: 100
|
||||||
|
unit_of_measurement: lx
|
||||||
|
icon: mdi:sun-wireless
|
||||||
|
|
||||||
# Settings for adaptive adjustments
|
# Settings for adaptive adjustments
|
||||||
daytime_colortemp_front_porch:
|
daytime_colortemp_front_porch:
|
||||||
@ -492,6 +507,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 +672,25 @@ 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,
|
||||||
|
states.light.living_room_lights,
|
||||||
|
states.light.front_porch_light %}
|
||||||
|
{% 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,
|
||||||
|
states.light.living_room_lights,
|
||||||
|
states.light.front_porch_light %}
|
||||||
|
{% 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 +854,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]
|
||||||
|
@ -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:
|
||||||
@ -325,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
|
||||||
@ -373,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
|
||||||
@ -405,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
|
||||||
@ -435,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
|
||||||
@ -483,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
|
||||||
@ -536,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
|
||||||
@ -1237,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'] %}
|
||||||
@ -1328,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
|
||||||
|
@ -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
|
||||||
|
@ -418,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
|
||||||
@ -561,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
|
||||||
@ -618,22 +600,17 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
||||||
|
{% set high = states('sensor.todays_high_temp') | int %}
|
||||||
{% set kallen_bedtime = state_attr('input_datetime.kallen_bedtime','timestamp') | int %}
|
{% set kallen_bedtime = state_attr('input_datetime.kallen_bedtime','timestamp') | int %}
|
||||||
{% set cutoff = 81000 %}
|
{% set kallen_fantime = state_attr('input_datetime.kallen_fan','timestamp') | int %}
|
||||||
{% if is_state('input_boolean.hot_day','on') and is_state('binary_sensor.kallen_school_tomorrow','on') %}
|
{% set bedroom_hot = is_state('binary_sensor.kallen_bedroom_hot','on') %}
|
||||||
{{ (kallen_bedtime - 3600) | timestamp_custom('%H:%M',false) }}
|
{% set cutoff = 81000 %} {# Cutoff time is 22:30 #}
|
||||||
{% elif is_state('input_boolean.hot_day','on') and is_state('binary_sensor.kallen_school_tomorrow','off') %}
|
{% if is_state('input_boolean.hot_day','on') or bedroom_hot == true %}
|
||||||
{{ kallen_bedtime | timestamp_custom('%H:%M',false) }}
|
{{ (kallen_fantime - 3600) | timestamp_custom('%H:%M',false) }}
|
||||||
{% elif 56 <= low <= 60 %}
|
{% elif low >= 56 or high >= 75 %}
|
||||||
22:30
|
{{ (kallen_bedtime - 1800) | timestamp_custom('%H:%M',false) }}
|
||||||
{% elif low > 60 %}
|
|
||||||
{% if kallen_bedtime < cutoff %}
|
|
||||||
{{ kallen_bedtime | timestamp_custom('%H:%M',false) }}
|
|
||||||
{% else %}
|
|
||||||
21:30
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
00:00
|
{{ kallen_bedtime | timestamp_custom('%H:%M',false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.master_bedroom_fan
|
entity_id: input_datetime.master_bedroom_fan
|
||||||
@ -642,11 +619,11 @@ script:
|
|||||||
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
||||||
{% set high = states('sensor.todays_high_temp') | int %}
|
{% set high = states('sensor.todays_high_temp') | int %}
|
||||||
{% if low > 60 or is_state('input_boolean.hot_day','on') %}
|
{% if low > 60 or is_state('input_boolean.hot_day','on') %}
|
||||||
00:00
|
|
||||||
{% elif 50 <= low <= 60 %}
|
|
||||||
01:00
|
01:00
|
||||||
{% elif low >= states('input_number.master_bedroom_fan_threshold') | int and high > 60 %}
|
{% elif 50 <= low <= 60 %}
|
||||||
02:00
|
02:00
|
||||||
|
{% elif low >= states('input_number.master_bedroom_fan_threshold') | int and high > 60 %}
|
||||||
|
03:00
|
||||||
{% else %}
|
{% else %}
|
||||||
06:00
|
06:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -732,11 +709,16 @@ script:
|
|||||||
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
|
{% set low = states('sensor.overnight_lowest_temperature') | int %}
|
||||||
{% if (states('sensor.overnight_lowest_temperature') | int) >= (states('input_number.emma_aircon_threshold') | int) %}
|
{% set run_threshold = states('input_number.emma_bedroom_aircon_run_threshold') | int %}
|
||||||
|
{% set mode_threshold = states('input_number.emma_bedroom_aircon_mode_threshold') | int %}
|
||||||
|
{% if is_state('input_boolean.emma_bedroom_aircon_installed','off') %}
|
||||||
|
White Noise
|
||||||
|
{% elif low >= run_threshold %}
|
||||||
|
{% if low >= mode_threshold %}
|
||||||
AC
|
AC
|
||||||
{% else %}
|
{% else %}
|
||||||
White Noise
|
Fan
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
White Noise
|
White Noise
|
||||||
@ -750,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:
|
||||||
@ -773,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') - 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 %}
|
||||||
|
@ -106,7 +106,7 @@ template:
|
|||||||
unique_id: 2987ae95-f55d-4994-b9dd-018278d2f5ad
|
unique_id: 2987ae95-f55d-4994-b9dd-018278d2f5ad
|
||||||
state: >
|
state: >
|
||||||
{% from 'sports.jinja' import sports_inhibit %}
|
{% from 'sports.jinja' import sports_inhibit %}
|
||||||
{{ state_attr('sensor.minnesota_twins','opponent_abbr') in ['CLE','LAD'] or sports_inhibit('sensor.minnesota_twins') }}
|
{{ sports_inhibit('sensor.minnesota_twins') }}
|
||||||
- name: Minnesota Twins Event Today
|
- name: Minnesota Twins Event Today
|
||||||
unique_id: 30055cb3-d259-4cef-90e1-7dea0a5cb439
|
unique_id: 30055cb3-d259-4cef-90e1-7dea0a5cb439
|
||||||
state: >
|
state: >
|
||||||
@ -116,7 +116,7 @@ template:
|
|||||||
unique_id: b0980d47-d762-4f23-97b1-9e88da729d8f
|
unique_id: b0980d47-d762-4f23-97b1-9e88da729d8f
|
||||||
state: >
|
state: >
|
||||||
{% from 'sports.jinja' import sports_inhibit %}
|
{% from 'sports.jinja' import sports_inhibit %}
|
||||||
{{ sports_inhibit('sensor.cleveland_guardians') }}
|
{{ state_attr('sensor.cleveland_guardians','opponent_abbr') in ['MIN','LAD'] or sports_inhibit('sensor.cleveland_guardians') }}
|
||||||
- name: Cleveland Guardians Event Today
|
- name: Cleveland Guardians Event Today
|
||||||
unique_id: 985a7b2c-9ebd-4a2e-8ee2-2ab5359310e0
|
unique_id: 985a7b2c-9ebd-4a2e-8ee2-2ab5359310e0
|
||||||
state: >
|
state: >
|
||||||
@ -126,7 +126,7 @@ template:
|
|||||||
unique_id: 2c6aae6e-eff6-46e5-bee9-311f9bbc0c0e
|
unique_id: 2c6aae6e-eff6-46e5-bee9-311f9bbc0c0e
|
||||||
state: >
|
state: >
|
||||||
{% from 'sports.jinja' import sports_inhibit %}
|
{% from 'sports.jinja' import sports_inhibit %}
|
||||||
{{ state_attr('sensor.los_angeles_dodgers','opponent_abbr') in ['CLE'] or sports_inhibit('sensor.los_angeles_dodgers') }}
|
{{ state_attr('sensor.los_angeles_dodgers','opponent_abbr') in ['MIN'] or sports_inhibit('sensor.los_angeles_dodgers') }}
|
||||||
- name: Los Angeles Dodgers Event Today
|
- name: Los Angeles Dodgers Event Today
|
||||||
unique_id: 7c2bd060-ea2c-4b81-8af7-3e6b9b3c639d
|
unique_id: 7c2bd060-ea2c-4b81-8af7-3e6b9b3c639d
|
||||||
state: >
|
state: >
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
input_boolean:
|
||||||
|
server_maintenance:
|
||||||
|
name: Server Maintenance
|
||||||
|
icon: mdi:wrench-clock
|
||||||
|
|
||||||
input_select:
|
input_select:
|
||||||
log_level:
|
log_level:
|
||||||
name: Log Level
|
name: Log Level
|
||||||
@ -63,25 +68,25 @@ 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"
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
42
readme.md
42
readme.md
@ -2,11 +2,9 @@ # Tony's Home Assistant Configs
|
|||||||
|
|
||||||
Just a place to track my work on my personal Home Assistant configuration, and learn as I go. Maybe also TRY to keep myself a little bit more organized ;)
|
Just a place to track my work on my personal Home Assistant configuration, and learn as I go. Maybe also TRY to keep myself a little bit more organized ;)
|
||||||
|
|
||||||
## New location for Node-RED flows
|
## Node-RED flows
|
||||||
|
|
||||||
I have recently started using the Node-RED Projects feature, which makes version control for my flows a LOT easier than it was before.
|
My Node-RED flows can be found at [HA-NerdFlows](https://gitea.nerdhomeinc.com/home_automation/HA-NerdFlows). Additionally, code used in function nodes in my Node-RED flows can be found at [HA-NerdFlows-Functions](https://gitea.nerdhomeinc.com/home_automation/HA-NerdFlows-Functions).
|
||||||
|
|
||||||
With this change, the Node-RED flows are now in their own repo. They can be found at [HA-NerdFlows](https://github.com/tm24fan8/HA-NerdFlows).
|
|
||||||
|
|
||||||
## Attributions
|
## Attributions
|
||||||
|
|
||||||
@ -34,7 +32,6 @@ ## HACS Components
|
|||||||
- [Node-RED Companion](https://github.com/zachowj/hass-node-red)
|
- [Node-RED Companion](https://github.com/zachowj/hass-node-red)
|
||||||
- [Holidays](https://github.com/bruxy70/Holidays)
|
- [Holidays](https://github.com/bruxy70/Holidays)
|
||||||
- [Twitch Helix](https://github.com/Radioh/ha_twitch_helix)
|
- [Twitch Helix](https://github.com/Radioh/ha_twitch_helix)
|
||||||
- [Local Tuya](https://github.com/rospogrigio/localtuya)
|
|
||||||
- [Pirate Weather](https://github.com/alexander0042/pirate-weather-ha)
|
- [Pirate Weather](https://github.com/alexander0042/pirate-weather-ha)
|
||||||
- [Holidays](https://github.com/bruxy70/Holidays)
|
- [Holidays](https://github.com/bruxy70/Holidays)
|
||||||
- [Thermal Comfort](https://github.com/dolezsa/thermal_comfort)
|
- [Thermal Comfort](https://github.com/dolezsa/thermal_comfort)
|
||||||
@ -42,7 +39,7 @@ ## HACS Components
|
|||||||
- [HASS.Agent Media Player](https://github.com/LAB02-Research/HASS.Agent-MediaPlayer)
|
- [HASS.Agent Media Player](https://github.com/LAB02-Research/HASS.Agent-MediaPlayer)
|
||||||
- [Music Assistant](https://github.com/music-assistant/hass-music-assistant)
|
- [Music Assistant](https://github.com/music-assistant/hass-music-assistant)
|
||||||
- [Blitzortung Lightning Detector](https://github.com/mrk-its/homeassistant-blitzortung)
|
- [Blitzortung Lightning Detector](https://github.com/mrk-its/homeassistant-blitzortung)
|
||||||
- [Midea Air Conditioning](https://github.com/mill1000/midea-ac-py)
|
- [Midea Air Conditioning](https://github.com/wuwentao/midea_ac_lan)
|
||||||
- [WeatherAPI](https://github.com/iprak/weatherapi)
|
- [WeatherAPI](https://github.com/iprak/weatherapi)
|
||||||
- [Browser Mod](https://github.com/thomasloven/hass-browser_mod)
|
- [Browser Mod](https://github.com/thomasloven/hass-browser_mod)
|
||||||
- [Watchman](https://github.com/dummylabs/thewatchman)
|
- [Watchman](https://github.com/dummylabs/thewatchman)
|
||||||
@ -50,13 +47,16 @@ ## HACS Components
|
|||||||
- [PyScript](https://github.com/custom-components/pyscript)
|
- [PyScript](https://github.com/custom-components/pyscript)
|
||||||
- [Hass Animated Scenes](https://github.com/chazzu/hass-animated-scenes)
|
- [Hass Animated Scenes](https://github.com/chazzu/hass-animated-scenes)
|
||||||
- [Jokes](https://github.com/LaggAt/ha-jokes)
|
- [Jokes](https://github.com/LaggAt/ha-jokes)
|
||||||
- [Google Photos](https://github.com/Daanoz/ha-google-photos)
|
|
||||||
- [Uptime Kuma](https://github.com/meichthys/uptime_kuma)
|
- [Uptime Kuma](https://github.com/meichthys/uptime_kuma)
|
||||||
- [Jellyfin](https://github.com/koying/jellyfin_ha)
|
- [Jellyfin](https://github.com/koying/jellyfin_ha)
|
||||||
- [Sonoff LAN](https://github.com/AlexxIT/SonoffLAN)
|
- [Sonoff LAN](https://github.com/AlexxIT/SonoffLAN)
|
||||||
- [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)
|
||||||
|
- [GasBuddy](https://github.com/firstof9/ha-gasbuddy)
|
||||||
|
- [Union Pacific Big Boy Tracker](https://github.com/jheizer/up_4014_tracker)
|
||||||
|
- [WeatherFlow Forecast](https://github.com/briis/weatherflow_forecast)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -67,61 +67,50 @@ ## 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)
|
- [Streamline Card](https://github.com/brunosabot/streamline-card)
|
||||||
- [Card Tools](https://github.com/thomasloven/lovelace-card-tools) (required for various other cards)
|
|
||||||
- [Layout Card](https://github.com/thomasloven/lovelace-layout-card)
|
- [Layout Card](https://github.com/thomasloven/lovelace-layout-card)
|
||||||
- [Scheduler Card](https://github.com/nielsfaber/scheduler-card) (required for Scheduler component)
|
- [Scheduler Card](https://github.com/nielsfaber/scheduler-card) (required for Scheduler component)
|
||||||
- [Horizon Card](https://github.com/rejuvenate/lovelace-horizon-card)
|
- [Horizon Card](https://github.com/rejuvenate/lovelace-horizon-card)
|
||||||
- [Lovelace Home Feed Card](https://github.com/gadgetchnnel/lovelace-home-feed-card)
|
- [Lovelace Home Feed Card](https://github.com/gadgetchnnel/lovelace-home-feed-card)
|
||||||
- [Mini Graph Card](https://github.com/kalkih/mini-graph-card)
|
- [Mini Graph Card](https://github.com/kalkih/mini-graph-card)
|
||||||
- [Battery State Card](https://github.com/maxwroc/battery-state-card)
|
- [Battery State Card](https://github.com/maxwroc/battery-state-card)
|
||||||
- [Compass Card](https://github.com/tomvanswam/compass-card)
|
|
||||||
- [Flipdown Timer Card](https://github.com/pmongloid/flipdown-timer-card)
|
- [Flipdown Timer Card](https://github.com/pmongloid/flipdown-timer-card)
|
||||||
- [Atomic Calendar Revive](https://github.com/totaldebug/atomic-calendar-revive)
|
- [Atomic Calendar Revive](https://github.com/totaldebug/atomic-calendar-revive)
|
||||||
- [Plotly Graph Card](https://github.com/dbuezas/lovelace-plotly-graph-card)
|
- [Plotly Graph Card](https://github.com/dbuezas/lovelace-plotly-graph-card)
|
||||||
- [Mushroom](https://github.com/piitaya/lovelace-mushroom)
|
- [Mushroom](https://github.com/piitaya/lovelace-mushroom)
|
||||||
- [Apexcharts Card](https://github.com/RomRider/apexcharts-card)
|
- [Apexcharts Card](https://github.com/RomRider/apexcharts-card)
|
||||||
- [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)
|
|
||||||
- [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)
|
||||||
- [Multiple Entity Row](https://github.com/benct/lovelace-multiple-entity-row)
|
- [Multiple Entity Row](https://github.com/benct/lovelace-multiple-entity-row)
|
||||||
- [Weather Card](https://github.com/bramkragten/weather-card)
|
- [Weather Card](https://github.com/bramkragten/weather-card)
|
||||||
- [Template Entity Row](https://github.com/thomasloven/lovelace-template-entity-row)
|
- [Template Entity Row](https://github.com/thomasloven/lovelace-template-entity-row)
|
||||||
- [Canvas Gauge Card](https://github.com/custom-cards/canvas-gauge-card)
|
|
||||||
- [Datetime Card](https://github.com/a-p-z/datetime-card)
|
|
||||||
- [Waze Travel Time](https://github.com/r-renato/ha-card-waze-travel-time)
|
- [Waze Travel Time](https://github.com/r-renato/ha-card-waze-travel-time)
|
||||||
- [Fold Entity Row](https://github.com/thomasloven/lovelace-fold-entity-row)
|
- [Fold Entity Row](https://github.com/thomasloven/lovelace-fold-entity-row)
|
||||||
- [Slider Entity Row](https://github.com/thomasloven/lovelace-slider-entity-row)
|
|
||||||
- [Room Card](https://github.com/marcokreeft87/room-card)
|
- [Room Card](https://github.com/marcokreeft87/room-card)
|
||||||
- [Simple Thermostat Card](https://github.com/nervetattoo/simple-thermostat)
|
- [Simple Thermostat Card](https://github.com/nervetattoo/simple-thermostat)
|
||||||
- [Clock Weather Card](https://github.com/pkissling/clock-weather-card)
|
- [Clock Weather Card](https://github.com/pkissling/clock-weather-card)
|
||||||
- [Tabbed Card](https://github.com/kinghat/tabbed-card)
|
- [Tabbed Card](https://github.com/kinghat/tabbed-card)
|
||||||
- [HA Team Tracker Card](https://github.com/vasqued2/ha-teamtracker-card)
|
- [HA Team Tracker Card](https://github.com/vasqued2/ha-teamtracker-card)
|
||||||
- [Banner Card](https://github.com/nervetattoo/banner-card)
|
- [Banner Card](https://github.com/nervetattoo/banner-card)
|
||||||
- [Lovelace Lock Card](https://github.com/CyrisXD/love-lock-card)
|
|
||||||
- [Card Templater](https://github.com/gadgetchnnel/lovelace-card-templater)
|
- [Card Templater](https://github.com/gadgetchnnel/lovelace-card-templater)
|
||||||
- [Energy Overview Card](https://github.com/Sese-Schneider/ha-energy-overview-card)
|
|
||||||
- [Button Card](https://github.com/custom-cards/button-card)
|
- [Button Card](https://github.com/custom-cards/button-card)
|
||||||
- [Number Box Card](https://github.com/htmltiger/numberbox-card)
|
- [Number Box Card](https://github.com/htmltiger/numberbox-card)
|
||||||
- [Restriction Card](https://github.com/iantrich/restriction-card)
|
- [Restriction Card](https://github.com/iantrich/restriction-card)
|
||||||
- [Timer Bar Card](https://github.com/rianadon/timer-bar-card)
|
- [Timer Bar Card](https://github.com/rianadon/timer-bar-card)
|
||||||
- [Minimalistic Area Card](https://github.com/junalmeida/homeassistant-minimalistic-area-card)
|
|
||||||
- [Sankey Chart Card](https://github.com/MindFreeze/ha-sankey-chart)
|
- [Sankey Chart Card](https://github.com/MindFreeze/ha-sankey-chart)
|
||||||
- [Hourly Weather Card](https://github.com/decompil3d/lovelace-hourly-weather)
|
- [Hourly Weather Card](https://github.com/decompil3d/lovelace-hourly-weather)
|
||||||
- [Formula One Card](https://github.com/marcokreeft87/formulaone-card)
|
- [Formula One Card](https://github.com/marcokreeft87/formulaone-card)
|
||||||
- [UV Index Card](https://github.com/t1gr0u/uv-index-card)
|
- [UV Index Card](https://github.com/t1gr0u/uv-index-card)
|
||||||
- [Github Flexi Card](https://github.com/maxwroc/github-flexi-card)
|
|
||||||
- [Windrose Card](https://github.com/aukedejong/lovelace-windrose-card)
|
- [Windrose Card](https://github.com/aukedejong/lovelace-windrose-card)
|
||||||
- [Swipe Card](https://github.com/bramkragten/swipe-card)
|
|
||||||
- [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>
|
||||||
|
|
||||||
@ -134,6 +123,16 @@ ## AppDaemon Apps
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## Custom Jinja2 Templates/Macros
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Click here</summary>
|
||||||
|
|
||||||
|
- [Easy Time](https://github.com/Petro31/easy-time-jinja)
|
||||||
|
- [Relative Time](https://github.com/TheFes/relative-time-plus)
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## Themes/Icons
|
## Themes/Icons
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@ -145,5 +144,6 @@ ## Themes/Icons
|
|||||||
- [BHA Icon Pack](https://github.com/hulkhaugen/hass-bha-icons)
|
- [BHA Icon Pack](https://github.com/hulkhaugen/hass-bha-icons)
|
||||||
- [Custom Icons Library](https://github.com/Mariusthvdb/custom-icons)
|
- [Custom Icons Library](https://github.com/Mariusthvdb/custom-icons)
|
||||||
- [FontAwesome](https://github.com/thomasloven/hass-fontawesome)
|
- [FontAwesome](https://github.com/thomasloven/hass-fontawesome)
|
||||||
|
- [Material Symbols](https://github.com/beecho01/material-symbols)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
64
scenes.yaml
64
scenes.yaml
@ -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:
|
||||||
|
1324
scripts.yaml
1324
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
|
||||||
@ -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: ''
|
||||||
|
@ -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 %}
|
||||||
|
@ -71,9 +71,13 @@
|
|||||||
{% 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_bedroom') != 'N/A' %}
|
{% if states('input_select.scheduled_climate_mode_emma_bedroom_aircon') != 'N/A' %}
|
||||||
{% if is_state('input_select.scheduled_climate_mode_emma_bedroom','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_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') %}
|
{% 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 %}
|
||||||
|
@ -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 %}
|
||||||
|
429
www/bubble/bubble-modules-old.yaml
Normal file
429
www/bubble/bubble-modules-old.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