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

In case anyone’s following along, my code wasn’t quite right and would still give a positive result if energy was being imported. This one is correct (thanks ChatGPT!):

  - sensor:
    - name: "PowerwallExportPositiveOnly"
      unique_id: powerwall_power_total_positive_only
      unit_of_measurement: W
      state: >
          {% set power = states('sensor.my_home_site_power') | float %}
          {% if power < 0 %}
            {{ power | abs }}
          {% else %}
            0
          {% endif %}

One little bug in the way the blueprint works:

By default the “minimum home battery level” is set to 100 when you create a new automation based on this blueprint. This gives the impression that’s set as the default.

However if you check the generated YAML, it will only save a value if you adjust the slider to some non-100 value first (you can go back to 100 once you’ve done that if you want).

Just in case anyone else is wondering why the script is activating appliances when the battery isn’t charged!

I seem to have a question that has been asked a couple of times already.
Now, I have read through the entire thread but I am certainly not going to pretend to have understood half of it, so apologies if I just missed the answer.

I have set up everything following the instructions (I think).
I do not get any error messages but all my log shows it this:

“file_pv_excess_control_on_time has been triggered by time 2024-06-25 16:32:15.674412”

updated every 10 seconds.

I does not seem to be doing anything (in particular, adjust my charging power)

I do not see it read any sensors, so I am at a loss trying to figure out what it wrong. I have the sensors (PV Power, Load, Grid) on my dashboard. They seem to be fine (I have set up new sensors inverting the negative numbers for load and grid to positive numbers). But they just do not seem to be read by the script…

Any ideas? And apologies again if this has been answered and I just missed it.

1 Like

Yes, you’re right, it really is mentioned several times in this thread. I was also doing some research because my logbook is completely flooded. Especially if you have created several automations. Then it gets even worse.

I have tried it with different logger configurations and, of course, also took the default level into account. Without success.

The messages probably result from the PyScript. However, these are events and not log messages. Therefore, the research in the logger configuration should probably be irrelevant, right?

Oh, I just had an idea while writing this. I looked for the events in the event monitor. You cannot exclude them from the logbook, but you can extract them via the recorder.

The following works for me:

recorder:
  exclude:
    event_types:
      - pyscript_running

Hi, try to use a combined sensor if you have no battery - this does the trick for me…

Edit: AND check the identical names of the Automation and AutomationID.

This costs me a lot of try and error :see_no_evil:

prob have more luck with a post in English as per forum rules

I am pretty sure I have identical names for Automation ID and automation (three dots - > “information”).
What do you mean by “combined sensor”? A sensor that goes positive (power from grid) or negative (power to grid)? I seem to have all three (PV, house and grid (the latter being the negative sum of the former two, i.e. 500W PV and - 1000W house - house using 1000W - will give me a value of 500 for grid/1000W PV and - 500W house will give 500W grid)
So, the combined sensor in my case is grid, I guess?

Good evening, I’ve been using the blueprint for a few weeks now and would like to thank you for it! Many thanks to the developer! :sunglasses: But I have noticed that my battery is always charged to 100 or just before 100. Can’t you set this so that if 40 kWh is expected, as is the case today, the consumers will switch on in the morning so that the battery will only be charged later or at the same time and will only be at 100 at the set time. VG :hugs:

Yes, exactly.

Thanks. Done that. I do not see any changes, though. Still no sign in the logs that the script is getting any information from the sensors.
Just this every 10 seconds: file_pv_excess_control_on_time has been triggered by time 2024-06-26 07:48:17.821809

EDIT:
When I go to integrations - pyscript python pyscripting it says “no entities.”
Does this help?

UPDATE: Reinstalled python. I now have log entries… I’ll work from there and see what I can find…

1 Like

I am seeing the same as you… Many logbook entries…

"file_pv_excess_control_on_time has been triggered by time 2024-06-27T14:01:19.347915

2:01:19 PM - 24 seconds ago"

no action on automations.

Devices and Services: Pyscript Python scripting shows “1 entry” (pyscript) with “no devices or entities”…

So, your solution will be my solution…

It would seem that the automations are not calling pyscript. Something missing from ‘configuration.yaml’? I have there only

logger:
logs: custom_components.pyscript.file.pv_excess_control: debug

Yes, you are missing;

pyscript:
allow_all_imports: true

1 Like

As I wrote - for me, reinstalling everything did the trick (I guess). I now see something happening in my log file (home-assistant.log), but not in my log tab (is that what is is called?). Is that how it is supposed to be?
I do get quite a few error messages, though. I have not had the time to look at them properly, yet. It seemed to concern things I don’t use (solar forecast), so I am not too worried. Charger control is working - as in it is doing something. If it is doing the right thing, I still need to test.

1 Like

I get, among others that do not seem to be relevant, the following:

2024-06-29 11:20:24.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936]
2024-06-29 11:20:24.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936]
2024-06-29 11:20:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936, 1912]
2024-06-29 11:20:34.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936, 1912]
2024-06-29 11:20:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936, 1912, 1897]
2024-06-29 11:20:44.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936, 1912, 1897]
2024-06-29 11:20:54.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936, 1912, 1897, 1845]
2024-06-29 11:20:54.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936, 1912, 1897, 1845]
2024-06-29 11:21:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936, 1912, 1897, 1845, 1869]
2024-06-29 11:21:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936, 1912, 1897, 1845, 1869]
2024-06-29 11:21:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1936, 1912, 1897, 1845, 1869, 1842]
2024-06-29 11:21:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1936, 1912, 1897, 1845, 1869, 1842]
2024-06-29 11:21:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884]
2024-06-29 11:21:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884]
2024-06-29 11:21:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Minute call executed.
2024-06-29 11:21:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Home battery charge is sufficient (100/0.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated median excess power based on >> solar power - load power <<: 1884 W
2024-06-29 11:21:14.299 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Appliance is already switched on.
2024-06-29 11:21:14.299 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Median Excess Power (1884 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2024-06-29 11:21:24.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827]
2024-06-29 11:21:24.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827]
2024-06-29 11:21:33.758 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Registered appliance.
2024-06-29 11:21:33.758 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] Dict: {'automation.pv_charger_links': {'instance': <custom_components.pyscript.eval.PvExcessControl object at 0x7f5192b0e0>, 'priority': 99}}
2024-06-29 11:21:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827, 1714]
2024-06-29 11:21:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827, 1714]
2024-06-29 11:21:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827, 1714, 1694]
2024-06-29 11:21:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827, 1714, 1694]
2024-06-29 11:21:54.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827, 1714, 1694, 1729]
2024-06-29 11:21:54.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827, 1714, 1694, 1729]
2024-06-29 11:22:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827, 1714, 1694, 1729, 1646]
2024-06-29 11:22:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827, 1714, 1694, 1729, 1646]
2024-06-29 11:22:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1827, 1714, 1694, 1729, 1646, 1523]
2024-06-29 11:22:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1827, 1714, 1694, 1729, 1646, 1523]
2024-06-29 11:22:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689]
2024-06-29 11:22:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689]
2024-06-29 11:22:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Minute call executed.
2024-06-29 11:22:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Home battery charge is sufficient (100/0.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated median excess power based on >> solar power - load power <<: 1869 W
2024-06-29 11:22:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Appliance is already switched on.
2024-06-29 11:22:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Median Excess Power (1869 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2024-06-29 11:22:24.294 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684]
2024-06-29 11:22:24.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684]
2024-06-29 11:22:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684, 1679]
2024-06-29 11:22:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684, 1679]
2024-06-29 11:22:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684, 1679, -591]
2024-06-29 11:22:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684, 1679, -591]
2024-06-29 11:22:54.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684, 1679, -591, -642]
2024-06-29 11:22:54.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684, 1679, -591, -642]
2024-06-29 11:23:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684, 1679, -591, -642, -691]
2024-06-29 11:23:04.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684, 1679, -591, -642, -691]
2024-06-29 11:23:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [1684, 1679, -591, -642, -691, -776]
2024-06-29 11:23:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [1684, 1679, -591, -642, -691, -776]
2024-06-29 11:23:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689, 110]
2024-06-29 11:23:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689, 110]
2024-06-29 11:23:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Minute call executed.
2024-06-29 11:23:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Home battery charge is sufficient (100/0.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated median excess power based on >> solar power - load power <<: 1689 W
2024-06-29 11:23:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Appliance is already switched on.
2024-06-29 11:23:14.299 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Median Excess Power (1689 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2024-06-29 11:23:24.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792]
2024-06-29 11:23:24.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792]
2024-06-29 11:23:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792, -907]
2024-06-29 11:23:34.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792, -907]
2024-06-29 11:23:44.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792, -907, -997]
2024-06-29 11:23:44.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792, -907, -997]
2024-06-29 11:23:54.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792, -907, -997, -1135]
2024-06-29 11:23:54.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792, -907, -997, -1135]
2024-06-29 11:24:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792, -907, -997, -1135, -641]
2024-06-29 11:24:04.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792, -907, -997, -1135, -641]
2024-06-29 11:24:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History Buffer: [-792, -907, -997, -1135, -641, -750]
2024-06-29 11:24:14.295 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History Buffer: [-792, -907, -997, -1135, -641, -750]
2024-06-29 11:24:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689, 110, -870]
2024-06-29 11:24:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 916, 984, 1003, 992, 917, 926, 686, 306, 1923, 1939, 1978, 2019, 1977, 1961, 1926, 1869, 1884, 1689, 110, -870]
2024-06-29 11:24:14.296 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Minute call executed.
2024-06-29 11:24:14.297 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Home battery charge is sufficient (100/0.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated median excess power based on >> solar power - load power <<: 110 W
2024-06-29 11:24:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Appliance is already switched on.
2024-06-29 11:24:14.298 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.wallbox_pulsarplus_links_pause_fortsetzen (Prio 99)] Median Excess Power (110 W) is still greater than minimum excess power (-10 W) - Doing nothing.

I does not seem to be doing anything about the charging amps despite there being about 2 kW excess power…

So your log shows correct values…
Everything is fine now? :sunglasses:

I have not had time to really test it - first, the car’s batteries were already full; then there was not enough sunshine…
As I wrote, during the rather short period I did charge the car, I did not see any automatic change in the charging amps. Looking at the weather forecast this week, I don’t think I’ll get a chance of trying again for a while…

EDIT:
Seems to be working fine. Is there any way to make it a bit less sensible when there are intermittent clouds? Where I adjust the period after which it turns off the charger when there is not enough PV excess power?

Hey,
thanks for this nice way of optimizing!
There is no way to put directly conditions except on solar production excess…
So just to confirm : I have an electric heater that I want to start only if I have excess but if we are in winter and below X degrees… I need to either activate or not the automation based on that condition… Or a function triggered by the switch (dummy) of the automation who is verifying additional condition before allowing the real switch to be on…
I think the first is the more efficient…
Correct?

My second question : If i want to allow charging my car, even if i’m not producing enough? can I bypass that with a % of excess minimal?

thanks!

Hi everyone. I have done an automation for wallcharger (Easee) in order to charge my car with PV excess. I have got the automation run and I can see it in the logger. But, I can’t see the automation affects dynamic charger limit. The charger current changes but not follow the changes of the PV excess. Here is the yaml:

alias: INVENTOCASA - PV Excess Optimizer - Car Charge
description: ""
use_blueprint:
  path: InventoCasa/pv_excess_control.yaml
  input:
    automation_id: pv_excess_car_charging
    pv_power: sensor.solax_pv_power_total
    export_power: sensor.solax_grid_export
    load_power: sensor.solax_house_load
    home_battery_level: sensor.solax_battery_capacity
    min_home_battery_level: 50
    home_battery_capacity: 12
    appliance_switch: switch.easee_garage
    appliance_switch_interval: 1
    dynamic_current_appliance: true
    appliance_phases: 1
    defined_current: 10
    actual_power: sensor.easee_garage_power
    appliance_current_set_entity: sensor.easee_garage_dynamic_charger_limit
    appliance_priority: 1

EDIT: It works now, but changing of dynamic_charger_limit rarely happens. Is there some way to get excess check more often?

image
image

Heyhey
Im running pyscript 1.5.0 on my machine.
HACS tells me there is an update to v 1.6.1 available.
Did anyone test if the PV Excess controll still runs without issues on this version?

@Monster_D This did not work for me:

@aziwa I excluded pyscript from the logbook:

logbook:
  exclude:
    domains :
      - pyscript
1 Like