Last active
June 18, 2025 10:30
-
-
Save Fexiven/11e533bb1833008052fe992d843e4b0f to your computer and use it in GitHub Desktop.
awtrix random effects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Awtrix Random Effects | |
description: "Sends a random AWTRIX effect with settings at a defined interval to one or more AWTRIX devices." | |
domain: automation | |
input: | |
awtrix_device: | |
name: AWTRIX Device | |
description: "Select one or more AWTRIX devices for MQTT publishing." | |
selector: | |
device: | |
filter: | |
integration: mqtt | |
manufacturer: Blueforcer | |
model: AWTRIX 3 | |
multiple: true | |
interval: | |
name: Trigger Interval (minutes) | |
description: "How often the effect should change (e.g., 5 for every 5 minutes)." | |
default: 5 | |
selector: | |
number: | |
min: 1 | |
max: 60 | |
unit_of_measurement: minutes | |
available_effects: | |
name: Available Effects | |
description: "List of AWTRIX effects to choose from." | |
default: | |
- Fade | |
- MovingLine | |
- BrickBreaker | |
- PingPong | |
- Radar | |
- Checkerboard | |
- Fireworks | |
- PlasmaCloud | |
- Ripple | |
- Snake | |
- Pacifica | |
- TheaterChase | |
- Plasma | |
- Matrix | |
- SwirlIn | |
- SwirlOut | |
- LookingEyes | |
- TwinklingStars | |
- ColorWaves | |
selector: | |
object: {} | |
palettes: | |
name: Available Color Palettes | |
description: "List of AWTRIX palettes for effects." | |
default: | |
- Cloud | |
- Lava | |
- Ocean | |
- Forest | |
- Stripe | |
- Party | |
- Heat | |
- Rainbow | |
selector: | |
object: {} | |
speeds: | |
name: Speed Options | |
description: "Possible speed values for effects." | |
default: | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
- 8 | |
selector: | |
object: {} | |
blend_options: | |
name: Blend Options | |
description: "Whether to interpolate between colors for smooth transitions." | |
default: | |
- true | |
- false | |
selector: | |
object: {} | |
trigger: | |
# Trigger every minute at second 0. | |
- platform: time_pattern | |
seconds: 0 | |
condition: | |
# Execute the action only when the current minute is divisible by the specified interval. | |
- condition: template | |
value_template: > | |
{{ (now().minute | int) % (interval | int) == 0 }} | |
action: | |
# Iterate over each selected AWTRIX device. | |
- repeat: | |
for_each: "{{ awtrix_device }}" | |
sequence: | |
- service: mqtt.publish | |
data: | |
# Use each device directly as the MQTT topic. | |
topic: "{{ repeat.item }}" | |
payload: > | |
{{ { | |
"effect": available_effects | random, | |
"effectSettings": { | |
"speed": speeds | random, | |
"palette": palettes | random, | |
"blend": blend_options | random | |
} | |
} | tojson }} | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment