I have also some issues to re-enable automations in the morning again - therefore I want to write down my experience here; perhaps the issue can be found with the support of the community.
Some automations are disabled at night and turned back on in the morning with an automation.
I think this is nothing special and here are a lot of example automations to do this.
Sometimes the pyscript is realising the activation (visible in the log), sometimes not.
In my case it seems, that when I restart home assistant with disabled automations, the pyscript does not recognize when they are enabled again afterwards.
When I do not restart home assistant in this period, it seems that all is working as expected.
What do you think? Do you have the same use case when the “re-enable issue” occurs?
Gr8 - I found the entry ID in the given file core.config_entries.
Short test of the service is executed without errors; but afterwards no debug logging anymore from pv_excess.
To be honest, I think its not the right way somehow.
Well, for me its still unclear how to setup a robust configuration.
Strange as it works 100% for me - this automation is turned off every morning at 7am for 2.5 hours, and then turned on - make sure your automation matches mine as in reload, delay 30s, re-enable automation.
Love what you’re doing here, but I can’t get it to work
I’ve just made a toggle switch while I wait for a proper zigbee switch for my car charger. Below is my configuration. I"ve turned logging on and see an update every 10s, but not much more. What have I filled in wrong??
alias: Car Solar Charge
description: ""
use_blueprint:
path: pv_excess_control.yaml
input:
pv_power: sensor.56_bambridge_st_weetangera_solar_power
import_export_power: sensor.56_bambridge_st_weetangera_grid_power
appliance_switch: input_boolean.car_charger_test
defined_current: 8
appliance_priority: 1
automation_id: Car Solar Charge
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:44:26.956113
11:44:26 AM - 4 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:44:16.956113
11:44:16 AM - 14 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:44:06.956113
11:44:06 AM - 24 seconds ago
OctoPrint Estimated Finish Time changed to July 19, 2023 at 3:56 PM
11:43:59 AM - 32 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:43:56.956113
11:43:56 AM - 34 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:43:46.956113
11:43:46 AM - 44 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:43:36.956113
11:43:36 AM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19 11:43:26.956113
11:43:26 AM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19T11:43:16.956113
11:43:16 AM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-07-19T11:43:06.956113
Nope, another sunny day. Grid power now showing -4250W but my dummy plug I’ve set to turn on at 8A, 230V is not turning on.
I get file_pv_excess_control_on_time has been triggered by time 2023-07-20T11:59:56.956113 in the logs every 10 seconds, I enabled debug logging in config, but not getting anything referencing solar in home-assistant.log.
Any thoughts?
Edit: Not sure what happened, but a restart seems to have fixed it!
Thanks again for some great functionality. I can’t help but think this might be better as an addon instead of a blueprint though?
In the Logbook of Home Assistant i only see the message: “file_pv_excess_control_on_time has been triggered by time 2023-07-21 07:24:05.291857”
But no more log are available. All settings for log in configuration.yaml are set!
First of all, thank you very much for this superb blueprint as it seems to help optimizing the Solar Excessed Power very nicely. Anyway, I tried the blueprint and the log produced this error.
My PV system is without a battery and I am currently using ‘Combined Import/Export Power’ entity and leave ‘Export Power’ and ‘Load Power’ empty. My Inverter is Huawei SUN-2000 and the integration exposes ‘Total Load’ and ‘Total Export’ sensor but not real time ‘Load’ and ‘Export’ so I assumed that ‘Combined Import/Export Power (Named ‘Active Power’)’ is a better option for me since that sensor provides both positive and negative number as per instructed.
I tried to find the solution in this thread by myself but I can’t seem to find any helpful information. The ‘num=unavailable’ error seems to occur to one user but he has battery in his system so his solution doesn’t seem to work for me.
Can you or anyone suggest what to do to solve this error producing in the log?
Thank you and looking forward to hearing from you.
Just a quick question. Probably looking over it. Am I seeing this right? At ‘Automation id’, do I put the name of the automation created with the blueprint? And ‘Appliance entity’ I put whatever has to be triggerd when there is enough sun? Now I put an other automation by ‘appliance entity’. In this auotmation I have my dishwasher turned on, set to the right program and started.
I now see that the automation with the blueprint gets triggerd, but the automation to start the dishwasher doesn’t.
Apologies if this has been covered before, i have had a good read through and tried a few things but no luck.
I have set up this to test with quite a low power threshold. I can see the expected logbook entries repeating, but don’t appear to have the full debug logging working:
In configuration.yaml:
In logging, i see the expected entries:
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:47:26.985743
3:47:26 PM - 1 second ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:47:16.985743
3:47:16 PM - 11 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:47:06.985743
3:47:06 PM - 21 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:56.985743
3:46:56 PM - 31 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:46.985743
3:46:46 PM - 41 seconds ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:36.985743
3:46:36 PM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:26.985743
3:46:26 PM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:16.985743
3:46:16 PM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:46:06.985743
3:46:06 PM - 1 minute ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:56.985743
3:45:56 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:46.985743
3:45:46 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:36.985743
3:45:36 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:26.985743
3:45:26 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:16.985743
3:45:16 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:45:06.985743
3:45:06 PM - 2 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:44:56.985743
3:44:56 PM - 3 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:44:46.985743
3:44:46 PM - 3 minutes ago
file_pv_excess_control_on_time has been triggered by time 2023-08-08T15:44:36.985743
This error originated from a custom integration.
Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/eval.py:1911
Integration: Pyscript Python scripting (documentation, issues)
First occurred: 11:33:23 AM (6 occurrences)
Last logged: 11:33:43 AM
num=unknown is not a valid number between 0 and 1000000: could not convert string to float: 'unknown'
Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
I had this blueprint working. then I copied the automations and changed the sensors and switches for the new devices and only one automation seems to keep functioning
This error originated from a custom integration.
Logger: custom_components.pyscript.file.pv_excess_control.on_time
Source: custom_components/pyscript/eval.py:1911
Integration: Pyscript Python scripting (documentation, issues)
First occurred: 8:54:44 PM (4 occurrences)
Last logged: 8:54:44 PM
Could not get state from entity automation.heating_garage: name 'automation.heating_garage' is not defined
Could not get state from entity automation.vanity_floor_heat: name 'automation.vanity_floor_heat' is not defined
Could not get state from entity automation.floor_heat_bathroom: name 'automation.floor_heat_bathroom' is not defined
Could not get state from entity automation.hot_water_pv: name 'automation.hot_water_pv' is not defined
What does this mean? they are set up no different to the only working one. reboots restarts disable enable doesn’t work.