I recently received "tegningsretter" for a stock (Green Hydrogen Systems). This has an acquisition price (GAK) of 0, and it causes the addon to fail to start
2023-06-27 21:05:23.350 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up nordnet platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/nordnet/sensor.py", line 24, in async_setup_entry
sensor = NordnetStock(dict(holding), coordinator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordnet/sensor.py", line 37, in __init__
self._attributes = self._remap(holding)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordnet/sensor.py", line 139, in _remap
input['account_roi_percent'] = (input['position_market_price'] - input['position_acquisition_price']) / input['position_acquisition_price'] * 100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
The simple solution would be to ignore these assets.
I recently received "tegningsretter" for a stock (Green Hydrogen Systems). This has an acquisition price (GAK) of 0, and it causes the addon to fail to start
The simple solution would be to ignore these assets.