41 lines
6.3 KiB
JSON
41 lines
6.3 KiB
JSON
[
|
|
{
|
|
"id": "PV clipping - Forecast clipped PV for next 24 hours",
|
|
"result": {
|
|
"structured": "TRIGGER: At sunrise. CONDITIONS: None. ACTIONS: Set variable tuning_factor to 0.9. Set variable inverter_limit_kW to 5. Set variable inverter_limit to inverter_limit_kW divided by 12. Then, if predbat pv energy [predbat.pv_energy] has a 'results' attribute, iterate over the first 288 five-minute forecast values (representing the next 24 hours). For each five-minute interval after the first, calculate the difference between the current and previous forecast value, divide by tuning_factor, and if the result exceeds inverter_limit, add the excess to a cumulative total. Finally, set the value of PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] to that cumulative total.",
|
|
"natural_language": {
|
|
"trigger": "The automation runs at sunrise each day.",
|
|
"conditions": "There are no conditions that must be met for the automation to proceed.",
|
|
"action": "It first defines a tuning factor of 0.9 and an inverter power limit of 5 kW. It then retrieves the 5-minute solar energy forecast data from the predbat pv energy [predbat.pv_energy] sensor. For the next 24 hours of forecast data, it calculates the energy difference between each consecutive 5-minute period, adjusts it by the tuning factor, and sums up any amount that would exceed the inverter's capacity. This total forecasted 'clipped' solar energy, which would be lost due to the inverter limit, is then saved to the input_number.pv_clipped_in_next_24_hours [input_number.pv_clipped_in_next_24_hours] entity."
|
|
},
|
|
"human_like": "This automation estimates how much solar energy will be lost (clipped) due to inverter limits over the next 24 hours, running the calculation at sunrise each day.",
|
|
"complexity": "medium"
|
|
}
|
|
},
|
|
{
|
|
"id": "PV clipping - make room in battery at sunrise",
|
|
"result": {
|
|
"structured": "TRIGGER: At sunrise with a 120-second offset. CONDITIONS: predbat rates [predbat.rates] is above 0 AND PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] is greater than 0. ACTIONS: Set local variables: inverter_limit=5, bat_capacity_max=9.5, bat_discharge_max=3.6, sunrise_to_clipping_hours=4, slots=8, soc=predbat soc kw h0 [predbat.soc_kw_h0]. Then, repeat the following sequence 8 times with a 1-second delay between iterations: For each iteration, if PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] is greater than 0, then select a 30-minute export slot in predbat manual export [select.predbat_manual_export] at a calculated time offset after sunrise and set PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] to a new value computed from solar export, battery export, and clipping predictions. Otherwise, select a 30-minute freeze export slot in predbat manual freeze export [select.predbat_manual_freeze_export] at a calculated time offset after sunrise.",
|
|
"natural_language": {
|
|
"trigger": "The automation triggers 120 seconds after sunrise.",
|
|
"conditions": "It requires that the predbat rates [predbat.rates] sensor shows a value above zero, and the PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] input number is greater than zero, indicating that some solar power clipping is forecast.",
|
|
"action": "First, it sets several internal variables based on the system's configuration, including the inverter limit, battery capacity, discharge rate, and the time from sunrise to when clipping might start. It then enters a loop that runs eight times (once for each half-hour slot). In each loop iteration, if clipping is still predicted, it schedules a 30-minute export slot in the predbat manual export [select.predbat_manual_export] selector for a specific time after sunrise and recalculates the remaining predicted clipping amount, adjusting the PV clipped in next 24 hours [input_number.pv_clipped_in_next_24_hours] value. If no clipping is predicted for that iteration, it instead schedules a 30-minute freeze export slot in the predbat manual freeze export [select.predbat_manual_freeze_export] selector. A one-second delay is added between each loop iteration."
|
|
},
|
|
"human_like": "This automation proactively manages battery export around sunrise to create space for potential solar power clipping later in the day, based on a 24-hour forecast.",
|
|
"complexity": "high"
|
|
}
|
|
},
|
|
{
|
|
"id": "PV clipping - PV goes above inverter limit",
|
|
"result": {
|
|
"structured": "TRIGGER: When givtcp geserial pv power [sensor.givtcp_geserial_pv_power] exceeds 5000 Watts OR at 1 minute past the hour OR at 31 minutes past the hour. CONDITIONS: (Sun is above the horizon, i.e., after sunrise AND before sunset) AND (predbat rates [predbat.rates] is greater than 0) AND (The current half-hour time slot is not already present in the options of predbat manual export [select.predbat_manual_export]) AND (givtcp geserial pv power [sensor.givtcp_geserial_pv_power] exceeds 5000 Watts) AND (predbat soc kw h0 [predbat.soc_kw_h0] is greater than 1). ACTIONS: Set predbat manual export [select.predbat_manual_export] to the current half-hour time slot (rounded down to the nearest half-hour).",
|
|
"natural_language": {
|
|
"trigger": "The automation triggers when the solar panel power sensor [sensor.givtcp_geserial_pv_power] goes above 5000 Watts, or at 1 minute past any hour, or at 31 minutes past any hour.",
|
|
"conditions": "The automation only runs during daylight hours, when the sun is up. It also requires that the predbat rates [predbat.rates] are positive, that the current half-hour time slot is not already selected in the predbat manual export [select.predbat_manual_export] list, that the solar power [sensor.givtcp_geserial_pv_power] is currently above 5000 Watts, and that the predicted battery state of charge [predbat.soc_kw_h0] is above 1 kilowatt-hour.",
|
|
"action": "It sets the predbat manual export [select.predbat_manual_export] to the current half-hour time period, effectively marking this period for forced export."
|
|
},
|
|
"human_like": "Forces manual export for the current half-hour period when solar production is high enough to potentially exceed the inverter's limit, ensuring excess power is sent to the grid.",
|
|
"complexity": "medium"
|
|
}
|
|
}
|
|
] |