How do I edit a threshold helper?

I have created a threshold helper, “is_light_outside” to use in automations. The threshold is based on the Lux readings from a light sensor.

How can I edit this helper if I want to change the threshold? When I click on it I can change name and icon, but the threshold data is not there anymore.

In the more-info pop up of the entity, in the settings tab, there is an option in the middle, “THRESHOLD OPTIONS” It looks like a title but its a button

4 Likes

Great, thank you.
I mistook it for a title, didn’t realise it was clickable.

1 Like

Yes same here, it’s not that obvious

You can also put a threshold in an entity list card. With that a slider shows up on the GUI for you to change. Here’s a settings card I have with a bunch of helpers:

Can you share you code for that, I only get binary sensors ?

@pkscout Really neat, I want that!
But my threshold sensors presents themselves as binary sensors. How do you create your threshold sensors to get sliders in the entity list?

OK, this one is on me. I use a numeric helper as a single threshold, and my brain went there. I didn’t realize there was a threshold helper type that had an upper and lower limit. So you aren’t going to be able to do what I’m doing, as the threshold helper is an actual binary helper. I did just try putting a numeric helper in the definition for a threshold helper, but with the GUI at least it didn’t work. If you could get that working you could use two sliders to define the two ends of the threshold.

There is an FQ for a dual slider that would be nice for this:

Although the Threshold helper will not take anything but a float for upper and lower, I just tried a template in yaml

But … how can I find (change?) the entity used in the threshold calcualtions?
When I press Threshold options I only see the numercial valus.

I just manually checked into config/.storage to find what entity I used for that helper …

2 Likes

Accidentally I found an answer on my question: In the developertools - states , I can see also the “entity_id” attribute of my threshold entity which is the one used in the calculation.
But I still think it’s a small bug that it is not visible in the GUI …[unless I’m doing something wrong]

Is there a way set the threshold options programmatically, i.e. using an automation action?

Totally agree with this. This is just a small bug but there are many places where options get hidden, some not even accessible, such as some settings in integrations (eg. ip address for Kasa devices).
Overall though these all add up to mild frustration.

Unfortunately, not able to permanently change ‘entity_id’ here, so only way is to delete helper and create a new one for the changed entity.

Ditto on the request to please add the ability to change the entity a threshold depends on in the UI. Having to delete it and recreate it is super annoying. I just migrated to a new machine, had to migrate zigbee to a new radio, a whole bunch of entities changed name for no reason (e.g. active_power to power, rms_current to current, etc)… and now I have to fix a bunch of dependencies. Well, you know the drill.

3 Likes