mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Move config out of subfolder
This commit is contained in:
11
templates/partials/greeting.yaml
Normal file
11
templates/partials/greeting.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
>-
|
||||
|
||||
{% set current_hour = now().strftime('%H')|int %}
|
||||
|
||||
{%- if current_hour < 12 and current_hour > 6 -%}
|
||||
Good morning!
|
||||
{%- elif current_hour >= 12 and current_hour < 17 -%}
|
||||
Good afternoon!
|
||||
{%- else -%}
|
||||
Good evening!
|
||||
{%- endif -%}
|
||||
3
templates/partials/indoor_temperarture.yaml
Normal file
3
templates/partials/indoor_temperarture.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
>-
|
||||
|
||||
It's {{ states('sensor.bedroom_weather_temperature') | round }} degrees inside.
|
||||
5
templates/partials/iss.yaml
Normal file
5
templates/partials/iss.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
>-
|
||||
|
||||
{%- if is_state('binary_sensor.iss', 'on') -%}
|
||||
Here is something interesting. The international space station is above us now. There are {{ state_attr('binary_sensor.iss','number_of_people_in_space') }} people in space right now.
|
||||
{%- endif -%}
|
||||
11
templates/partials/light_check.yaml
Normal file
11
templates/partials/light_check.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
>-
|
||||
|
||||
{%- if is_state('light.all', 'on') -%}
|
||||
There are
|
||||
{%- for state in states.light if state.state == 'on' -%}
|
||||
{% if loop.last %} {{ loop.index }} {% endif %}
|
||||
{%- endfor -%}
|
||||
lights turned on right now.
|
||||
{%- else -%}
|
||||
There are no lights turned on right now.
|
||||
{%- endif -%}
|
||||
3
templates/partials/master_bedroom_climate.yaml
Normal file
3
templates/partials/master_bedroom_climate.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
>-
|
||||
|
||||
In the bedroom, it is {{ states('sensor.bedroom_weather_temperature') | round }} degrees with around {{ states('sensor.bedroom_weather_humidity') | round }} percent humidity.
|
||||
12
templates/partials/moon.yaml
Normal file
12
templates/partials/moon.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
>-
|
||||
|
||||
{%- if states('sensor.moon') == 'full_moon' -%}
|
||||
{{
|
||||
[
|
||||
"Check out the full moon tonight!",
|
||||
"Hey look, There is the full moon.",
|
||||
"The moon is huge! And full.",
|
||||
"If you want to see the full moon, tonight is the night."
|
||||
] | random
|
||||
}}
|
||||
{%- endif -%}
|
||||
3
templates/partials/outside_forecast.yaml
Normal file
3
templates/partials/outside_forecast.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
>-
|
||||
|
||||
Outside, it's {{ states('sensor.dark_sky_temperature') | round }} degrees. It's going to be {{ states('sensor.dark_sky_hourly_summary') }} Expect {{ states('sensor.dark_sky_daily_summary') }}
|
||||
30
templates/partials/tasks.yaml
Normal file
30
templates/partials/tasks.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
>-
|
||||
{% set brita_filter = is_state('binary_sensor.brita_should_change_filter', 'on') | default(false) %}
|
||||
|
||||
{% set purifier_filter = is_state('binary_sensor.purifier_filter_needs_change', 'on') | default(false) %}
|
||||
{% set purifier_water = is_state('binary_sensor.purifier_out_of_water', 'on') | default(false) %}
|
||||
{% set has_purifier_tasks = purifier_filter or purifier_water %}
|
||||
|
||||
{% set vacuum_main_brush = states('sensor.roborock_vacuum_s5_main_brush_left')|int(-1) == 0 %}
|
||||
{% set vacuum_side_brush = states('sensor.roborock_vacuum_s5_side_brush_left')|int(-1) == 0 %}
|
||||
{% set vacuum_filter = states('sensor.roborock_vacuum_s5_filter_left')|int(-1) == 0 %}
|
||||
{% set vacuum_dirty = states('sensor.roborock_vacuum_s5_sensor_dirty_left')|int(-1) == 0 %}
|
||||
{% set has_vacuum_tasks = vacuum_main_brush or vacuum_side_brush or vacuum_filter or vacuum_dirty %}
|
||||
|
||||
{% set has_tasks = brita_filter or has_purifier_tasks or has_vacuum_tasks %}
|
||||
|
||||
{%- if has_tasks -%} {{
|
||||
[
|
||||
"You have some tasks.",
|
||||
"Here are the tasks for today.",
|
||||
"You have stuff to do."
|
||||
] | random
|
||||
}} {%- endif -%}
|
||||
|
||||
{% if brita_filter %} Brita needs filter change. {%- endif -%}
|
||||
{% if purifier_filter %} Purifier needs filter change. {%- endif -%}
|
||||
{% if purifier_water %} Purifier needs water. {%- endif -%}
|
||||
{% if vacuum_main_brush %} Vacuum main brush needs changing. {%- endif -%}
|
||||
{% if vacuum_side_brush %} Vacuum side brush needs changing. {%- endif -%}
|
||||
{% if vacuum_filter %} Vacuum filter needs changing. {%- endif -%}
|
||||
{% if vacuum_dirty %} Vacuum sensor needs cleaning. {%- endif -%}
|
||||
3
templates/partials/time.yaml
Normal file
3
templates/partials/time.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
>-
|
||||
|
||||
The time is {{ now().hour }} {{ "%0.02d" | format(now().strftime("%-M") | int) }}.
|
||||
8
templates/partials/window_check.yaml
Normal file
8
templates/partials/window_check.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
>-
|
||||
|
||||
{%- if is_state('group.all_windows', 'on') -%}
|
||||
{%- if is_state('binary_sensor.living_room_right_window', 'on') -%} The living room window is opened. {% endif %}
|
||||
{%- if is_state('binary_sensor.bedroom_right_window', 'on') -%} The master bedroom window is opened. {%- endif -%}
|
||||
{%- else -%}
|
||||
All windows are closed.
|
||||
{%- endif -%}
|
||||
29
templates/partials/window_suggestions.yaml
Normal file
29
templates/partials/window_suggestions.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
>-
|
||||
|
||||
{%- set getting_hot = [
|
||||
" to cool down a bit.",
|
||||
". It's getting hot!",
|
||||
", or you're probably gonna boil!",
|
||||
", or you're gonna simmer!"
|
||||
] -%}
|
||||
|
||||
{%- set getting_cold = [
|
||||
" to warm up a bit.",
|
||||
". It's getting chilly!",
|
||||
", or you're probably gonna freeze!",
|
||||
", or you're gonna ice up!"
|
||||
] -%}
|
||||
|
||||
{%- if (states('sensor.dark_sky_temperature') | int) < (states('sensor.bedroom_weather_temperature') | int) -%}
|
||||
|
||||
{%- if is_state('binary_sensor.bedroom_right_window', 'off')
|
||||
and (states('sensor.bedroom_weather_temperature') | int) > 22 -%}
|
||||
You should probably open the master bedroom window{{ getting_hot | random }}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if is_state('binary_sensor.bedroom_right_window', 'on')
|
||||
and (states('sensor.bedroom_weather_temperature') | int) < 18 -%}
|
||||
You should probably close the master bedroom window{{ getting_cold | random }}
|
||||
{%- endif -%}
|
||||
|
||||
{%- endif -%}
|
||||
Reference in New Issue
Block a user