mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-24 19:56:43 +00:00
Update Alarm Panel blueprint to allow configurable discovery topic
This commit is contained in:
parent
29e6c95f80
commit
98660ea0a6
@ -71,6 +71,12 @@ blueprint:
|
|||||||
max: 10
|
max: 10
|
||||||
mode: slider
|
mode: slider
|
||||||
unit_of_measurement: digits
|
unit_of_measurement: digits
|
||||||
|
discoveryprefix:
|
||||||
|
name: "Home Assistant MQTT discovery prefix"
|
||||||
|
description: 'In nearly all cases this should be "homeassistant"'
|
||||||
|
default: "homeassistant"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
|
||||||
mode: queued
|
mode: queued
|
||||||
max_exceeded: silent
|
max_exceeded: silent
|
||||||
@ -87,6 +93,7 @@ variables:
|
|||||||
codelength: !input codelength
|
codelength: !input codelength
|
||||||
b13armservice: !input b13armservice
|
b13armservice: !input b13armservice
|
||||||
b15armservice: !input b15armservice
|
b15armservice: !input b15armservice
|
||||||
|
discoveryprefix: !input discoveryprefix
|
||||||
commandtopic: '{{ "hasp/" ~ haspname ~ "/command/" }}'
|
commandtopic: '{{ "hasp/" ~ haspname ~ "/command/" }}'
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
jsoncommandtopic: '{{ "hasp/" ~ haspname ~ "/command/json" }}'
|
jsoncommandtopic: '{{ "hasp/" ~ haspname ~ "/command/json" }}'
|
||||||
@ -304,7 +311,7 @@ action:
|
|||||||
# create number objects for each digit in codelength
|
# create number objects for each digit in codelength
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data:
|
data:
|
||||||
topic: "homeassistant/number/{{haspname}}/alarmcode_{{repeat.index}}/config"
|
topic: "{{discoveryprefix}}/number/{{haspname}}/alarmcode_{{repeat.index}}/config"
|
||||||
payload: >-
|
payload: >-
|
||||||
{"name":"{{haspname}} alarmcode {{repeat.index}}",
|
{"name":"{{haspname}} alarmcode {{repeat.index}}",
|
||||||
"command_topic":"hasp/{{haspname}}/alarmcode/{{repeat.index}}",
|
"command_topic":"hasp/{{haspname}}/alarmcode/{{repeat.index}}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user