Just developed something better:
A simple automation that controls the Wallbox charger max current setting up and down (between 6 and 32 A), maintaining the grid power around zero, to use excess solar power only.
The automation increases the max current with 1 A if the grid power is below limit 1, and decreases the max current with 1A if the grid power is above limit 2. Between the limits the max current is left alone.
I have the limit 1 set to -250 W, and the limit 2 set to 250 W. Of course this can easily be changed to other values.
I run the automation every 12 seconds, so a full sweep from 6 to 32 A would take a bit more than 5 minutes. This tames the controller. Again an actual update of the max current setting to Wallbox is only done every 30 seconds by the API. The 12 seconds value can be changes easily.
Nothing is required in the config file.
I hope I did not speak too soon. I cannot test actually charging a car because no sun on the panels anymore today
The automation:
- id: '1654960233260'
alias: WALLBOX - Charge current controller
description: Controls the Wallbox charger max current setting up and down (between
6 and 32 A), maintaining the grid power around zero, to use excess solar power
only.
trigger:
- platform: time_pattern
seconds: /12
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.actual_power
below: '-250'
sequence:
- service: number.set_value
data:
value: '{{ [((states(''number.wallbox_portal_max_charging_current'') | float(0)
+ 1.0) | round(0)), 32] | min }}'
target:
entity_id: number.wallbox_portal_max_charging_current
- conditions:
- condition: numeric_state
entity_id: sensor.actual_power
above: '250'
sequence:
- service: number.set_value
data:
value: '{{ [((states(''number.wallbox_portal_max_charging_current'') | float(0)
- 1.0) | round(0)), 6] | max }}'
target:
entity_id: number.wallbox_portal_max_charging_current
mode: single
Teaser:
Quick update:
Started testing with first sun on the panels this morning. The controller works like a charm. Will post some traces later.
The HA dashboard with charge mode setting is also taking shape. The principle works.
There is just one problem: it works. After me playing around last night, I left it in âEcoâ mode. My son came home late at night and connected a car expecting it to be fully charged early in the morning. But it only charged at 6A (eco mode), the car was not fully charged this morning. This function has itâs risks.
Traces as promised:
The controller doing itâs thing for the last 2 hours. The big dip to 6A is where the washing machine started (heating up the water), the smaller dip to 9A before that is the wifeâs hairdryer.
@hesselonline
Small thing here. Not a bug, but an enhancement request. The link to GitHub you posted is for bugs only !?
The number ânumber.wallbox_portal_max_charging_currentâ does not have a unit of measurement assigned by the integration, should be âAâ.
PS
Apologies for the long message with different issues. I canât post more than 3 consecutive messages. Interesting limitation âŚ