custom-components / sensor.avanza_stock

Custom component to get stock data from Avanza for Home Assistant
MIT License
46 stars 10 forks source link

Error after update to HA 2023.6.1 #156

Closed PutoPunko closed 1 year ago

PutoPunko commented 1 year ago

Hi,

Avanza stock integration stopped updating entity after upgrading to HA 2023.6.1. Maybe it has something to do with new date/time entity types or the update on python.

Logs:

Logger: homeassistant.helpers.entity Source: custom_components/avanza_stock/sensor.py:222 Integration: avanza_stock (documentation, issues) First occurred: 12 de juny de 2023, a les 15:52:07 (21 occurrences) Last logged: 11:52:07

Update for sensor.schneider_electric fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update await self.async_update() File "/config/custom_components/avanza_stock/sensor.py", line 222, in async_update data = await pyavanza.get_stock_async(self._session, self._stock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyavanza/init.py", line 66, in get_stock_async return await get_url_async(session, url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyavanza/init.py", line 46, in get_url_async resp = await session.get(url, raise_for_status=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 400, in _request raise RuntimeError("Session is closed") RuntimeError: Session is closed

PutoPunko commented 1 year ago

Now it is working... Not sure what happened

claha commented 1 year ago

Does not seem to be related to the component, closing.