Use 'text helper' changed as a trigger

I want to send notifications to my Ulanzi/Awtrix clock, but to avoid dozens of blueprint automations and helpers, I want to use a text helper as storage for a notification.

I cannot get a helper change (a new notification is written) as a trigger. Based on that (a new notification is stored) I want to push the contents to my clock.

Is this possible somehow?

You should just be able to use a State trigger…

triggers:
  - trigger: state
    entity_id: input_text.your_helpers_id
    to: ~
1 Like

Thanks. When I go in the visual editor; I stee the ~ is replaced with null. Which seems wrong…

I’ve tried to build on this further. But I ran into an other problem: I am activating the notification on a string change, but when there is no change but I want to push the notification I get nothing.

I thought to ‘reset’ the notification after it has been displayed. But that is also a change. So I came up with this, but I think it doesn’t work… the reset string is “xxx”, so shorter than 5.

condition: state
entity_id: input_text.notification_string
attribute: min
state: "5"

Nope, that behavior is correct. Nulls in YAML can be expressed with null or ~… when editing in YAML you can also just leave the value for to blank and HA will convert it to null. The visual editor actually stores automations as json, so some things get transcribed/translated to a standardized set of values.

I’m not sure what your goal with this condition is. The value for the attribute min reflects a setting you configured when setting up the helper, in most cases it will never change so such a condition would either always be true or always be false.

It might be helpful if you would share the automation you have so far, so we can see what you are attempting to do more generally.

It sounds like you may just need to add another trigger. Alternatively, you may want to consider moving the actions to a script.

I am trying to avoid too much helpers. I already lost track of them, especially with the blueprints for my Awtrix clock (which needs for every blueprint automation a separate helper).

So instead of each notification with a helper I am trying to use a text variable that gets filled as the notification (for the dishwasher, dryer, etc). I wanted to fire off an automation when the string gets filled with new data, and that fires off the notification on the actual clock. I don’t want to add that automation to every automation with a notification (if I need to change it, I need to find all those redundant actions).

How is that different? There needs to be a trigger when an automation fills the string and wants to push the notification.

I guess this is the way then… fill the string, turn on the toggle. That toggle sends the actual notification to the clock.

For anyone to be able to help you, you need to explain in more technical terms exactly what is or isn’t working. This for example just makes no sense at all:

What does any of this mean? Why would you expect the automation to trigger when the string hasn’t been changed? How do you expect HA to know what you “want”?

1 Like