Cannot switch on appliance, because appliance switch interval is not reached (0/1).
Anyone understand why this happens? I have reloaded the script from the ground up and it still does it, just seems to be stuck in a loop. Have the interval set to 1 minute.
'alias: delta_pro_auto_charge
description: “”
use_blueprint:
path: pv_excess_control.yaml
input:
automation_id: delta_pro_auto_charge
pv_power: sensor.givtcp_sa2142g007_pv_power
export_power: sensor.givtcp_sa2142g007_export_power
load_power: sensor.givtcp_sa2142g007_grid_to_house
home_battery_level: sensor.delta_pro_battery_level
min_home_battery_level: 60
home_battery_capacity: 3.5
solar_production_forecast: sensor.energy_production_today_remaining_3
appliance_switch: switch.delta_pro_force_charge
appliance_switch_interval: 1
dynamic_current_appliance: true
appliance_current_set_entity: input_number.pv_excess_control_amps_selector
min_current: 0.8
max_current: 14.6
defined_current: 0.8
actual_power: sensor.delta_pro_force_charge_current_power
2024-10-07 12:23:57.242 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 0, 3.0, 86.0, 441]
2024-10-07 12:23:57.243 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Adjusted 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 0, 3.0, 86.0, 441.0]
2024-10-07 12:23:57.244 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (solar 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, 235.0, 259.0, 270.0, 306.0, 317.0, 308.0, 316.0, 196.0, 91.0, 43.0, 38.0, 158.0, 251.0, 271.0, 288.0, 326.0, 339.0, 357.0, 442.0, 822]
2024-10-07 12:23:57.244 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Adjusted PV Excess (solar 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, 235.0, 259.0, 270.0, 306.0, 317.0, 308.0, 316.0, 196.0, 91.0, 43.0, 38.0, 158.0, 251.0, 271.0, 288.0, 326.0, 339.0, 357.0, 442.0, 822.0]
2024-10-07 12:23:57.245 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.delta_pro_force_charge automation.delta_pro_auto_charge (Prio 1)] Home battery charge is not sufficient (9.0/60.0 %), OR remaining solar forecast is lower than remaining capacity of home battery. Calculated average excess power based on >> export power <<: 441 W
2024-10-07 12:23:57.246 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.delta_pro_force_charge automation.delta_pro_auto_charge (Prio 1)] Average Excess power is high enough to switch on appliance.
2024-10-07 12:23:57.246 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.delta_pro_force_charge automation.delta_pro_auto_charge (Prio 1)] Cannot switch on appliance, because appliance switch interval is not reached (0/1).
2024-10-07 12:23:57.247 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.delta_pro_force_charge (Prio 1)] Appliance is already switched off.