Files
sarah/config/templates/partials/window_suggestions.yaml
T
2023-05-01 18:44:15 +03:00

26 lines
850 B
YAML

>-
{%- set getting_hot = [
" to cool down a bit.",
". It's getting hot!",
] -%}
{%- set getting_cold = [
" to warm up a bit.",
". It's getting chilly!",
] -%}
{%- if (state_attr('weather.pirateweather', 'temperature') | int) < (states('sensor.bedroom_weather_temperature') | int) -%}
{%- if is_state('binary_sensor.bedroom_right_window_contact', '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_contact', 'on')
and (states('sensor.bedroom_weather_temperature') | int) < 18 -%}
You should probably close the master bedroom window{{ getting_cold | random }}
{%- endif -%}
{%- endif -%}