Make automation Threshold editable in UI

Hei Guys,
I created an automation, that is triggered, when Temperature is lower than a threshold ( hard coded in automation ). This trigger is tested successfull and working.

Is there any option to make that threshold via a UI variable ( helper ?).

Would be nice to achieve that via UI configuration.

Regards Manuel

trigger:
  platform: numeric_state
  entity_id: YOUR TEMPERATURE SENSOR
  below: YOUR INPUT NUMBER
2 Likes

yeah, thats exactly what I got. But I want the “YOUR INPUT NUMBER” not to be hard coded but to be editable via dashboard

YOUR INPUT NUMBER means an input_number.xxx entity ->

1 Like

he meant

trigger:
  platform: numeric_state
  entity_id: YOUR TEMPERATURE SENSOR
  below: "{{states('input_number.your_input')}}"

Modify the input from the UI

No template needed, the below/above options accept input_numbers directly -> https://www.home-assistant.io/docs/automation/trigger/#numeric-state-trigger

2 Likes

I really I’m outdated

1 Like

I absolutely didn’t mean that.

The best way to help people is to give them correct information.

1 Like

Back to topic:
I tested what you recommended but receive

Message malformed: expected float for dictionary value @ data['below']

can anyone help ?

Regards manuel

Can you show us your actual configuration?

I just tested it with a simple configuration but had it with another (i’ve not access because it’s in friend’s house)
I’m using the UI and testing with this trigger:

platform: numeric_state
entity_id: input_number.num1
below: input_number.num2

seams like below value is not correct

What version of homeassistant are you running?

I’m running the current version. Installed with Image for RPi 4

You wouldn’t be the first person this week to tell me they are running the current version when they’re not, please tell me the version number that appears on the page Configuration > Info

1 Like

Running 2021.1.5 just installed a few days ago

Not the latest version. Please update to 2021.2.1, your trigger will then work as expected.

1 Like

OK. Started the update. I’ll come back to you in a few seconds.

1 Like

Thanks a lot. Indeed it worked.
Now I can play around with this testautomation. Thanks a lot.

1 Like

No worries :+1:

Just couriosity: was there an update causing the yaml interpretation or is this feature new for automations?