Using "Helpers" in UI automation editor

Hey,
The recent versions of HA encourage us to use the UI automation editor and Helpers rather than manual YAML editing. Personally I think it’s great and prefer working with the UI.

But what I would like to be able, is to use Helpers (variables) in the UI automation editor.
My feature request is adding Helpers support in the UI.

maybe an option in the entities list at the top “Add Helper” that will bring up the helper creation dialog?

The Automation Editor closely follows how automations are manually defined in YAML, so below expects a value, not an entity_id. The example you supplied would require a template.

With that said, it would be nice if the UI editor had the power to create that template for people if they select something like an input_number as the value

1 Like

There’s no harm in wishing for new things but in this case we first have to wish for below to support templates. Then comes the wish for the Automation Editor to know which options support templates and which don’t. Then comes the wish for it to automatically convert a supplied entity_id into a template, possibility offering options because you may want to access an attribute value instead of a state value.

tl;dr
Long road to our destination.

Seems like this feature was added to 0.115 release, but only for Time / Date.
So it is half way of what I requested. You can use Helpers directly in the UI automation editor, as long as they are Time / Date.
Still can’t use them as numeric state (below / above a Helper).

trigger:
  - platform: time
    at: input_datetime.bedroom_alarm_clock_time
1 Like

I’m dealing with the same issue at the moment. Surprised it’s not more common. A little confusing for some fields to support helpers and not others… unless I’m confused about something.

It’s less confusing if you know its evolution. For the longest time, no options ever accepted any helper. Then these two enhancements appeared in two separate releases:

That’s all there is to it; two helpers in two kinds of triggers.

1 Like

Thanks for the tip. If I understand correctly I tried to add the following trigger based on the Numeric State Trigger example, but the UI gives me an error saying it expects a float for data[‘below’]:

platform: numeric_state
below: input_number.min_heater_temperature
above: input_number.max_heater_temperature
entity_id: sensor.master_bedroom_door_temperature

Going to give it a try adding it manually. Thanks again.

FWIW, I never use the UI-based Automation Editor because it doesn’t support all of Home Assistant’s scripting features.

Hi,
i am trying to do something similar. I want to be able to change some automation parameters from the Lovelace Interface using helpers for:

  • illumination trash hold
  • brightness

to take the helper value for brightness I added this code in my automation in the Yaml editor:

  • service: light.turn_on
    data:
    brightness_pct: |
    {{states(‘input_number.brightness’)|int}}

Maybe this code helps you to get what you want.

For some reason it does not allow me to use the same code for the illumination trash hold:

  • condition:
    type: is_illuminance
    condition: device
    device_id: 8d41ec7dbb638fbd5f896ea5c6ff1265
    entity_id: sensor.smart_sensor_philips_04_illuminance
    domain: sensor
    below: |
    {{states(‘input_number.illumination_trash_hold_level’)|int}}

the code above results in an error message:

  • Message malformed: expected float for dictionary value @ data[‘below’]

Hopefully somebody can help to get this part working too!

regards,
Jogchem