Skip to content

Commit

Permalink
Merge pull request #46 from BJReplay/Force-all-cache-files-to-/config
Browse files Browse the repository at this point in the history
Force all cache files to /config #43, track all account usage #42, prevent rapid forecast re-call #12
  • Loading branch information
autoSteve authored Jun 21, 2024
2 parents 4ef7047 + 093adf1 commit 77d6e2f
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 78 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,19 @@ Modified from the great works of
## Changes
v4.0.32
- Bug fix: Independent API use counter for each Solcast account by @autoSteve
- Bug fix: Force all caches to /config/ for all platforms (fixes Docker deployments) #43 by @autoSteve
- Improve forecast fetch/retry logging debug, info, warning choice by @autoSteve
- Suppression of consecutive forecast fetches within fifteen minutes (fixes strange mutliple fetches should a restart occur exactly when automation for fetch is triggered) by @autoSteve
- Work-around: Prevent error when 'tally' is unavailable during retry by #autoSteve
- Fix for earlier HA versions not recognising version= for async_update_entry() #40 by autoSteve
Full Changelog: https://github.com/BJReplay/ha-solcast-solar/compare/v4.0.31...v4.0.32
Known issues
- The variable 'tally' should never be unavailable during a forecast fetch retry sequence, but it can be for some reason. This causes site 'forecast today' sensor to show as 'Unknown' until the retries are exhausted, or a successful fetch occurs.
v4.0.31
- docs: Changes to README.md
- docs: Add troubleshooting notes.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solcast_solar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
options = ConnectionOptions(
entry.options[CONF_API_KEY],
SOLCAST_URL,
hass.config.path('solcast.json'),
hass.config.path('/config/solcast.json'),
tz,
optdamp,
entry.options[CUSTOM_HOUR_SENSOR],
Expand Down
3 changes: 2 additions & 1 deletion custom_components/solcast_solar/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ async def update_integration_listeners(self, *args):

async def update_utcmidnight_usage_sensor_data(self, *args):
try:
self.solcast._api_used = 0
for k in self.solcast._api_used.keys():
self.solcast._api_used[k] = 0
self.async_update_listeners()
except Exception:
#_LOGGER.error("SOLCAST - update_utcmidnight_usage_sensor_data: %s", traceback.format_exc())
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solcast_solar/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/BJReplay/ha-solcast-solar/issues",
"requirements": ["aiohttp>=3.8.5", "datetime>=4.3", "isodate>=0.6.1"],
"version": "4.0.31"
"version": "4.0.32"
}
Loading

0 comments on commit 77d6e2f

Please sign in to comment.