From 57406d9b5ef36433fff1b76db38aedd9907e12c7 Mon Sep 17 00:00:00 2001 From: Steffen Fredriksen Date: Mon, 30 Sep 2024 18:34:20 +0200 Subject: [PATCH 1/2] Revert "Update __init__.py" This reverts commit 2389d2231cb8630f5287e31e280abb1f1efdcb76. --- custom_components/nordpool/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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 From 6af2b8e07eb53614053fb8db1be641d2d1b785d5 Mon Sep 17 00:00:00 2001 From: Steffen Fredriksen Date: Mon, 30 Sep 2024 18:34:36 +0200 Subject: [PATCH 2/2] Add and revert --- scripts/dev | 22 ++++++++++++++++++++++ scripts/setup | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 scripts/dev create mode 100644 scripts/setup 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