Template macros
This commit is contained in:
4
custom_templates/lighting.jinja
Normal file
4
custom_templates/lighting.jinja
Normal 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 %}
|
Reference in New Issue
Block a user