Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielolsson100/a2eac19e8ed97447c3742f12814d1c3b to your computer and use it in GitHub Desktop.
Save danielolsson100/a2eac19e8ed97447c3742f12814d1c3b to your computer and use it in GitHub Desktop.
Ferroamp and Easee
alias: Ferroamp > HA > Easee => Grid Equlizer
description: ""
trigger:
- platform: state
entity_id:
- sensor.ferroamp_grid_current
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.easee_dynamic_charger_limit
above: 0
- condition: or
conditions:
- condition: state
entity_id: sensor.easee_status
state: charging
- condition: state
entity_id: sensor.easee_reason_for_no_current
state: max_dynamic_circuit_current_too_low
action:
- if:
- condition: and
conditions:
- condition: numeric_state
entity_id: input_number.battery_sts_code
above: 0
below: 2
- condition: numeric_state
entity_id: sensor.ferroamp_esm_19440006_state_of_charge
below: 90
then:
- service: easee.set_circuit_dynamic_limit
data:
device_id: b40f1f45d28b0891fe8d
currentP1: >-
{{((45 - states('sensor.ferroamp_grid_current')|float) / 3) |
round(0,'floor') + states('sensor.easee_circuit_current')|int}}
else:
- service: easee.set_circuit_dynamic_limit
data:
device_id: b40f1f45d28b0891fe8d
currentP1: >-
{{((48 - states('sensor.ferroamp_grid_current')|float) / 3) |
round(0,'floor') + states('sensor.easee_circuit_current')|int}}
mode: single
alias: Easee => Default charge level
description: ""
trigger:
- platform: state
entity_id:
- sensor.easee_status
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.easee_status
state: charging
- condition: state
entity_id: sensor.easee_reason_for_no_current
state: max_dynamic_circuit_current_too_low
action:
- service: easee.set_circuit_dynamic_limit
data:
device_id: b40f1f45d28b0891fe8d
currentP1: 10
mode: single
@danielolsson100
Copy link
Author

This requires HomeAssistant custom integrations for Ferroamp / Easee to load balance the max available current to the Easee charger every 30s without the use if Tibber pulse / Equlizer / Watty etc for a more optimized charging experience for your home.

Add these 2 automations above as separate automations
I use the entity "input_number.battery_sts_code" and set it to 1 when I charge the Ferroamp battery as a status flag.
I limit the max current to 45A (16A*3 as my normal max) If the Ferroamp battery is charging with 2000W to allow the house battery to change at the same time during charging of my Eletric car.
And when the Ferroamp battery charging is finished then I release all available current to the Easee charger.
You can find your "device_id" value by accessing http://homeassistant.local:8123/developer-tools/service
Type in the Service "Easee EV Charger: Set charging cost"
and add your charger using the GUI and then look into the created yaml code to see your device_id for your Easee charger.

The second automations set the Easee charger to a charge level that is safe, in my case 10A as a precaution if the HA isn't online the next time the charger starts to minimize the risk of a burned burn fuse.

My Ferroamp system has ACE set to 15A to balance the phases the last current even to the phases because my Kia EV6 don't seems to like different currents on the phases when charging.

As always. Use this code at your own risk and don't blame me if things go bad :)

@Fladric
Copy link

Fladric commented Apr 5, 2023

Thanks alot, using it with Ferroamp and Easee. I used the power for one of my ESO:s to control if the battery is charging, set it to be above 200 W of charging before lowering the charge amp to the Easee box.
Works good so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment