Skip to content

Tags: slovdahl/home-assistant-spothinta

Tags

v0.6.0

Toggle v0.6.0's commit message

Verified

This commit was signed with the committer’s verified signature.
slovdahl Sebastian Lövdahl
Version 0.6.0

v0.5.4

Toggle v0.5.4's commit message

Verified

This commit was signed with the committer’s verified signature.
slovdahl Sebastian Lövdahl
Version 0.5.4

v0.5.3

Toggle v0.5.3's commit message

Verified

This commit was signed with the committer’s verified signature.
slovdahl Sebastian Lövdahl
Version 0.5.3

v0.5.2

Toggle v0.5.2's commit message

Verified

This commit was signed with the committer’s verified signature.
slovdahl Sebastian Lövdahl
Version 0.5.2

v0.5.1

Toggle v0.5.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update spothinta-api to 0.6.2 to fix blocking IO warning (#83)

v0.5.0

Toggle v0.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update spothinta-api to 0.6.1 (#81)

v0.4.0

Toggle v0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump minimum HA version to 2024.3.0 (#56)

v0.3.1

Toggle v0.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Make sure `random_delay` is initialized before use (#16)

If e.g. a timeout happens when fetching data with old data being available too,
the `random_delay` variable used in the retrying is not initialized, and the
following error is logged and the retrying is stopped until Home Assistant is
restarted:

```
2023-10-28 15:03:20.278 ERROR (MainThread) [custom_components.spothinta] Unexpected error fetching spothinta_FI data: cannot access local variable 'random_delay' where it is not associated with a value
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/spothinta_api/spothinta.py", line 81, in _request
    response = await self.session.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/spothinta_api/spothinta.py", line 80, in _request
    async with async_timeout.timeout(self.request_timeout):
  File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 141, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 228, in _do_exit
    raise asyncio.TimeoutError
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/spothinta/coordinator.py", line 84, in _async_update_data
    self.current_data = await self.spothinta.energy_prices(self.region)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/spothinta_api/spothinta.py", line 132, in energy_prices
    data = await self._request(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/spothinta_api/spothinta.py", line 91, in _request
    raise SpotHintaConnectionError(
spothinta_api.exceptions.SpotHintaConnectionError: Timeout occurred while connecting to the API.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spothinta/coordinator.py", line 90, in _async_update_data
    now + timedelta(minutes=5) + timedelta(seconds=random_delay)
                                                   ^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'random_delay' where it is not associated with a value
```

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Categorize some of the sensors as diagnostic (#15)

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix diagnostics after spothinta-api version bump (#13)