Here is another example where I had to deal with a PULSAR PLUS WALLBOX made by the manufacturer WALLBOX.
At the end it is a slider transformation of a given sensor (by the integration) and the slider with a measurement everyone is familiar with as for example here kW versus Ampere

The Wallbox integration offers a sensor which allows you to adjust the max. charging current.
I can adjust the slider from 6 to 16 Ampere.
For us nerds MAYBE OK,
but NO ONE ELSE IN THE FAMILY really wants to deal with Ampere and Volts and the number of phases. I am already quite happy that they have learned what Watt and kW means and how much our devices are using and that the homestorage battery is limited to 3 kW.
Here you can see the slider / number provided by the manufacturers integration (BOTTOM HALF) and in the upper half is the kW slider all family members are familiar with.
The genuine Ampere slider is here visible only for demonstration purposes (and to check that it works properly).
Why is it important ?
The average user is not aware how to calculate from Ampere the charging speed in kW cause therefore you have to be aware on how many phases your car is charging cause not all EVs have a 3 phase onboard charger (the smaller the battery the less phases = rule of thumb).
While the first line is doing the calculation for what most people expect
3 phases x 230 V x 10 A = 6900 W
2 phases x 230 V x 10 A = 4600 W
the 2nd line is showing the calculation for 2 phases, simple with 10A but gets challenging.
Hence this solution which offers a kW slider instead which is based on an inputnumber helper and the number of phases used to charge the car.
Any difference between the kW inputnumber and the wallbox number (after the inputnumber in kw has been transformed into Ampere) will trigger the automation to change the settings of the charging current number in Ampere.
In this example we use it only as a 2 phase charger with our cars to have a better solarpower charging efficiency (less from the grid). If the setting in kW has been changed the automation will do the math and the trigger will kick in and change the Amper settings in 1 second.
Be aware to set the input number helper right cause in this case the Wallbox expects to get values from 6 to 16 A and nothing in between, therefore the SLIDER is king to avoid the mess a 2.777 kW figure typed in manually could cause.
So you have to do your math first which means for 2 phases:
6A x 230 V x 2 phases = 2760 Watt
I suggest to set the lowest input number to 2,76 kW instead of 2760 W which had caused issues for me in the dashboard (not all figures were visible).
Then there is a step size which can is based on 1A as lowest step and is calculated this way
1A x 230V x 2 phases = 460 Watt
You have to use 0,46 kW in the input helper configuration as you can see below.
And in this case all the settings will later match up with each other as you can see here in the last column with
2,76 kW matching 6 A
3,22 kW matching 7A
6 A * 2 * 230 = 2760 W = 2.76 kW ~ 6 A
7 A * 2 * 230 = 3220 W = 3.22 kW ~ 7 A
8 A * 2 * 230 = 3680 W = 3.68 kW ~ 8 A
9 A * 2 * 230 = 4140 W = 4.14 kW ~ 9 A
10 A * 2 * 230 = 4600 W = 4.60 kW ~ 10 A
11 A * 2 * 230 = 5060 W = 5.06 kW ~ 11 A
12 A * 2 * 230 = 5520 W = 5.52 kW ~ 12 A
13 A * 2 * 230 = 5980 W = 6.98 kW ~ 13 A
14 A * 2 * 230 = 6440 W = 6.44 kW ~ 14 A
15 A * 2 * 230 = 6900 W = 6.90 kW ~ 15 A
16 A * 2 * 230 = 7360 W = 7.40 kW ~ 16 A
Here ist the automation
alias: WALLBOX - set charging current
description: calculate from the kW inputnumber the Ampere first and then set that as the max WALLBOX charging current
triggers:
- trigger: template
value_template: >-
{{ ( states('input_number.wallbox_charging_kw_max') | float () * 1000 / 2
/ 230 - states('number.wallbox_pulsarplus_161183_max_chargecurrent') |
float () ) != 0 }}
conditions: []
actions:
- target:
entity_id: number.wallbox_pulsarplus_161183_max_chargecurrent
data:
value: >-
{{ states('input_number.wallbox_charging_kw_max') | float () * 1000 / 2
/ 230 }}
action: number.set_value
mode: single
This works like a charm. All the unnecessary things I had to explain before are now hidden

as you can see here
