Created
January 14, 2025 11:51
-
-
Save andrew-codechimp/5802f492f0b3968d3f0d529274d2d61f to your computer and use it in GitHub Desktop.
Awtrix Home Assistant Scripts
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
sequence: | |
- variables: | |
awtrix_topic: >- | |
{{ states((device_entities(awtrix_device) | | |
select('search','device_topic') | list)[0]) }} | |
- action: mqtt.publish | |
metadata: {} | |
data: | |
topic: "{{awtrix_topic}}/custom/{{app_name}}" | |
payload: |- | |
{ | |
"text": "{{ text_message }}", | |
"icon": "{{ icon }}", | |
"textCase": 2, | |
"pushIcon": 0, | |
"repeat": 1, | |
"textOffset": 0 | |
} | |
enabled: true | |
fields: | |
awtrix_device: | |
required: true | |
selector: | |
device: | |
filter: | |
- integration: mqtt | |
manufacturer: Blueforcer | |
name: Awtrix | |
description: The Awtrix device to use. | |
app_name: | |
required: true | |
selector: | |
text: null | |
name: App name | |
description: The unique name of your app (no spaces). | |
icon: | |
required: true | |
selector: | |
template: null | |
name: Icon | |
description: >- | |
The icon ID or filename (without extension) to display on the app. You can | |
also send an 8x8 jpg as Base64 String. | |
text_message: | |
required: true | |
selector: | |
template: null | |
name: Text | |
description: >- | |
The text to display. Keep in mind the font does not have a fixed size and | |
I uses less space than W. This affects when text will start | |
scrolling. | |
alias: Awtrix App | |
description: "" | |
mode: queued | |
max: 100 |
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
sequence: | |
- variables: | |
awtrix_topic: >- | |
{{ states((device_entities(awtrix_device) | | |
select('search','device_topic') | list)[0]) }} | |
- action: mqtt.publish | |
metadata: {} | |
data: | |
topic: "{{awtrix_topic}}/custom/{{app_name}}" | |
payload: "" | |
enabled: true | |
fields: | |
awtrix_device: | |
required: true | |
selector: | |
device: | |
filter: | |
- integration: mqtt | |
manufacturer: Blueforcer | |
name: Awtrix | |
description: The Awtrix device to use. | |
app_name: | |
required: true | |
selector: | |
text: null | |
name: App name | |
description: The unique name of your app (no spaces). | |
alias: Awtrix App Delete | |
description: "" | |
mode: queued | |
max: 100 |
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
sequence: | |
- variables: | |
awtrix_topic: >- | |
{{ states((device_entities(awtrix_device) | | |
select('search','device_topic') | list)[0]) }} | |
- action: mqtt.publish | |
metadata: {} | |
data: | |
topic: "{{awtrix_topic}}/notify" | |
payload: |- | |
{ | |
"text": "{{ text_message }}", | |
"icon": "{{ icon }}", | |
"textCase": 2, | |
"pushIcon": 0, | |
"textOffset": 0, | |
"duration": {{ duration }}, | |
"hold": {{ hold | lower }} | |
} | |
enabled: true | |
fields: | |
awtrix_device: | |
required: true | |
selector: | |
device: | |
filter: | |
- integration: mqtt | |
manufacturer: Blueforcer | |
name: Awtrix | |
description: The Awtrix device to use. | |
icon: | |
required: true | |
selector: | |
template: null | |
name: Icon | |
description: >- | |
The icon ID or filename (without extension) to display on the app. You can | |
also send an 8x8 jpg as Base64 String. | |
text_message: | |
required: true | |
selector: | |
template: null | |
name: Text | |
description: >- | |
The text to display. Keep in mind the font does not have a fixed size and | |
I uses less space than W. This affects when text will start | |
scrolling. | |
duration: | |
required: true | |
default: 5 | |
selector: | |
number: | |
min: 0 | |
max: 100 | |
name: Duration | |
description: The number or seconds to display the notification. | |
hold: | |
required: true | |
default: false | |
selector: | |
boolean: null | |
name: Hold | |
description: >- | |
Hold your notification on top until you press the middle button or dismiss | |
it via HomeAssistant. | |
alias: Awtrix Notification | |
description: "" | |
mode: queued | |
max: 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment