AWTRIX 3 - Blueprint for creating simple apps for dummies

in “AWTRIX application options section”

color: "{{ 'red' if value_template.text > 0 else 'green' }}"

I had to use hex values for colors but it works!

color: "{{ '#FF0000' if value_template.text > 0 else '#00FF00' }}"
1 Like

Hi,

thank you for your wonderful work.

It works for me. But i am able to show only one entity. I would like to show upto 5 entites one after another. Right now it displays only one of the entity.
Can you tell me how to achieve this ?

Thank you.

Thanks @10der , really like the component and blueprint. Your explanation here helped me to use it.

Just made a very similar prompt as @Klug
Showing my grid-exchange with other color and icon for positive and negative values:

alias: Awtrix_E320_momentan
description: ""
use_blueprint:
  path: 10der/awtrix-simple.yaml
  input:
    app_name: awtrix_e320_now
    entity: sensor.l_g_e320_momentan
    awtrix_device:
      - 351487bc51fa3bff3b3dffc07bec38ea
      - 7df02022f0c025dc6e4e9ff7a260a78a
    suffix_text: W
    value_template:
      text: "{{ states(entity_id) | int(0) | abs }}"
      text2: "{{ states(entity_id) | int(0) }}"
    user_options:
      duration: 5
      color: "{{ '#FF0000' if value_template.text2 > 0 else '#00FF00' }}"
      icon: "{{ '52715' if value_template.text2 > 0 else '52648' }}"

Now i can see the direction of the power flow at icon/color, so i want to use absolute values.
I worked around with the non-absolute value at the “text2”-field. Im sure there is a better way, but it works :wink:

1 Like

I am not David Copperfield… but my crystal ball tells me that this field you leave as is instead of create a new name :slight_smile:

I tried to add the icon just like you did but I’m not getting anything.
While I can see the icon using the integrated icons browser on the TC001 and the color (green vs red) works.

      user_options:
        duration: 5
        color: '{{ ''#FF0000'' if value_template.data > 0 else ''#00FF00'' }}'
        icon: '{{ ''52715'' if value_template.data > 0 else ''52648'' }}'
      value_template:
        data: '{{states(entity_id) | round}}'
        text: '{{(states(entity_id) | round) | abs}}'
        icon: '{{app_icon}}'

delete the icon in the value_template section

I tried that before posting (and retried again), doesn’t work here.

Im using single quotation marks, maybe ist that?

It’s something else I think.

Now I’ve remove “icon” in the “value_template” section, I’m getting errors in the log:

2024-05-26 11:49:46.593 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'icon' when rendering '{
  {{('"icon"' if value_template.icon) ~ (":" if value_template.icon) ~ ('"' ~ value_template.icon ~ '"' if value_template.icon) }}
  {{"," if value_template.icon}} "text":"{{prefix_text~value_template.text~suffix_text}}"
}'

Since the last update, the dynamic icons defined via value_template no longer work for me. Is there an explanation for this?

yes.
please move to AWTRIX application options

OK
add predefined
icon_template

so, now just override

value_template
or
icon_template

in Additional options

awtrix (21)
awtrix (20)

alias: New automation - SAMPLE ICON
description: ""
use_blueprint:
  path: 10der/awtrix-simple.yaml
  input:
    app_name: awtrix_app_temp
    entity: input_boolean.test_button
    additional_options:
      icon_template: "{{'405' if states(entity_id) == 'on' else '41181' }}"
    awtrix_device:
      - c9678a92ae6e69605a8b90539f9e64d3
alias: New automation - SAMPLE ICON
description: ""
use_blueprint:
  path: 10der/awtrix-simple.yaml
  input:
    app_name: awtrix_app_temp
    entity: input_boolean.test_button
    additional_options:
      icon_template: "{{'405' if states(entity_id) == 'on' else '41181' }}"
      value_template: "{{'Hello!' if states(entity_id) == 'on' else 'Bye!' }}"
    awtrix_device:
      - c9678a92ae6e69605a8b90539f9e64d3

awtrix (22)

I can’t get the Blueprint to work! I have everything installed, but when I create an automation it does not send me any notification to Awtrix. Any ideas?

notification?

Hello. Please tell me, I added a second device and selected both in automation, but it doesn’t work. What am I doing wrong?

This may be related to the latest update to your code, I’ll check it out.
No, I checked. With two hours it just won’t start. =( Just when both are connected to MQTT.
The problem occurs when renaming…

Quotes should also work.

Let me clarify a little. When I change the device name but do not change the ID, the data is not displayed on the display.