jrfernandes / ontario_energy_board

Home Assistant component that installs a sensor with the current energy rate for Ontario energy companies
MIT License
44 stars 11 forks source link

Not surviving HASS restart. #1

Closed jazzyisj closed 2 years ago

jazzyisj commented 2 years ago
2022-02-06 12:45:23 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ENWIN Utilities Ltd. (RESIDENTIAL) for ontario_energy_board
Traceback (most recent call last):
  File "/config/custom_components/ontario_energy_board/api.py", line 67, in get_rates
    response = await self.websession.get(RATES_URL)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 327, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/ontario_energy_board/__init__.py", line 31, in async_setup_entry
    await ontario_energy_board.get_rates()
  File "/config/custom_components/ontario_energy_board/api.py", line 67, in get_rates
    response = await self.websession.get(RATES_URL)
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
jrfernandes commented 2 years ago

Thank you for reporting this. At a glance it looks like there was an issue contacting the OEB website. Not the same issue, but as mentioned in #2, it does look like their website no longer provides the current peak information either. This will be fixed hopefully this weekend.

jrfernandes commented 2 years ago

This issue is now solved with v0.2