Template macros

This commit is contained in:
2023-04-05 20:08:52 -04:00
parent bb37a240d0
commit 2ec072af86
12 changed files with 111 additions and 84 deletions

View File

@ -0,0 +1,4 @@
{% macro get_brightness_pct(entity_id) %}
{% set current = state_attr(entity_id,'brightness') %}
{{ ((current / 255) * 100) | float | round(2) }}
{% endmacro %}