Closed eddysteurs closed 1 year ago
I have requested the same in #136. Same topic.
As I've written in the other thread, I will not change the unique id since it will be a breaking change for most people but you can always modify the function yourself to make it work
Example
@property
def unique_id(self):
"""Return the unique id."""
return f"{self._stock}_{self._shares}_stock"
I did copy the code lines to my the sensor.py and replaced the existiting 4 lines (just one line has changed) I rebooted home assistant. It does still not work as before. :(
If you have the same stock and same amount of shares the example I gave you wont work, you would need something more then to make it unique. You could also just remove the function competely I guess
would it be possible to add a portfolio holder into the entities, I have 2 holders and in both I have some same stocks (one portfolio is self managed, the other by a external portfolio management company). In the current setup I can not have the same stock (e.g. Microsoft) in both portfolios because it is based only on avanza id number