diff --git a/custom_components/solcast_solar/__init__.py b/custom_components/solcast_solar/__init__.py index 6449c9e2..daf47acf 100644 --- a/custom_components/solcast_solar/__init__.py +++ b/custom_components/solcast_solar/__init__.py @@ -253,7 +253,7 @@ async def __check_auto_update_missed(coordinator: SolcastUpdateCoordinator): coordinator.interval_just_passed.astimezone(coordinator.solcast.options.tz).strftime(DATE_FORMAT), ) await coordinator.service_event_update(ignore_auto_enabled=True, completion="Completed task update_missed") - else: + else: # pragma: no cover, time-of-day dependent _LOGGER.debug("Auto update forecast is fresh") except TypeError: # pragma: no cover, catch unexpected exceptions _LOGGER.warning("Auto update freshness could not be determined") diff --git a/custom_components/solcast_solar/config_flow.py b/custom_components/solcast_solar/config_flow.py index 4f0f4b93..fc240604 100644 --- a/custom_components/solcast_solar/config_flow.py +++ b/custom_components/solcast_solar/config_flow.py @@ -2,13 +2,11 @@ from __future__ import annotations -import json import logging from pathlib import Path import re from typing import Any -import aiofiles import voluptuous as vol from homeassistant import config_entries