The Tesla’s battery is already full and while the charging current may still be set to a high value, the script will detect that the actual power consumption is 0 and therefore recognize that turning the car charging off will not have any effect on the total load power of your house, resulting in the dehumidifier being switched off
It could also be a bug, which could’ve been fixed in one of the latest updates of the script. If your version is older than ~2 weeks I suggest to update to the latest version.
To be certain, you could send me some debug logs. Either an excerpt of your home assistant logfile from the relevant time range were the suspected bug happened or your complete logfile together with the information about the problematic time frame. You can send me this also via private message, if the number of log messages is too much for pasting the contents here.
Small question
I need this load must be loaded once time daily, also if not enought power (cause need to refill water tank).
Do you think is possible setup also time frame something like from 11:00 to 14:00 (peak).
I suggest to not use Volt, Amp and Phases, when you can easy setup Watt and sensors give you Watt.
Then you can avoid this errors: defined_power = inst.defined_current * PvExcessControl.grid_voltage * inst.phases
when triphase is not anymore Watt = Amp x Volt but Watt = Amp x Volt x 1.73 (simple, real formula is more complex, that why take Watts)
Hello, someone can help me, I keep getting this information in the logs
Ten błąd pochodzi z niestandardowej integracji.
Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/eval.py:1901
Integration: Pyscript Python scripting (documentation, issues)
First occurred: 09:54:02 (4 occurrences)
Last logged: 09:56:00
num=unavailable is not a valid number between 0 and 1000000: could not convert string to float: 'unavailable'
Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Could not get state from entity automation.solarbojler: name 'automation.solarbojler' is not defined
Ten błąd pochodzi z niestandardowej integracji.
Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/eval.py:1901
Integration: Pyscript Python scripting (documentation, issues)
First occurred: 10:53:00 (3 occurrences)
Last logged: 11:12:00
Could not get state from entity automation.solarbojler: name 'automation.solarbojler' is not defined
Who can help me with this Blueprint. I‘ve a mini PV System without Batterie. I would like switch on by water heater in the kitchen when PV Power is Excessed. Today the sun is shining a the PV system is generating more power then I consume but the water heater switch (Homematic IP) does not Switche on. What did I wrong?
@bbday thanks for the screenshot, probably makes sense to implement such a functionality. On the github repository, there is already a feature request for a min. runtime implementation. Can you add the screenshot from your inverter there? This will give me some ideas when I start to implement the feature.
That message is not related to your problem and will only appear during startup, when the array is not full yet.
Please provide an excerpt of the relevant time frame from your home assistant logfile. You can find instructions in the Home Assistant docs / googling “how to view home assistant logfile” etc.
My battery is currently at 99% and my remaining solar production is around 7kWh…
I have three automations in prority 1 to 3 and none have triggered today.
I just deleted and recreated them and mannually ran the automations to register them with the script and all that shows in my logs after 30 mins is this:
2023-05-04 12:37:32.893 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.dish_washer_start (Prio 3)] Registered appliance.
2023-05-04 12:37:34.314 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.tumble_dryer_on_off (Prio 1)] Registered appliance.
2023-05-04 12:37:36.347 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.washing_machine_start (Prio 2)] Registered appliance.
We have to put our appliances into remote mode before they will respond to HA turning them on. Until we do that the switch does nothing. Is it possbile the script is turning on my applainces before they are ready?
What I’ve found is I have to do a reboot of HA to get this to work after running an updated blueprint. Anytime I do an update/refresh it just stops running. I can still see newly run blueprints in the debug but no other information. Would imagine its a bug within the code somewhere that isnt showing in debug logs.
@AaronIsFab I suspect something with pyscript itself, which is something I cannot “fix” but could probably find a workaround for, once the root cause is known.
Can you describe that further, what do you mean by “Anytime I do an update/refresh it just stops running”?
So if I update anything on the automation (Appliance On/Off switch interval as an example), save it, then run it to send it to the pyscript bit. I see the Registered appliance message in debug. Then its just literally nothing happens from there. No logbook entries, no debug messages in .log. I can see further “Appliance Registered” in .log if I run another automation but it never triggers the actual checking anymore.
currently the Blueprint does not turn on my boiler yet. In the debug log I see the following messages:
2023-05-05 11:46:37.168 DEBUG (MainThread) [custom_components.pyscript.eval] file.pv_excess_control.on_time: calling debug("[switch.boiler (Prio 1)] Home battery charge is sufficient (100/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: -14383 W", {})
2023-05-05 11:46:37.168 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.boiler (Prio 1)] Home battery charge is sufficient (100/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: -14383 W
2023-05-05 11:46:37.171 DEBUG (MainThread) [custom_components.pyscript.eval] file.pv_excess_control.on_time: calling debug("[switch.boiler (Prio 1)] Average Excess power not high enough to switch on appliance.", {})
2023-05-05 11:46:37.172 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.boiler (Prio 1)] Average Excess power not high enough to switch on appliance.
2023-05-05 11:46:37.175 DEBUG (MainThread) [custom_components.pyscript.eval] file.pv_excess_control.on_time: calling debug("[switch.boiler (Prio 1)] Appliance is already switched off.", {})
2023-05-05 11:46:37.175 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.boiler (Prio 1)] Appliance is already switched off.
Debug set “Average Excess power not high enough to switch on appliance.” But how the script knows when enough Power is available ?
Unfortunately I have neither a battery nor the possibility to view the import and export load separately. Therefore I use the “import_export_power” (in W).