From 9e59c145e799ac702cb7e997dac90485d9870989 Mon Sep 17 00:00:00 2001 From: Christoph Giesche Date: Tue, 10 Sep 2024 12:43:46 +0200 Subject: [PATCH] Fixed #295: Set default brightness to 255 if state attributes do not contain brightness. --- public/config/default-display-config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/config/default-display-config.yml b/public/config/default-display-config.yml index 4511dd9..54d7c82 100644 --- a/public/config/default-display-config.yml +++ b/public/config/default-display-config.yml @@ -60,9 +60,10 @@ light: color: "#888888" feedbackLayout: "$B1" feedback: | + {% set brightness = attributes.brightness | default(255, true) %} { - "indicator": {{ attributes.brightness / 255 * 100 }}, - "value": "{{ (attributes.brightness / 255 * 100) | int }}%" + "indicator": {{ brightness / 255 * 100 }}, + "value": "{{ (brightness / 255 * 100) | int }}%" } states: unavailable: