From 342e9624eab383c61cd0da28cf292bd0a8b0ee01 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 29 Oct 2022 00:29:20 +0200 Subject: [PATCH] fix: round brightness --- blueprint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprint.yaml b/blueprint.yaml index 7987924..4b40db9 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -1539,8 +1539,8 @@ action: {%- elif trigger.entity_id == entity32 -%} {{ entity32_name }} {%- endif -%} btn_bri_txt: >- - {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' -%} {{ trigger.to_state.attributes.brightness | int * 100 /254 | round(0) }}% - {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' -%} {{ trigger.to_state.attributes.current_position | int | round(0) }}% + {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' -%} {{ (trigger.to_state.attributes.brightness | int * 100 /254) | round(0) }}% + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' -%} {{ (trigger.to_state.attributes.current_position | int) | round(0) }}% {%- else -%} " " {%- endif -%}