How to automate force charge in Home Assistant
Been using Home Assistant (with Modbus integration) for a while now ... but with these "free" electricity sessions that Octopus are now providing, and where they have stated that EV/Solar people can also benefit (by plugging car in) ..... trying to automate my setup even further

Spotted in the Fox Modbus integration the below entities .. but I do not seem to be able to set these inside of Home Assistant. Example is when I click on "Enable Charge From Grid" .. I only get a status windows .. rather than an option to change .. therefore, do not seem to be able to automate switching this on and off

I have had to go into the FoxApp itself, and manually turn these on .. that then shows the change in HA ... but would like to do it all from HA iteself
charging.jpg
charging1.jpg
Re: How to automate force charge in Home Assistant
If you want to write an automation to switch the charge periods you should be able to use the integrations built in service - you can see that if you go to 'Developer Tools' click on 'Actions' and in the action box start to type foxess and select the entry for 'Update Charge Period', you select your inverter in the drop down list select the time period you want, set the switches and times and perform action and it should set the charge times. (Note your App may not show this for some time afterwards as it doesn't expect the inverter to be setting the times)

I use a couple of time helpers and a toggle to enable it, and have an automation that sets the second charge period to the free session time period and then when the period is over it clears the charge period.
Re: How to automate force charge in Home Assistant
Thanks Dave, that is really helpful and will investigate that. You mention that you set the session to the "free session time period" .. I spotted the "Octopus Free Electricity" entity .. but that just shws and On / Off ...... can you advise what entity shows the actual time slot?
Re: How to automate force charge in Home Assistant
albie999 wrote: Mon Sep 01, 2025 4:33 pm Thanks Dave, that is really helpful and will investigate that. You mention that you set the session to the "free session time period" .. I spotted the "Octopus Free Electricity" entity .. but that just shws and On / Off ...... can you advise what entity shows the actual time slot?
As far as I know for the free saving session there is no entity that does that (at least not yet) - there always was for the saving sessions but they haven't extended that to the free sessions so i've just created myself a couple of helpers for the times and switch it on when I have a confirmed time.
Re: How to automate force charge in Home Assistant
Perfect . thanks ... it was not just me being daft then :-)
Re: How to automate force charge in Home Assistant
Hi - now starting to get into the details of Fox and Modpus. I have the following

binary_sensor.octopus_energy_CUSTOMER REF_octoplus_free_electricity_session

current_event_start: null
current_event_end: null
current_event_duration_in_minutes: null
next_event_start: null
next_event_end: null
next_event_duration_in_minutes: null
icon: mdi:leaf
friendly_name: Octoplus Free Electricity (CUSTOMER REF)


I have created an automation when the event gets announced

alias: Octopus Saving Session Announced
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.octopus_energy_CUST ID_octoplus_saving_sessions
attribute: next_joined_event_start
conditions: []
actions:
- device_id: e19dc7017a19ae9a6db64bf222915e41
domain: mobile_app
type: notify
message: Saving Session Announced
title: Octopus Saving Session Announced

And a sesond one to alert me 10minutes before it starts.

alias: Octopus Free Session Starting
description: Notify just before a free session is starting
triggers:
- trigger: template
value_template: '{{ states.sensor.binary_sensor.octopus_energy_CUST ID_octoplus_free_electricity_session.attributes.current_event_start | as_timestamp
- timedelta(minutes=10) }}'
conditions: []
actions:
- device_id: e19dc7017a19ae9a6db64bf222915e41
domain: mobile_app
type: notify
message: Free Session starts in 10 mins
title: Octopus Free Session Starting
Hope this helps!
Post Reply