Home Assistant component which allows you to get stock updates from Yahoo finance.
Optionally allow symbol to be used as unit_of_measurement via a new setting show_currency_symbol_as_unit
at integration level.
You will need to address STATISTICS errors after the restart (see Readme).
Added forwardPE (Forward Price-to-Earnings) and trailingPE (Trailing Price-To-Earnings) attributes.
Improve mechanism for request crumb/cookies. A different set of headers is used to avoid "Header value is too long" error (https://github.com/iprak/yahoofinance/issues/121).
Trying a different user-agent to avoid Header Value too Long error (https://github.com/iprak/yahoofinance/issues/121).
scan_interval
for manually invoking updates. To accomplish that, one would need to define the scan_interval
as manual.This release include support for no_unit
setting to suppress unit_of_measurement
on a symbol.
This release takes another approach to bypassing GDPR page. Instead of parsing crumb out of the response, a separate request is made to an alternate end point.
This release includes
YahooFinanceCrumbContent.log
in config folder.Added crumb/cookie usage to handle data access issues https://github.com/iprak/yahoofinance/issues/93.
The crumb itself is obtained by accessing quote for Nasdaq and parsing out of the content. Not a great approach but I couldn't come up with a quicker/reliable solution.
The crumb will be obtained again if data request fails with "Unauthorized" error code. If data retrieval failed then coordinator will attempt another retrieval in 20 seconds which will include crumb retrieval. In worse case scenario, this can keep on going and so there should be some throttling. But I haven't personally ran into it and this approach seems fine for now.