mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-23 19:26:36 +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
|
||||
mode: slider
|
||||
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
|
||||
max_exceeded: silent
|
||||
@ -87,6 +93,7 @@ variables:
|
||||
codelength: !input codelength
|
||||
b13armservice: !input b13armservice
|
||||
b15armservice: !input b15armservice
|
||||
discoveryprefix: !input discoveryprefix
|
||||
commandtopic: '{{ "hasp/" ~ haspname ~ "/command/" }}'
|
||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||
jsoncommandtopic: '{{ "hasp/" ~ haspname ~ "/command/json" }}'
|
||||
@ -304,7 +311,7 @@ action:
|
||||
# create number objects for each digit in codelength
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "homeassistant/number/{{haspname}}/alarmcode_{{repeat.index}}/config"
|
||||
topic: "{{discoveryprefix}}/number/{{haspname}}/alarmcode_{{repeat.index}}/config"
|
||||
payload: >-
|
||||
{"name":"{{haspname}} alarmcode {{repeat.index}}",
|
||||
"command_topic":"hasp/{{haspname}}/alarmcode/{{repeat.index}}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user