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

I have checked there is no Sensors section in my configuration.yaml file, should i add add the section then create a sensors.yaml file with the required sections in?

Yes once you add it, follow 4,5,6 to make sure its right.

one other QQ - adding the Sensor line in the configuration.yaml file will not effect the other sensors i have will it?

All we are doing here is making reference to a file, then having all our sensor in that one referenced file.

But if you are comfortable in editing your configuration.yaml file directly then you don’t need to create the reference or the file. Just add your new sensor to the configuration.yaml

Spencer,

If you look at the code and read that original post I linked, all we are doing is taking your kW sensor and making separate new sensor for our application, which will be in W. All your original kW sensors will remain the same. HTH

getting an error when running the Configuration test from Dev tools

Here is my sensor.yaml file
Screenshot 2023-06-18 at 12.02.44
I think its just a syntax issue but cant be sure the sensors I’m referencing are the correct entity names.

seems to be working now didn’t like the Capitals i had used.

You have to use it exactly as the sensor shows and dont change anything.

Good to see you have it all working. How is the PV script working?

still not firing, i have even tried pulling down the Amps required for the appliance down to 3 amps

Here is the log file

@spencerralph please read the logs, they state that your PV excess of ~1600W is not high enough to switch on the appliance.

Which means you have specified a typical current of more than 1600/240=6.6A (in case of an one-phase, non-dynamic appliance) for your appliance. If you changed that, you probably forgot to re-execute the automation.

i did take it down to 3amps however you may be right about re running script, so have now restarted HA. but cloud has stopped play, may have to wait until tomorrow for more testing.

Thanks for all your support.

Once i have it running the next this will be to look at a automation that will switch on the water heater over night and disable the automation for the PV excess then switches off the water heater and re enables the PV Excess.

Its all good learning experience…

Does the Script run in Hass 2023.6 with Python 3.11?
Or are there any issues?

This is my setup and runs fine.
Home Assistant 2023.6.2
Supervisor 2023.06.2
Operating System 10.2
Frontend 20230608.0 - latest

Python 3.11.3

1 Like

Spencer,

Good to see your progress.

Are you experiencing the same thing where if you make changes to the script, save and run it, pyscript stops running and you have to restart HA?

Thank you @redbak

PV Excess Automation seem to be working now, although the weather in the UK is not helping with testing this week. I’ve also set up automations to switch the water heater on and off, is there a way to enable and disable the PV excess automation from the automation that i use to switch the water heater on and off. I’ve looked through the automation settings and cant seem to find a setting to enable and disable.

Yep - you can do it through the GUI …

Or in YAML :

action:
  - service: automation.turn_off
    data:
      stop_actions: true
    target:
      entity_id: automation.pv_car_charger

…and to turn it back on :

This is what I ended up doing when for i g the water heater on overnight :+1:

Thanks just need to wait for some sun to see how it all works…

Hi, i have a quick question:
I have a 3-phase Water Heater where I can control each phase via a shelly Relay.
Should I select the 3 phase integration or 3 times one phase integration to heat with excess solar power ?