diff --git a/custom_components/nordpool/__init__.py b/custom_components/nordpool/__init__.py index 5fef8dd..61076d0 100644 --- a/custom_components/nordpool/__init__.py +++ b/custom_components/nordpool/__init__.py @@ -111,6 +111,10 @@ async def _someday(self, area: str, currency: str, day: str): await self.update_today(areas=self.areas) except InvalidValueException: _LOGGER.debug("No data available for today, retrying later") + try: + await self.update_tomorrow(areas=self.areas) + except InvalidValueException: + _LOGGER.debug("No data available for tomorrow, retrying later") # Send a new data request after new data is updated for this first run # This way if the user has multiple sensors they will all update diff --git a/scripts/dev b/scripts/dev new file mode 100644 index 0000000..8174444 --- /dev/null +++ b/scripts/dev @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +# Create config dir if not present +if [[ ! -d "${PWD}/config" ]]; then + mkdir -p "${PWD}/config" + hass --config "${PWD}/config" --script ensure_config +fi + +# Set the path to custom_components +## This let's us have the structure we want /custom_components/integration_blueprint +## while at the same time have Home Assistant configuration inside /config +## without resulting to symlinks. +export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components" + +echo $PWD + +# Start Home Assistant +hass --config "${PWD}/config" --debug \ No newline at end of file diff --git a/scripts/setup b/scripts/setup new file mode 100644 index 0000000..abe537a --- /dev/null +++ b/scripts/setup @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +python3 -m pip install --requirement requirements.txt \ No newline at end of file