Replacement for Yahoo Finance

Since Yahoo Finance is no longer supported, anyone know of a why to retrieve stock prices?

1 Like

Google Finance in google sheets does the job.

I don’t see a Google Finance or Google Sheets component within HA

There are products that will read google sheets into databases on other platforms. I am currently only familiar with using a Windows based one but I am sure there will be one for pi. Need some techie to integrate that with HA I guess.

Thanks but I was hoping there was a HA component…

What are you trying to do? I can’t visualise a link between home automation and the state of the stock market except perhaps to turn the lights off if it crashes !

I have a tablet which I use as a console… it shows the weather, the DJ and a few stocks and key lights/switches in the house. I also had a rule that generate an alert when one of the stocks went outside of a range

I’ve been using Alpha Vantage which has been working alright. It only displays the current price of the stock and not the change. Since its a sensor you can create a graph from it which helps show how much the stock changed that day. It doesn’t support indexes like Dow Jones though - at least from what I can tell

1 Like

I am not sure why Yahoo Finance stopped being supported; the API ends points are still active.

I had written a component from scratch using the current end point -

1 Like

Does this still work for you? I just tried it but I’m getting ā€œPlatform error sensor.yahoofinance - Integration ā€˜yahoofinance’ not found.ā€

There is no official yahoo finance component. If you are using mine, then you would need to copy the component to the custom location.

The syntax is missing a ā€œ-ā€

sensor:
  - platform: yahoofinance
    show_trending_icon: true
    scan_interval:
      hours: 4
    symbols:
      - ISTNX

Works great in HACS for install just fix that missing ā€œ-ā€ and all is good.

Thanks, I have updated the documentation.

This is great. I’ve been using the Alpha Vantage integration for months which only seems to update once every two days or so.

Can’t you put this integration forward to be put into the official built-in ones? Or at least get it added to HACS?

What card do you use to display the data? Ideally, it would be a graph in green or red, depending on the trend

The end point is not well documented/exposed, so I am hesitant of putting it into the official one. But this should be in HACS.

@kennelm I just list them as entities using auto-entities which can feed off a group.

I just realized that I didn’t have history turned on in my config. I fixed that. Now, I am experimenting with the history graph card to see how that will plot the Dow (^DJI) and S&P (^GSPC) indexes.

I am trying to make a template to show the attributes, but i am really not finding any info on how to do this.

{{states(ā€˜yahoofinance.dji’)}}

{{state_attr(ā€˜yahoofinance.dji’ ,ā€˜RegularMarketChange’ )}}

1 Like