Files
Home-Assistant-Configs/custom_templates/lighting.jinja
2023-04-05 20:09:06 -04:00

5 lines
161 B
Django/Jinja

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