yahoofinance icon indicating copy to clipboard operation
yahoofinance copied to clipboard

UI-integration an new attributes

Open Tom-ahawk opened this issue 2 years ago • 1 comments

Please consider the following functionality:

  1. Make an UI-integration so stocks can be added using the UI. – No restart off HA needed.

  2. Add two attributes, «buy price» and «number of stocks» Using the UI-integration the two attributes can be set by the user.

This way a portfolio can be created in HA for daily monitoring.

Cheers.

UPDATE: I see the functionality #2 has been proposed before. I am a N00b, where and how, in your code do I write in some code to get two new attributes? This way I can populate them manually.

Tom-ahawk avatar Sep 13 '21 09:09 Tom-ahawk

When I last looked at config_flow, I did not see any way to enter multiple entries sequentially. Most of the options are simple authentication validation. But maybe that is possible now, I will have to double check.

I don't think buy price/count should be part of the component itself. It is also quite possible for the same symbol to be purchased more than once making it more complicated.

At this point I would suggest keeping buy details separate. You can populate additional attributes via scripting but it will get override when data is updated. A cleaner option could be to create a separate template based sensor.

I have kept my stock research/gain part in an AppDaemon app, it is a work in progress.

iprak avatar Oct 22 '21 11:10 iprak