v4.1.8
Pre-releasePre-release. Quite a bit of existing code has been modfied, and new code has been added. Feature-completeless and code quality is the focus.
What's Changed
TL>DR:
- Automated forecast updates that do not require an automation by @autoSteve and @BJReplay
- Add per-site dampening by @autoSteve
- Add site breakdown option for detailed forecasts by @autoSteve
- Add hard limit configuration to options by @autoSteve
- Suppress integration reload when many configuration options are changed by @autoSteve
Automated forecast updates
All users of this integration will have Home Assistant automation(s) set up to fetch forecast updates at desirable times of day. And that's great for the power users, who want an update just after midnight, then another strategic update pre-dawn, and then spread other updates up to API limit throughout the day (or not...).
The reason that all users have to create an automation now is because our forebears removed automatic updating when Solcast dropped their API limit maximum for hobbyist users to just ten per day.
It got too hard I guess.
It is not too hard. And it is done.
If you don't need to do anything special, then head into the integration config options and turn on 'Auto-update'. Disable or delete your automation. You can specify whether you want automation over twenty-four hours, or from sunrise to sunset. Too easy.
"But hang on! I want an automation to get one update just after midnight for PredBat, then I wouldn't mind taking advantage of this new auto-update thing. Can I?" Absolutely. Supposing you have two sites, and an API limit of 10, then set the limit in the integration config options to 8, turn on auto-update, then have your post-midnight automation do its thing (with a twist).
The twist is that there is now a new service call that must be used instead. This is force_update_forecasts
, which basically ignores all configured limits. So change your midnight call to use this service. (As an aside, when auto-update is enabled the service call update_forecasts
is ignored, and logged as such, so it must be changed.)
Full spread of attributes breakdown by site
Absolutely all sensor attributes may now be broken down by site, including the detailed half-hourly and hourly forecasts.
For why? I dunno. They're there for the taking, and for you to decide what you want to do with the data. How about build an Apex chart representation of each site forecast? Or build an automated per-site dampening automation? Your install, your things. (And tell us if you can't do what you want because the data is missing. We may have missed exposing something.)
All attributes sent to Home Assistant may be configured in config options. You choose the clutter. Turn them on or off.
The big attributes, like per-site detailed forecasts are not sent to recorder, so your Home Assistant database size will not suffer even with everything turned on.
Per-site dampening
Do you need to dampen just one site output in the forecast calculation? You can now. Check out the extended service call for set_dampening
.
It is now possible to add an optional site
variable to the call with the ID of the Solcast site, which will disable overall dampening and switch to per-site. Don't want per-site any more? Set the total dampening either in config options, or use the service call without specifying a site
and it will reset to the total dampening settings.
Hard limit
Most of you don't know what this is. But it has been a thing, only configurable by service call. It is now in the config options dialogue. Don't know what it does? Ask the readme. You probably don't need it, but for those that do they will appreciate this.
Suppression of integration re-load on options change
Previously, should any config option be changed then the integration would simply re-load, because whatever. It does not now.
It is judicious.
It's a small thing, but we like it.
Basically, if the integration does not need to, then it will not re-load. Are selected sensor attributes changed? Fine. Just update the sensors and move on. Has dampening been adjusted? Fine, re-calculate forecast, splines, and then update the sensors. Change to auto-update forecasts? Re-load.
Legacy improvements
(Nerd alert 🚨) Some Home Assistant timers seemed to not be culled at times on re-load. This was usually an annoyance and waste of system resources. However, with auto-update of forecasts now implemented this has become super-important to avoid.
So it is avoided.
All coroutines that may be pending/running/waiting/hung at shutdown are now gracefully cancelled.
Full Changelog: v4.1.7...v4.1.8
Release Discussion
#176