mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-13 13:29:12 +00:00
Added macros as detailed in #56
This commit is contained in:
parent
bc3f6a334c
commit
b1c5e82012
@ -26,11 +26,10 @@
|
||||
"Welcome home " ~ person,
|
||||
"Guess who is home? " ~ person +" is!",
|
||||
"Attention: " ~ person + " is now in the house.",
|
||||
person ~ " in da hiz Ouse!",
|
||||
"Welcome Home " ~ person + ". We've missed you. or at least Molly did.",
|
||||
"Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person,
|
||||
"Life is like a song, you’re back where you belong. Welcome home " ~ person,
|
||||
"Hey there " ~ person,
|
||||
"Hey there " ~ person + " Welcome Home!",
|
||||
person ~ "! You're home!"
|
||||
] | random }}
|
||||
{%- endmacro -%}
|
||||
|
@ -24,6 +24,7 @@
|
||||
data_template:
|
||||
value1: >
|
||||
"Welcome Home. Here is what's going on around the house right now:
|
||||
|
||||
{%- macro responsibilities() -%}
|
||||
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
|
||||
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day.
|
||||
@ -35,7 +36,17 @@
|
||||
{%endif%}
|
||||
{%- endmacro -%}
|
||||
{{responsibilities()}}
|
||||
Inside the house, it is {{ states.climate.downstairs.attributes["current_temperature"]}} degrees with around {{states('sensor.downstairs_thermostat_humidity')}} percent humidity. Outside, it is going to be {{states('sensor.dark_sky_minutely_summary')}}
|
||||
|
||||
{%- macro inside_weather() -%}
|
||||
Inside the house, it is {{ states.climate.downstairs.attributes["current_temperature"]}} degrees with around {{states('sensor.downstairs_thermostat_humidity')}} percent humidity.
|
||||
{%- endmacro -%}
|
||||
{{inside_weather()}}
|
||||
|
||||
{%- macro outside_weather() -%}
|
||||
Outside, it is going to be {{states('sensor.dark_sky_minutely_summary')}}
|
||||
{%- endmacro -%}
|
||||
{{outside_weather()}}
|
||||
|
||||
{% if is_state('cover.large_garage', 'open') -%}
|
||||
Also, The Large Garage Door is still open
|
||||
{% endif -%}
|
||||
@ -43,12 +54,14 @@
|
||||
{% if is_state('cover.large_garage', 'open') -%}and
|
||||
{%- endif %} The small Garage Door is still open.
|
||||
{% endif %}
|
||||
|
||||
{%- macro lights_status() -%}
|
||||
. There are
|
||||
{% for state in states.light if state.state == 'on' -%}
|
||||
{%- if loop.last -%}
|
||||
{{ loop.index }}
|
||||
{%- endif -%}
|
||||
{%- endfor %} lights on right now."
|
||||
{%- endfor %} lights on right now.
|
||||
{% set comma = joiner(', ') %} The
|
||||
{% for group in states.group|groupby('state') -%}
|
||||
{%- for entity in group.list if entity.state == 'on' and entity.name.split(' ')[1]|lower == 'lights' and entity.name.split(' ')[0]|lower != 'all' and entity.name.split(' ')[0]|lower != 'interior' -%}
|
||||
@ -56,3 +69,5 @@
|
||||
{{ entity.name }}
|
||||
{%- endfor -%}
|
||||
{%- endfor %}
|
||||
{%- endmacro -%}
|
||||
{{lights_status()}}"
|
||||
|
@ -8,7 +8,7 @@ Weather:
|
||||
- sensor.dark_sky_minutely_summary
|
||||
# - sensor.dark_sky_nearest_storm_distance
|
||||
- sensor.dark_sky_precip_intensity
|
||||
- sensor.dark_sky_precip_intensity_max
|
||||
- sensor.dark_sky_daily_max_precip_intensity
|
||||
- sensor.dark_sky_wind_speed
|
||||
- sensor.dark_sky_humidity
|
||||
- sensor.dark_sky_temperature
|
||||
|
Loading…
x
Reference in New Issue
Block a user