ok sorry a bit late to the party, for your FD soc i'd suggest doing it in another automation and keep it simple, it can be done in the same automation but you would have to write an if then, set trigger_id's and it wouldn't make it easy to follow.HughInDevon wrote: Sat Feb 08, 2025 9:42 pm Hi Dave,
I think I have cracked how to start forced discharging. I managed to do it via the UI after a bit of trial and error. So, my last remaining problem is how to stop the fd before the soc falls to 10%. Ideally I would like to stop it in the same automation when the Soc drops to say 15% but perhaps I need to use another automation to stop it? Any thoughts?
Regards, Hugh
If you do it in a separate automation 'FDSOC Control' it's a simple test, something like this -
Code: Select all
alias: FDSOC Control
description: "If in Force Discharge mode and SOC drops below 20, set work mode to Self Use"
triggers:
- trigger: numeric_state
entity_id:
- sensor.battery_soc
below: 20
conditions:
- condition: state
entity_id: select.work_mode
state: Force Discharge
actions:
- action: logbook.log
metadata: {}
data:
name: FDSOC Control
message: Less than set SOC, set back to Self Use
- action: select.select_option
metadata: {}
data:
option: Self Use
target:
entity_id: select.work_mode
mode: single
The only downside to this simple way is that it has to fall below what you set i.e. if you set 20, it will trigger at 19 - not a major issue but my ocd is trembling slightly.
The next condition is to check it actually in Force Discharge mode, and if it is then it will switch back to Self Use.