Automation - Add 5 to 2 to Entities

Hi All,

I have an idea but I’m just unsure how to deploy it.

I have my solar inverters x2 into HA and I can do simple automation. ie when sun is up reduce battery max charge to 25. This is because we have an export limit of 4.7 kWh. So I try and make it so instead of more power at one time send power for longer.
This is working but I want to tweak it.

Say if my export is at 3000w for 5mins I then want to add 5 amp to each inverter max charge. I’m trying to get the most of the system without being throttled.

The problem I have is I just can not work out how to add 5 to the both entities up to a max of 85.

Can anyone help
Many thanks
Rob

Can anyone help??

post the code you have. easier to understand the question and help modifying existing code.

Here is the Code I have:

alias: Solar-IncreaseBatMaxCharge
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.deye_sunsynk_sol_ark_x_2_grid_power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 2000
condition:
  - condition: numeric_state
    entity_id: number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current
    below: 85
action:
  - service: number.set_value
    target:
      entity_id: number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current
    data:
      value: {{ states('input_number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current')}}

ok, i’m probably misunderstanding your question but is this what you mean?

alias: Solar-IncreaseBatMaxCharge
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.deye_sunsynk_sol_ark_x_2_grid_power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 2000
condition:
  - condition: numeric_state
    entity_id: number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current
    below: 80
action:
  - service: number.set_value
    target:
      entity_id: number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current
    data:
      value: "{{ states('number.deye_sunsynk_sol_ark_x_2_inverter_1_max_charge_current') | int + 5}}"

if not, put pseudocode into the code where you want it to do something different.

by the way, when you respond, if you want a faster response, hit reply on my post, don’t hit blue reply on the bottom of the thread. replying to someone’s post will notify them that they have a reply. replying on the thread won’t…