Edit Triggers of Template Sensor in UI #2020
Unanswered
luca-vogels
asked this question in
Automations & scripts
Replies: 1 comment 2 replies
-
|
Unfortunately, the core team is against this change. In the future, when template blueprints can be imported through the UI, you will be able to use trigger based template entities in the UI through blueprints. I have been working towards this goal over the past year. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature
Custom created Template Sensors (Settings > Devices & Services > Helpers) are executed every minute and when the referenced entities change. When editing the Template of the sensor, this can be seen in the preview section at the end of the editor UI.
It would be nice if the UI would provide options to remove those default triggers and add custom triggers.
In addition, there could be an option added that allows defining a "Triggerable Template" besides the already existing "Availability Template". Only if it evaluates to a truthy value the triggers are allowed to update the sensor, otherwise the sensor returns the latest known value.
Use cases
A sensor that uses the hourly temperature forecast of today and computes the minimum temperature.
With the current implementation, the sensor updates every minute, and already passed hours no longer get considered for the computation because the forecast only returns future values. Therefore, the output temperature does not stay constant throughout the day.
If I could edit the triggers in the UI, I could remove the default ones and instead define a time range trigger that only allows updates in the first hour of the day.
Current workarounds
The triggers can be controlled by creating the sensor in the YAML, but then the sensor is not editable throughout the UI.
For the "Triggerable Template" feature, I have no workaround figured out yet.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions