Hi,
I've installed the latest version 26059 and can confirm that the parameter substitution works perfectly!
Thanks a lot for the quick fix and the feature update @toggledbits
Here's my setup
local_mqtt_capabilities.yaml
x_mqtt_annunciator_panel:
actions:
on:
arguments:
led:
type: int
min: 1
max: 45
color:
type: string
effect:
type: string
default: "static"
values:
- static
- blink
- breath
speed:
type: int
default: 500
off:
arguments:
led:
type: int
min: 1
max: 45
static:
arguments:
led:
type: int
min: 1
max: 45
color:
type: string
blink:
arguments:
led:
type: int
min: 1
max: 45
color:
type: string
speed:
type: int
default: 500
breath:
arguments:
led:
type: int
min: 1
max: 45
color:
type: string
speed:
type: int
default: 500
brightness:
arguments:
value:
type: int
min: 0
max: 255
local_mqtt_devices.yaml
annunciator-panel:
capabilities:
- x_mqtt_annunciator_panel
requires: [panel]
actions:
x_mqtt_annunciator_panel:
on:
topic: "annunciator/panel/%panel%/led/%parameters.led%/set"
retain: true
payload:
expr: >
{ "color": parameters.color, "effect": parameters.effect, "speed": parameters.speed }
type: json
off:
topic: "annunciator/panel/%panel%/led/%parameters.led%/set"
retain: true
payload:
expr: >
{ "color": "off", "effect": "static" }
type: json
static:
topic: "annunciator/panel/%panel%/led/%parameters.led%/set"
retain: true
payload:
expr: >
{ "color": parameters.color, "effect": "static" }
type: json
blink:
topic: "annunciator/panel/%panel%/led/%parameters.led%/set"
retain: true
payload:
expr: >
{ "color": parameters.color, "effect": "blink", "speed": parameters.speed }
type: json
breath:
topic: "annunciator/panel/%panel%/led/%parameters.led%/set"
retain: true
payload:
expr: >
{ "color": parameters.color, "effect": "breath", "speed": parameters.speed }
type: json
brightness:
topic: "annunciator/panel/brightness"
retain: true
payload:
expr: >
{ "value": parameters.value }
type: json
reactor.yaml
# Annunciator panels
annunciator-panel-1:
name: 'Annunciator panel 1'
panel: 1
include: annunciator-panel
annunciator-panel-2:
name: 'Annunciator panel 2'
panel: 2
include: annunciator-panel
Note that the brightness control is not panel-dependent, as it uses the rpi-ws281x-native library's global brightness attribute. This works well for my setup, as I want all panels to share the same brightness level anyway. Speaking of brightness, it will be controlled by the technical room's PIR and MSR rules that dim or turn off the panels when nobody is present.
Below is the setup for the ventilation unit (AHU) indicator light:
- Green: Running OK
- Yellow: Switched off
- Blinking Red: Error
And here are the panel operations:
br,
mgvra























