Hi,
my car can set the maximum State of Charge to a value between 50% and 100% (in 10% increments). I did implement this like below.
Works fine, does what is supposed to do.
The only niggle I have is aesthetic: The resulting slider in the front end starts at 50% (the lowest possible SoC that can be set), and ends at 100%. Which results that if I select 50% maxSoC, the slider is not in the middle, but at the most left spot.
What I am looking for: A slider that starts at 0%, but the lowest value that can be selected is 50%.
Is there a way to implement this?
My template implementation:
template:
number:
- name: "Maximum Charge"
unique_id: aa52703f-11e4-4a49-a867-d59fee70508f
state: "{{ states('sensor.maxSoC')|int(0) }}"
icon: mdi:battery
unit_of_measurement: "%"
min: 50
max: 100
step: 10
set_value:
action: some.action
data:
max_soc: "{{ value | int(0) }}"