I come at this a little differently.
I use just one charge slot, it's 00:00 to 23:59. Combined with four automations and a helper. The bottlecap dave integration gives you a target entity, change the values in that entity based on the forecast tomorrow. Have the inverter set to charge when the target entity switches on. Determine if it actually charges or not based on the battery SOC target. Plus a side piece to charge if the rate is effectively free.
Helper:
Threshold. If current Agile rate is below a threshold then switch on the helper. My threshold is 1p.
binary_sensor.cheap_electricity_rate

Automation 1:
If the cheap rate helper threshold switch is on then set the battery SOC to 100% and charge. Ignore anything else, the rate is so low I don't care if I need it or not.
alias: "Automation: Cheap Rate Charge"
description: ""
trigger:
- platform: time_pattern
minutes: /30
- platform: state
entity_id:
- binary_sensor.cheap_electricity_rate
condition: []
action:
- if:
- condition: and
conditions:
- condition: template
value_template: >
{{ 'AGILE' in
state_attr('sensor.octopus_energy_electricity_***_***_current_rate',
'tariff') }} # replace with Octopus import current rate entity
- condition: state
entity_id: binary_sensor.cheap_electricity_rate
state: "on"
then:
- device_id: 58aea2749b18c9e79de484f5e61b64f5 # Replace with GIVTCP Inverter
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4 # Replace with GIVTCP SOC Target Entity
type: set_value
value: 100
- service: switch.turn_on
data: {}
target:
entity_id: switch.givtcp_****_enable_charge_schedule #replace with relevant GIVTCP entity
- service: notify.mobile_app_jpl_iphone13
data:
title: Battery Charging
message: Rate Below Target
else:
- if:
- condition: state
entity_id: binary_sensor.octopus_energy_target_dynamic_import
state: "off"
- condition: state
entity_id: switch.givtcp_****_enable_charge_schedule #Replace with relevant GIVTCP entity
state: "on"
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.givtcp_****_enable_charge_schedule #replace with relevant GIVTCP entity
mode: single
Automation 2:
Switch on Enable Charge Schedule when BottleCap Dave Target entity switches on.
alias: "Automation: Inverter Dynamic Charge - Enable"
description: Enable Inverter Timed Charge Based on Target Import Rate
trigger:
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_dynamic_import #rename to the bottlecap dave target entity
from: "off"
to: "on"
condition: []
action: # sets battery charge/import rate to maximum
- device_id: 58aea2749b18c9e79de484f5e61b64f5
domain: number
entity_id: 3a48dd6829849544d2571334ec5a30d8
type: set_value
value: 3600
- service: switch.turn_on
data: {}
target:
entity_id: switch.givtcp_*****_enable_charge_schedule # replace with your enable charge schedule entity
mode: single
Automation 3:
Switch Off Enable Charge Schedule when BottleCap Dave Target entity switches off or cheap rate entity threshold switches to off. Some loop to avoid they conflict.
alias: "Automation: Inverter Dynamic Charge - Disable"
description: Rate Based Charge Switch Off
trigger:
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_dynamic_import
from: "on"
to: "off"
- platform: state
entity_id:
- binary_sensor.cheap_electricity_rate
from: "on"
to: "off"
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.cheap_electricity_rate
state: "off"
- condition: state
entity_id: binary_sensor.octopus_energy_target_dynamic_import #rename
state: "off"
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.givtcp_***_enable_charge_schedule
mode: single
Automation 4:
Set the battery SOC % and the number of charge hours based on the Solcast forecast for tomorrow. This is very subjective, the above and below numbers, the SOC charge % and the hours charge required are all based on my consumption and GIV hardware.
Simply, poor forecast, find 5 hours and charge the batteries to 90%, OK forecast 3 hours and 55%, Good forecast, 1.5 hours and 20%, Amazing forecast, .5 hours and 10%. With a little check in the morning to top up if the SOC is low before midday.
alias: Automation - Agile Charge
description: ""
trigger:
- platform: time_pattern
minutes: /30
condition:
- condition: time
after: "08:30:00"
before: "22:30:00"
- condition: template
value_template: >
{{ 'AGILE' in
state_attr('sensor.octopus_energy_electricity_***_***_current_rate',
'tariff') }} # replace with Octopus import current rate entity
action:
- if:
- condition: or
conditions:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.givtcp_***_soc # replace with relevant GivTCP SOC entity.
below: 30
- condition: time
after: "00:00:00"
before: "12:00:00"
- type: is_energy
condition: device
device_id: de0cdb51f56ffd273500fdc038cc63d1 # replace with Solcast entity
entity_id: fd3daddb661ab6011a6c177909ef660a # replace with Solcast forecast remaining today entity
domain: sensor
below: 9
alias: Low Daytime Charge and Solar Forecasted
then:
- service: octopus_energy.update_target_config
data:
target_start_time: "08:30"
target_end_time: "16:00"
target_hours: "3"
target:
entity_id:
- binary_sensor.octopus_energy_target_dynamic_import # replace with name of your Octopus target entity
- device_id: 58aea2749b18c9e79de484f5e61b64f5 # replace with GivTCP inverter
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4 # replace with GivTCP SOC Target Entity
type: set_value
value: 70
else:
- if:
- condition: or
conditions:
- condition: and
conditions:
- condition: time
after: "18:30:00"
before: "22:30:00"
- type: is_energy
condition: device
device_id: de0cdb51f56ffd273500fdc038cc63d1
entity_id: 58e026d0819e0fd33ccfc6dfe314e52e
domain: sensor
below: 9
alias: Low Solar Forecast
then:
- service: octopus_energy.update_target_config
data:
target_start_time: "22:30"
target_end_time: "16:00"
target_hours: "5"
target:
entity_id: binary_sensor.octopus_energy_target_dynamic_import
- device_id: 58aea2749b18c9e79de484f5e61b64f5
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4
type: set_value
value: 90
else:
- if:
- condition: or
conditions:
- condition: and
conditions:
- condition: time
after: "18:30:00"
before: "22:30:00"
- type: is_energy
condition: device
device_id: de0cdb51f56ffd273500fdc038cc63d1
entity_id: 58e026d0819e0fd33ccfc6dfe314e52e
domain: sensor
above: 9
below: 16
then:
- service: octopus_energy.update_target_config
data:
target_hours: "2"
target_start_time: "22:30"
target_end_time: "16:00"
target:
entity_id: binary_sensor.octopus_energy_target_dynamic_import
- device_id: 58aea2749b18c9e79de484f5e61b64f5
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4
type: set_value
value: 55
else:
- if:
- condition: or
conditions:
- condition: and
conditions:
- condition: time
after: "18:30:00"
before: "22:30:00"
- type: is_energy
condition: device
device_id: de0cdb51f56ffd273500fdc038cc63d1
entity_id: 58e026d0819e0fd33ccfc6dfe314e52e
domain: sensor
above: 16
below: 25
then:
- service: octopus_energy.update_target_config
data:
target_start_time: "22:30"
target_end_time: "09:00"
target_hours: "1.5"
target:
entity_id:
- binary_sensor.octopus_energy_target_dynamic_import
- device_id: 58aea2749b18c9e79de484f5e61b64f5
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4
type: set_value
value: 20
alias: High Solar Forecast
else:
- if:
- condition: or
conditions:
- condition: and
conditions:
- condition: time
after: "18:30:00"
before: "22:30:00"
- type: is_energy
condition: device
device_id: de0cdb51f56ffd273500fdc038cc63d1
entity_id: 58e026d0819e0fd33ccfc6dfe314e52e
domain: sensor
above: 25
then:
- service: octopus_energy.update_target_config
data:
target_end_time: "09:00"
target_start_time: "22:30"
target_hours: "1"
target:
entity_id: binary_sensor.octopus_energy_target_dynamic_import
- device_id: 58aea2749b18c9e79de484f5e61b64f5
domain: number
entity_id: 16c460fc885f7183afbed96ec5c21ff4
type: set_value
value: 10
alias: Very High Solar Forecast
else: []
alias: Medium Solar Forecast
mode: single