Skip to content

Commit

Permalink
Merge pull request #409 from custom-components/zomg
Browse files Browse the repository at this point in the history
Revert
  • Loading branch information
Hellowlol authored Sep 30, 2024
2 parents 46e66ba + 6af2b8e commit 8fcb98d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/nordpool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions scripts/dev
Original file line number Diff line number Diff line change
@@ -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 <root>/custom_components/integration_blueprint
## while at the same time have Home Assistant configuration inside <root>/config
## without resulting to symlinks.
export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components"

echo $PWD

# Start Home Assistant
hass --config "${PWD}/config" --debug
7 changes: 7 additions & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

python3 -m pip install --requirement requirements.txt

0 comments on commit 8fcb98d

Please sign in to comment.