Hello all,
A puzzle I’m trying to solve which I could use some help with. I am coding a template sensor, and have it currently set so that the output has a minimum value of 0 and a maximum value of 9:
- sensor:
- name: "soc_required_charge_plus_boost"
unique_id: "soc_required_charge_plus_boost"
unit_of_measurement: 'kWh'
device_class: energy
state: "{{ [[states('sensor.soc_required_charge')| float(0) + states('input_number.boost_charge')|float(0) | round(2), 0.0 ] | max , 9.0 ] | min }}"
My question is - rather than having 9.0 as my maximum output value, is it possible to define this value using a separate input.number helper? So that the maximum output of this template sensor could be toggled by a user on-the-fly in the UI without changing any code?
Thank you in advance for your consideration
Jev