I have a few templates with calculating hours and costs from history stats.
Is there a way of creating a parameter for the month value and passing in a value from the HA lovecard (drop-down or datepicker for example)?
How would I achieve this? It is the month= that I would like to pass a value into to change it when needed after each month rolls over or whenever needed. Date range is when the electricity meters are read.
Dates are currently hard coded under the sensor yaml.
I’m implemented this and restarted but changing the input numbers from a new entity on lovelace doesn’t change anything. Do I need to restart HA each time I change one of the input numbers to pass in the new value?
works if I simulate it in templates (developor tools) but no not dynamically.
Possibly needs a bit more work, perhaps some kind of reload script on state change (nodered maybe).
Any pointers?
Only by restarting HA does the input number update the current template with the new value. Maybe the template needs moving out of sensors and placing in another yaml than can be reloaded on a trigger state change