From 5120617777e6f890daa456c20d9384b1222be756 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 27 Jul 2026 15:17:46 +0000 Subject: [PATCH] Fix: channel-Vergleich robust mit | int statt String-Vergleich MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HA parst Template-Ergebnisse, die wie Zahlen aussehen, automatisch zurück in den nativen Typ. channel == '3' (String-Vergleich) war dadurch immer False, selbst bei korrekt konfigurierten Tasten. --- blueprints/automation/hm_pb_6_wm55_taster.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/blueprints/automation/hm_pb_6_wm55_taster.yaml b/blueprints/automation/hm_pb_6_wm55_taster.yaml index 99770af..322c372 100644 --- a/blueprints/automation/hm_pb_6_wm55_taster.yaml +++ b/blueprints/automation/hm_pb_6_wm55_taster.yaml @@ -233,7 +233,7 @@ blueprint: label: Ausschalten variables: - channel: "{{ trigger.event.data.channel | string }}" + channel: "{{ trigger.event.data.channel }}" button_1_entity: !input button_1_entity button_1_action: !input button_1_action button_2_entity: !input button_2_entity @@ -257,7 +257,7 @@ action: - choose: - conditions: - condition: template - value_template: "{{ channel == '1' and button_1_entity not in [none, ''] }}" + value_template: "{{ channel | int == 1 and button_1_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_1_action }}" target: @@ -265,7 +265,7 @@ action: - conditions: - condition: template - value_template: "{{ channel == '2' and button_2_entity not in [none, ''] }}" + value_template: "{{ channel | int == 2 and button_2_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_2_action }}" target: @@ -273,7 +273,7 @@ action: - conditions: - condition: template - value_template: "{{ channel == '3' and button_3_entity not in [none, ''] }}" + value_template: "{{ channel | int == 3 and button_3_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_3_action }}" target: @@ -281,7 +281,7 @@ action: - conditions: - condition: template - value_template: "{{ channel == '4' and button_4_entity not in [none, ''] }}" + value_template: "{{ channel | int == 4 and button_4_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_4_action }}" target: @@ -289,7 +289,7 @@ action: - conditions: - condition: template - value_template: "{{ channel == '5' and button_5_entity not in [none, ''] }}" + value_template: "{{ channel | int == 5 and button_5_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_5_action }}" target: @@ -297,7 +297,7 @@ action: - conditions: - condition: template - value_template: "{{ channel == '6' and button_6_entity not in [none, ''] }}" + value_template: "{{ channel | int == 6 and button_6_entity not in [none, ''] }}" sequence: - action: "homeassistant.{{ button_6_action }}" target: