"Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt"\r
{%- endmacro -%}\r
\r
+ {# Location Status #}\r
+ {%- macro status_location(start, num) -%}\r
+ {% for entity_id in states.group.people.attributes.entity_id %}\r
+ {% set name = state_attr(entity_id, 'friendly_name') %}\r
+ {% if is_state(entity_id, 'not_home') %}\r
+ {% set position = state_attr(entity_id, 'address') %}\r
+ {% else %}\r
+ {% set position = states(entity_id) %}\r
+ {% endif %}\r
+ \r
+ {% if (loop.index >= start|int) and (loop.index < num|int+start|int) %}\r
+ La posizione di {{ name }} è {{ position }}.\r
+ {% endif %} \r
+ {%- endfor %}\r
+ {%- endmacro -%}\r
+ \r
{# Car Status #}\r
{%- macro status_car() -%}\r
{% if is_state('device_tracker.wdd1760081v167576', state_attr('zone.home', 'friendly_name')) %}\r
{% endif %}\r
{%- endmacro -%}\r
\r
- {# Location Status #}\r
- {%- macro status_location(start, num) -%}\r
- {% for entity_id in states.group.people.attributes.entity_id %}\r
- {% set name = state_attr(entity_id, 'friendly_name') %}\r
- {% if is_state(entity_id, 'not_home') %}\r
- {% set position = state_attr(entity_id, 'address') %}\r
- {% else %}\r
- {% set position = states(entity_id) %}\r
- {% endif %}\r
- \r
- {% if (loop.index >= start|int) and (loop.index < num|int+start|int) %}\r
- La posizione di {{ name }} è {{ position }}.\r
- {% endif %} \r
- {%- endfor %}\r
- {%- endmacro -%}\r
- \r
{# End Message #}\r
{%- macro end_message() -%}\r
{% if enable_status | int == 1 %}\r
\r
{% endif %}\r
\r
- {# Location Info #}\r
+ {# Location Status #}\r
{% if (enable_status | int == 1) or (enable_location | int == 1) %}\r
{{ status_location(location_people_start, location_people_num) }}\r
{% endif %}\r