PV / Solar Excess Optimizer: Auto-control appliances (wallbox, dish washer, heatpump, ...) based on excess solar power

Thanx have done that paste in config
Can it be that I has the file in wrong folder ?

TBH it’s hard to tell without logs, etc…

Let’s go step by step…have you installed pyscript as per prerequisites (and how have you installed it)…and then can you see the service this Blueprint uses in Developer Tools > Services in HA

Hi i have pyton installed before i have putt the alow all in my config.yaml folder
have download the files and move them to pv-yaml to blueprints/automation
the .py to customcomponents/pyscript

i cant se it in devolopers tool

Probably I asked too difficulty.
My question is regarding load power. Is it only the imported energy from the grid or shall I add to it the internally used PV energy also? (The real load is the last option.)

Sorry that a am so noob
I find py under service. But something is wrong

so just to confirm then…you can see this (pic below) in your Developer Tools > Services
image

Looking at your most recent post it would appear that there is an issue with yaml indentation/spacing of the Blueprint (which seems odd)…have you edited this manually in yaml by any chance? Anyway I’d just download it again to reset/refresh…
To do this go to Settings > Automatons & Scenes and then Blueprints in there…find the blueprint and via the three dots/overflow menu choose reimport.

Once done you can go back and create your automations as per the instructions in post one of this thread…you can create your automation in the UI direct from the Blueprint which might be easier if you are not already doing this…good luck

Yes it look like that haven’t don anything to the yaml can only simple things in that;) can it be that I has it in wrong folder?

Hello all, new here so sorry if am asking dumb things. I have a heatpump with HA integration as well as a PV inverter with battery, also with integration in HA. Now I would like to let the HP run on solar excess, but the heatpump has no “on” entity in that sense that I can control, I think I have all input data ready with entities that are available directly from the devices, but on the output side I don’t have that “switch” entity that is needed by PV Excess control. I would need to set the heating temperature and/or hot water temperature to values higher-than-normal and later set them back to the previous values. I assume I could write a script that does this, but as a relatively new HA user it is unclear to me if and how I would use that script as the entity that is controlled by PV Excess control. Am I on the right track with writing a “heatpump boost script” that I can use as “switch” entity? Has anybody already done something like this ?
Thank you for answers and hints, JC

Thanks for the support
I reinstall it all and now it is up and running
My best thanks to you

1 Like

I would like to buy a wallbox that I can control steplessly. Does anyone have a recommendation which wallbox works with PV Excess?

thanks

Not a Tesla, unfortunately! Could you recommend any wallbox that seamlessly works with PV Excess?

e.g. is Tesla Wall Connector Gen 3 ok?

Thank you !

Same here. Did you find a solution?

Is it possible to have a sensor giving the results of the current excess calculation?

You create an input_boolean that is switched by the script, then an automation that sets the temperature based on whether that boolean is on or off. Works pretty well for my heat pump and bathroom thermostat.

If you want it to return to the previous settings (as opposed to a specific setting) then the automation can create a scene before changing the temperature, then call that scene to change it back. That’s what I do, thought I’m having reliability issues with the scenes that I’ve not quite solved yet.

1 Like

Greetings all, I am trying my best to configure this correctly but I am running into some issues. The error seems to be similar to what githuber110 encountered earlier, but in my scenario the Automation Entity ID seems to be correct and I am unable to identify the cause of the error.

Error:
This error originated from a custom integration.

Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/trigger.py:1268
integration: Pyscript Python scripting (documentation, issues)
First occurred: 10:38:12 (2096 occurrences)
Last logged: 16:27:22

Exception in <file.pv_excess_control.on_time> line 246: first_item = next(iter(PvExcessControl.instances.values())) ^ RuntimeError: coroutine raised StopIteration

Ok, so i reinstalled/configured everything just to run in the next error :weary:

Error:
This error originated from a custom integration.

Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/trigger.py:1268
integration: Pyscript Python scripting (documentation, issues)
First occurred: 11:18:25 (36 occurrences)
Last logged: 11:53:25

Exception in <file.pv_excess_control.on_time> line 15: domain = entity_id.split(‘.’)[0] ^ AttributeError: ‘NoneType’ object has no attribute ‘split’

hi i cant manage a problem have done a clean install done evrething bye ther book but still get the same error in studio code server
File ‘blueprints/automation/pv_excess_control.yaml’ could not be parsed, it was referenced from path ‘blueprints/automation/pv_excess_control.yaml’.This file will be ignored. Error(s):

  • YAMLSemanticError: Multi-line double-quoted string needs to be sufficiently indented
  • YAMLSemanticError: Multi-line double-quoted string needs to be sufficiently indented
  • YAMLSemanticError: Multi-line double-quoted string needs to be sufficiently indented
    • And 51 more errors…

is there somevone that have the same problem
thanx

hi,
anything known about using the script with HA 2024.4.1? Since the update getting multiple errors on a prior nicly running system:

2024-04-09 07:58:38.686 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2024-04-09 07:58:48.680 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] num=unknown is not a valid number between 0 and 1000000: could not convert string to float: 'unknown'
2024-04-09 07:58:48.681 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2024-04-09 07:58:48.685 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Exception in <file.pv_excess_control.on_time> line 433:
                export_avg = round(sum(PvExcessControl.export_history_buffer) / len(PvExcessControl.export_history_buffer))
                                                                                    ^
ZeroDivisionError: division by zero

any help is welcome.

1 Like

due to other issues moved back to 2024.3.1 … running again smoothly. many thanks to the authors.

1 Like