Hi All,
I have a Fronius Symo GEN24 solar inverter with a BYD HVM 13.8kWh battery box connected.
Modbus over TCP is setup and the new entities are now present in HA.
What I am trying to achieve is an automation which will work as follows:
At 7h00 check battery status. If less than 25% then charge at 2.5kW until it reaches 25% OR time is 8h00. After that stop and set the inverter back to its original state.
With help from ChatGPT it came up with the automation below, the automation triggers and from the ‘trace’ all seems to be setting the inverter but it doesn’t start to charge.
- alias: "Morning battery grid charge"
description: >
If battery SOC is below 25% at 07:00, charge from the grid at up to
2.5 kW until 25% SOC or 08:00, then restore normal operation.
triggers:
- trigger: time
at: "07:00:00"
conditions:
- condition: numeric_state
entity_id: sensor.byd_battery_box_premium_hv_state_of_charge
below: 25
actions:
# 2.5 kW = 25% of the assumed 10 kW maximum charging power.
- action: number.set_value
target:
entity_id: number.gen24_battery_charge_power_limit
data:
value: 25
# Enable the charging power limit.
- action: switch.turn_on
target:
entity_id: switch.gen24_battery_charge_power_limiting
# Enable charging from the grid.
- action: switch.turn_on
target:
entity_id: switch.gen24_battery_grid_charging
# Wait until 25% SOC OR 08:00.
- wait_for_trigger:
- trigger: numeric_state
entity_id: sensor.byd_battery_box_premium_hv_state_of_charge
above: 24.99
- trigger: time
at: "08:00:00"
# Stop grid charging.
- action: switch.turn_off
target:
entity_id: switch.gen24_battery_grid_charging
# Disable the temporary charging power limit.
- action: switch.turn_off
target:
entity_id: switch.gen24_battery_charge_power_limiting
# Restore the charge power limit to 100%.
- action: number.set_value
target:
entity_id: number.gen24_battery_charge_power_limit
data:
value: 100
mode: single
The GEN24 Modbus TCP is setup to ‘Allow control’ and ‘Restrict control’ to the IP of the HA instance.
Could anyone help?
Thanks in advance,
John