Hello all,
I am trying to implement a charge control automation for my wallbox.
I have scripts that will turn the wallbox on and off as well as switch the charge current to 6A, 8A, 10A, 12A and 16A (2.7kw up to 7.2kw)
I can also read my current power consumption (or production as I have solar panels installed) as a sum value ("-" would be net surplus power, β+β would be net additional consumption).
In order to automate the charge control, I have created several automations to adjust the charge current depending on the current surplus power in order to optimize utilization of the surplus produced by my solar panels.
Here is one example (created by the wizard) that automatically increases the charge to 8A if the total consumption is less than β-780β Watts for 10 seconds (which is the delta between 6A and 8A). Wallbox Status code 11 means βChargingβ.
alias: Auto_Wallbox_8A_up
description: Wallbox up 8A
trigger:
- platform: numeric_state
entity_id: sensor.consumption_total
for:
hours: 0
minutes: 0
seconds: 10
below: -780
condition:
- condition: state
entity_id: sensor.wallbox_status_code
state: "11"
- condition: numeric_state
entity_id: sensor.wallbox_current_l1
above: 5
below: 7
action:
- service: script.alfen_wallbox_limit_8a
data: {}
mode: single
Here an example that decreases the charge to 6A if the total consumption is more than 0 for 10 seconds and the wallbox is set to 8 (more precisely 7A and 9A):
alias: Auto_Wallbox_6A_down
description: Wallbox down to 6A
trigger:
- platform: numeric_state
entity_id: sensor.consumption_total
for:
hours: 0
minutes: 0
seconds: 10
above: 0
condition:
- condition: state
entity_id: sensor.wallbox_status_code
state: "11"
- condition: numeric_state
entity_id: sensor.wallbox_current_l1
above: 7
below: 9
action:
- service: script.alfen_wallbox_limit_6a
data: {}
mode: single
So basically I envision this to scale the charge up and down in steps if there is enough surplus or too much total consumption. (on 6A β 8A β 10A β 12A β 16A and 16A β 12A β 10A β 8A β 6A β off)
The problem with all of them is that the triggers sometimes do not work - I suspect that is because as soon as the sun goes away and e.g. the current charge is set to e.g. 10A and my total consumption value jumps to e.g. 2000, then it will trigger the next step to 8A after 10 seconds, reducing the total consumption to about 1200 which is >0 (so the next step should trigger), but since it never crosses the 0 threshold defined in the next step to 6A, it will never trigger.
Does anyone have an idea for a solution for this?