mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-08-04 17:07:46 +00:00
Fix hardcoded device name
This commit is contained in:
parent
178ded13c0
commit
e509d17f05
@ -20,6 +20,7 @@ blueprint:
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
source_url: "https://github.com/HASwitchPlate/Blueprints/blob/main/hasp_Display_Alarm_Control_page7.yaml"
|
||||||
domain: automation
|
domain: automation
|
||||||
input:
|
input:
|
||||||
haspdevice:
|
haspdevice:
|
||||||
@ -315,6 +316,10 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ trigger.platform == "mqtt" }}'
|
value_template: '{{ trigger.platform == "mqtt" }}'
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: mqtt.publish
|
||||||
|
data:
|
||||||
|
topic: "debug"
|
||||||
|
payload: "trigger: {{trigger}}"
|
||||||
- choose:
|
- choose:
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# Catch incoming JSON button presses
|
# Catch incoming JSON button presses
|
||||||
@ -359,9 +364,9 @@ action:
|
|||||||
entity_id: !input alarmpanel
|
entity_id: !input alarmpanel
|
||||||
code: >-
|
code: >-
|
||||||
{%- set code = namespace() -%}
|
{%- set code = namespace() -%}
|
||||||
{%- set code.value = states("number.plate01_alarmcode_" ~ codelength)|int -%}
|
{%- set code.value = states("number." ~ haspname ~ "_alarmcode_" ~ codelength)|int -%}
|
||||||
{%- for i in range(1,codelength|int) -%}
|
{%- for i in range(1,codelength|int) -%}
|
||||||
{%- set code.value = code.value|int * 10 + (states("number.plate01_alarmcode_" ~ (codelength|int - i))|int) -%}
|
{%- set code.value = code.value|int * 10 + (states("number." ~ haspname ~ "_alarmcode_" ~ (codelength|int - i))|int) -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{{code.value|int}}
|
{{code.value|int}}
|
||||||
- repeat:
|
- repeat:
|
||||||
@ -384,9 +389,9 @@ action:
|
|||||||
entity_id: !input alarmpanel
|
entity_id: !input alarmpanel
|
||||||
code: >-
|
code: >-
|
||||||
{%- set code = namespace() -%}
|
{%- set code = namespace() -%}
|
||||||
{%- set code.value = states("number.plate01_alarmcode_" ~ codelength)|int -%}
|
{%- set code.value = states("number." ~ haspname ~ "_alarmcode_" ~ codelength)|int -%}
|
||||||
{%- for i in range(1,codelength|int) -%}
|
{%- for i in range(1,codelength|int) -%}
|
||||||
{%- set code.value = code.value|int * 10 + (states("number.plate01_alarmcode_" ~ (codelength|int - i))|int) -%}
|
{%- set code.value = code.value|int * 10 + (states("number." ~ haspname ~ "_alarmcode_" ~ (codelength|int - i))|int) -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{{code.value|int}}
|
{{code.value|int}}
|
||||||
- repeat:
|
- repeat:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user