Work on house status report

This commit is contained in:
2023-06-02 20:29:50 -04:00
parent a51815bec4
commit 827e6b11c9
3 changed files with 58 additions and 17 deletions

View File

@ -2,3 +2,12 @@
{% set current = state_attr(entity_id,'brightness') %}
{{ ((current / 255) * 100) | float | round(2) }}
{% endmacro %}
{% macro lightsOn(type,method) %}
{% set lights = states('sensor.current_lights_on') %}
{% if method == 'tts' %}
'Around the house, there {% if lights == '1' %}is{% else %}are{% endif %}currently{{ lights }} {% if lights == '1' %}light {% else %}lights {% endif %} on. '
{% elif method == 'text' %}
There {% if lights == '1' %}is {% else %}are {% endif %}currently {{ lights }} {% if lights == '1' %}light {% else %}lights {% endif %}on.
{% endif %}
{% endmacro %}