I’m making a script that checks sensor.solcast_pv_forecast_forecast_tomorrow multiple times. Since I’ve only got 10 API calls per day I don’t want each call to use one of those API calls. If I check that sensor multiple times does it do an API call to solcast each time, or just the once?
Here’s the code in case it’s helpful. Cheers!
automation:
- alias: "Solar conditional overnight charge"
trigger:
- platform: time
at: "02:00:00"
actions:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
below: 4
sequence:
- action: foxess_control.smart_charge
data:
start_time: "02:00:00"
end_time: "04:00:00"
target_soc: 80
replace_conflicts: true
- conditions:
- condition: numeric_state
entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
below: 6
sequence:
- action: foxess_control.smart_charge
data:
start_time: "02:00:00"
end_time: "04:00:00"
target_soc: 60
replace_conflicts: true
- conditions:
- condition: numeric_state
entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
below: 8
sequence:
- action: foxess_control.smart_charge
data:
start_time: "02:00:00"
end_time: "04:00:00"
target_soc: 40
replace_conflicts: true