Help by creating an automation for using Solar excess electricity

First of all, Im not sure if Im translating this correct. In further I call it SolarPower which means (in my world) energy that is going to the electric grid from my solarsystem.

Im kinda new to HomeAssist and I managed to add my SolarEdge Inverter and the elctric meter via Modbus TCP into my HomeAssistant.
Needs some time to track data, but on a first look every values seem to be correct.
I set the modbus update intervall to 10 seconds (wasnt sure what to take here).

Now I want to turn Fritz Plugs (Fritz Dect 210) on, when I have enough Solar Power.
And later on (if I manage to get my Wallbox into HomeAssist) load my car (PHEV only) with Solar Power.
Im not sure how to set up this automation to make it being good.
Ive got the sensor sensor.solaredge_m1_ac_power. This tells me if I get my electricity from the grid (positive values) or if I export it to the grid (negative values). (Hope its correct that way (i.e. for energy dashboard))

For example letz say I have 2 plugs. P1 manages a device with 1200Watt, P2 manages 500W.
If I have enough power, I want to turn on P1 first and if there is enough power left, turn P2 on.
I could now start an automasation and check this ac power sensor,. On every change I check if the value is bigger than 0 (else turn all off).
If bigger 0 i check if P1 and/or P2 are running and do nothing.
If they are not running I turn on P1 If the sensors value is bigger than 1700W (P1+P2) I turn on P2.

This should work, but obviously its kinda hard to add more plugs or my car, so this automatisation cant be good…

Can you give me a nicer way to do this? (dont forget Im willing to learn, but absolutely nooby)

Hi,
I recently developed a blueprint+pyscript tool which should be able to do what you want. You can check it out: PV / Solar Excess Optimizer: Auto-control appliances (wallbox, dish washer, heatpump, ...) based on excess solar power

Thanks a lot. This sounds awseome!
But I got three questions.

  1. In the Prerequisites you say I need the " *Load Power" Value from my inverter. What is this?
    (I dont have got a battery)

  2. “Supports dynamic current control (e.g. for wallboxes)” means I can say if I have PV excess of 1000W - load my car with 1000W? If I have 3600W - load my car with 3600W and if its more start the other devices? Is it possible here to set a delay? So the walbox doesnt turn on and off all the time if its cloudy?

  3. Are you still working on this project and interested in bugs and/or feature requests?

@TheSmurf Hi there, please tag me or reply in the PV excess thread, otherwise I will not get notified about your comments :smile:
I also suggest to continue the discussion in my thread so that I can keep track of feedback better. I wrote an answer to your questions here:

Is there any news on this? I’m searching exactly for the same thing, I’m also willing to contribute code (I already wrote an integration for HA).

My main problem is the Frontend: How (technically) to create a nice, e.g., dashboard for such a thing? Is there any developer documentation on that?

Hi

Does this need a python board or stand-alone?

I’m looking for something to control TYUA devices direct from HA and dont think i need an external python device.

I’m new so still trying to understand HA…

Im looking for something:

Battery >90%

Solar - above 500watts to switch on and off heaters to ‘consume’ excess but maintain positive battery charging to avoid small cycles.

A range of heaters such as

1x 450w, 2x 750w 1200 and 1600w.

I am hoping to mix and match the best fit so should Solar be 1700w then put on the 1200w and 450w instead of incremental adding smallest first.

As Surplus rises:

500w
450w on- 750 off- 750w off- 1200w off- 1600w on

1000w
450w off- 750 on- 750w off- 1200w off- 1600w 9ff

1200w
450w on- 750 on- 750w off- 1200w off- 1600w off

1500w
450w off- 750 off 750w off- 1200w off- 1600w off

1600w
450w off- 750 off- 750w off- 1200w off- 1600w on

2300w
450w- on- 750 off- 750w off- 1200w off- 1600w on

Basically, rather than simply stepping up loads, to dynamically match the highest loads down from the highest with smaller loads filling in.

I think it will need a script but new and learning. Also need a Cloudy reset of ideally a step down to maintain ‘best fit’.

With your script mentioning python, not sure if i just need native control as sockets and sensors are all registered with the server box so self contained.

Any thoughts?

Hi. I am also new to HA. I cant make any automation to work when solar production is above/below a value.
I have a fronius inverter. It is added to the integration and all entities are enabled.
I used the UI to create an automation. Anything and any entity i have tried, the result is the same. If i manually run it, it works and in traces i see nothing usefull.
If i set a light to switch on when energy producesd is above 200, it will not happen. If i manually select run, it will switch on regardless if there is solar production or not. If i set the value to below 200 (or any value) it happens exactly the same.
I have the green HA and it is updated.
This is an example:

Id: '1729271913811'
alias: '2'
description: ''
triggers:
  - type: value
    device_id: e0127fb2c0800133de61ab097beee5c4
    entity_id: b0491bf6d07c0c7feaeb6d682c98441d
    domain: sensor
    trigger: device
    below: 200
conditions: []
actions:
  - type: turn_on
    device_id: a1fa48f2e7b692a85490e91cc8c46641
    entity_id: e0206606e46159d3bfa540bf25a6cb4b
    domain: light
mode: single