iprak / yahoofinance

Home Assistant component which allows you to get stock updates from Yahoo finance.
MIT License
79 stars 11 forks source link

v.1.2.4 isn't updating based on scan_interval of 5 mins #113

Closed FS1961 closed 7 months ago

FS1961 commented 7 months ago

Hello,

Here is my yaml:

`yahoofinance: symbols:

Here is the log - scan interval is still doing 6 hours!

2024-01-29 21:35:46.274 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration yahoofinance which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-01-29 21:36:04.948 INFO (MainThread) [custom_components.yahoofinance] Total 1 unique scan intervals 2024-01-29 21:36:04.949 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Navigating to a base Yahoo page 2024-01-29 21:36:13.487 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Response 200, URL: https://consent.yahoo.com/v2/collectConsent?sessionId=3_cc-session_218bde90-fdb6-4972-95b8-7667ca152c99 2024-01-29 21:36:13.487 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Cookies: 2024-01-29 21:36:13.488 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Consent page detected 2024-01-29 21:36:13.489 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Posting consent {'reject': 'reject', 'csrfToken': 'HNfu5FY', 'sessionId': '3_cc-session_218bde90-fdb6-4972-95b8-7667ca152c99', 'originalDoneUrl': 'https://finance.yahoo.com/quote/NQ=F?guccounter=1', 'namespace': 'yahoo'} 2024-01-29 21:36:15.809 WARNING (MainThread) [homeassistant.setup] Setup of yahoofinance is taking over 10 seconds. 2024-01-29 21:36:15.905 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Consent post response 200, URL: https://finance.yahoo.com/quote/NQ=F?guccounter=1 2024-01-29 21:36:15.906 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Accessing crumb page 2024-01-29 21:36:17.261 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb response status: 200, URL: https://query2.finance.yahoo.com/v1/test/getcrumb 2024-01-29 21:36:17.261 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb page reported kDpQddybg.J 2024-01-29 21:36:17.263 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb: kDpQddybg.J 2024-01-29 21:36:17.263 INFO (MainThread) [custom_components.yahoofinance] Creating coordinator with scan_interval 6:00:00 for symbols ['^GSPC', '^DJI', '^IXIC'] 2024-01-29 21:36:17.263 INFO (MainThread) [custom_components.yahoofinance] Requesting initial data from coordinator with update interval of 6:00:00. 2024-01-29 21:36:17.265 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=^GSPC,^DJI,^IXIC&crumb=kDpQddybg.J' 2024-01-29 21:36:18.444 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^GSPC to 4925.42 2024-01-29 21:36:18.444 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^DJI to 38306.67 2024-01-29 21:36:18.444 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^IXIC to 15622.063 2024-01-29 21:36:18.445 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Data = [{'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Free Realtime Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'REGULAR', 'regularMarketChangePercent': 0.7043533, 'regularMarketPrice': 4925.42, 'exchange': 'SNP', 'shortName': 'S&P 500', 'longName': 'S&P 500', 'messageBoardId': 'finmb_INDEXGSPC', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': -1325583000000, 'priceHint': 2, 'regularMarketChange': 34.449707, 'regularMarketTime': 1706560555, 'regularMarketDayHigh': 4929.31, 'regularMarketDayRange': '4887.4 - 4929.31', 'regularMarketDayLow': 4887.4, 'regularMarketVolume': 1581473000, 'regularMarketPreviousClose': 4890.97, 'bid': 4925.21, 'ask': 4926.4, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'SNP', 'regularMarketOpen': 4892.95, 'averageDailyVolume3Month': 3940038032, 'averageDailyVolume10Day': 3989596000, 'fiftyTwoWeekLowChange': 1116.5598, 'fiftyTwoWeekLowChangePercent': 0.293148, 'fiftyTwoWeekRange': '3808.86 - 4929.31', 'fiftyTwoWeekHighChange': -3.8901367, 'fiftyTwoWeekHighChangePercent': -0.0007891848, 'fiftyTwoWeekLow': 3808.86, 'fiftyTwoWeekHigh': 4929.31, 'fiftyTwoWeekChangePercent': 21.733452, 'fiftyDayAverage': 4686.8574, 'fiftyDayAverageChange': 238.5625, 'fiftyDayAverageChangePercent': 0.05090031, 'twoHundredDayAverage': 4422.4277, 'twoHundredDayAverageChange': 502.9922, 'twoHundredDayAverageChangePercent': 0.11373667, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^GSPC'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Free Realtime Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'REGULAR', 'regularMarketChangePercent': 0.51756793, 'regularMarketPrice': 38306.67, 'exchange': 'DJI', 'shortName': 'Dow Jones Industrial Average', 'longName': 'Dow Jones Industrial Average', 'messageBoardId': 'finmb_INDEXDJI', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 694362600000, 'priceHint': 2, 'regularMarketChange': 197.24219, 'regularMarketTime': 1706560555, 'regularMarketDayHigh': 38340.05, 'regularMarketDayRange': '38061.17 - 38340.05', 'regularMarketDayLow': 38061.17, 'regularMarketVolume': 212919362, 'regularMarketPreviousClose': 38109.43, 'bid': 38305.44, 'ask': 38311.77, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'DJI', 'regularMarketOpen': 38115.83, 'averageDailyVolume3Month': 315697540, 'averageDailyVolume10Day': 346641000, 'fiftyTwoWeekLowChange': 6876.8516, 'fiftyTwoWeekLowChangePercent': 0.21880022, 'fiftyTwoWeekRange': '31429.82 - 38340.05', 'fiftyTwoWeekHighChange': -33.378906, 'fiftyTwoWeekHighChangePercent': -0.0008706015, 'fiftyTwoWeekLow': 31429.82, 'fiftyTwoWeekHigh': 38340.05, 'fiftyTwoWeekChangePercent': 13.027048, 'fiftyDayAverage': 36795.93, 'fiftyDayAverageChange': 1510.7422, 'fiftyDayAverageChangePercent': 0.04105732, 'twoHundredDayAverage': 34738.383, 'twoHundredDayAverageChange': 3568.289, 'twoHundredDayAverageChangePercent': 0.10271892, 'sourceInterval': 120, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^DJI'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Free Realtime Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'REGULAR', 'regularMarketChangePercent': 1.0785912, 'regularMarketPrice': 15622.063, 'exchange': 'NIM', 'shortName': 'NASDAQ Composite', 'longName': 'NASDAQ Composite', 'messageBoardId': 'finmb_INDEXIXIC', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 34612200000, 'priceHint': 2, 'regularMarketChange': 166.7002, 'regularMarketTime': 1706560555, 'regularMarketDayHigh': 15630.585, 'regularMarketDayRange': '15449.868 - 15630.585', 'regularMarketDayLow': 15449.868, 'regularMarketVolume': 3713382000, 'regularMarketPreviousClose': 15455.363, 'bid': 0.0, 'ask': 0.0, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'Nasdaq GIDS', 'regularMarketOpen': 15470.7, 'averageDailyVolume3Month': 5253906721, 'averageDailyVolume10Day': 5315848000, 'fiftyTwoWeekLowChange': 4639.2637, 'fiftyTwoWeekLowChangePercent': 0.42241174, 'fiftyTwoWeekRange': '10982.8 - 15630.585', 'fiftyTwoWeekHighChange': -8.521484, 'fiftyTwoWeekHighChangePercent': -0.0005451801, 'fiftyTwoWeekLow': 10982.8, 'fiftyTwoWeekHigh': 15630.585, 'fiftyTwoWeekChangePercent': 35.646988, 'fiftyDayAverage': 14693.255, 'fiftyDayAverageChange': 928.8086, 'fiftyDayAverageChangePercent': 0.06321327, 'twoHundredDayAverage': 13643.475, 'twoHundredDayAverageChange': 1978.5889, 'twoHundredDayAverageChangePercent': 0.14502089, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^IXIC'}] 2024-01-29 21:36:18.453 INFO (MainThread) [custom_components.yahoofinance.coordinator] Data updated [interval=6:00:00] 2024-01-29 21:36:18.453 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Finished fetching YahooSymbolUpdateCoordinator data in 1.189 seconds (success: True) 2024-01-29 21:36:22.516 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2024-01-29 21:36:22.517 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^GSPC currency=USD financialCurrency=None 2024-01-29 21:36:22.517 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2024-01-29 21:36:22.517 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^DJI currency=USD financialCurrency=None 2024-01-29 21:36:22.518 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2024-01-29 21:36:22.518 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^IXIC currency=USD financialCurrency=None 2024-01-29 21:36:22.518 INFO (MainThread) [custom_components.yahoofinance.sensor] Entities added for ['^GSPC', '^DJI', '^IXIC'] 2024-01-29 21:36:22.556 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^GSPC available=True 2024-01-29 21:36:22.558 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^DJI available=True 2024-01-29 21:36:22.559 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^IXIC available=True 2024-01-29 21:40:11.605 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_gspc (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this 2024-01-29 21:40:11.605 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_dji (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this 2024-01-29 21:40:11.605 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_ixic (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this 2024-01-30 03:36:22.000 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=^GSPC,^DJI,^IXIC&crumb=kDpQddybg.J' 2024-01-30 03:36:22.110 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^GSPC to 4927.93 2024-01-30 03:36:22.110 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^DJI to 38333.45 2024-01-30 03:36:22.110 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^IXIC to 15628.045 2024-01-30 03:36:22.111 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Data = [{'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Delayed Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'POSTPOST', 'regularMarketChangePercent': 0.75567746, 'regularMarketPrice': 4927.93, 'exchange': 'SNP', 'shortName': 'S&P 500', 'longName': 'S&P 500', 'messageBoardId': 'finmb_INDEXGSPC', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': -1325583000000, 'priceHint': 2, 'regularMarketChange': 36.95996, 'regularMarketTime': 1706566910, 'regularMarketDayHigh': 4929.31, 'regularMarketDayRange': '4887.4 - 4929.31', 'regularMarketDayLow': 4887.4, 'regularMarketVolume': 2312494000, 'regularMarketPreviousClose': 4890.97, 'bid': 4892.17, 'ask': 4970.58, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'SNP', 'regularMarketOpen': 4892.95, 'averageDailyVolume3Month': 3933710491, 'averageDailyVolume10Day': 3993478000, 'fiftyTwoWeekLowChange': 1119.0701, 'fiftyTwoWeekLowChangePercent': 0.2938071, 'fiftyTwoWeekRange': '3808.86 - 4929.31', 'fiftyTwoWeekHighChange': -1.3798828, 'fiftyTwoWeekHighChangePercent': -0.00027993426, 'fiftyTwoWeekLow': 3808.86, 'fiftyTwoWeekHigh': 4929.31, 'fiftyTwoWeekChangePercent': 20.883333, 'fiftyDayAverage': 4695.502, 'fiftyDayAverageChange': 232.42822, 'fiftyDayAverageChangePercent': 0.049500186, 'twoHundredDayAverage': 4426.608, 'twoHundredDayAverageChange': 501.32227, 'twoHundredDayAverageChangePercent': 0.113252014, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^GSPC'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Delayed Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'POSTPOST', 'regularMarketChangePercent': 0.5878323, 'regularMarketPrice': 38333.45, 'exchange': 'DJI', 'shortName': 'Dow Jones Industrial Average', 'longName': 'Dow Jones Industrial Average', 'messageBoardId': 'finmb_INDEXDJI', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 694362600000, 'priceHint': 2, 'regularMarketChange': 224.01953, 'regularMarketTime': 1706566910, 'regularMarketDayHigh': 38343.93, 'regularMarketDayRange': '38061.17 - 38343.93', 'regularMarketDayLow': 38061.17, 'regularMarketVolume': 314948847, 'regularMarketPreviousClose': 38109.43, 'bid': 38138.5, 'ask': 38363.57, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'DJI', 'regularMarketOpen': 38115.83, 'averageDailyVolume3Month': 315924426, 'averageDailyVolume10Day': 349964000, 'fiftyTwoWeekLowChange': 6903.629, 'fiftyTwoWeekLowChangePercent': 0.21965219, 'fiftyTwoWeekRange': '31429.82 - 38343.93', 'fiftyTwoWeekHighChange': -10.480469, 'fiftyTwoWeekHighChangePercent': -0.00027332798, 'fiftyTwoWeekLow': 31429.82, 'fiftyTwoWeekHigh': 38343.93, 'fiftyTwoWeekChangePercent': 12.460852, 'fiftyDayAverage': 36866.043, 'fiftyDayAverageChange': 1467.4062, 'fiftyDayAverageChangePercent': 0.039803736, 'twoHundredDayAverage': 34761.816, 'twoHundredDayAverageChange': 3571.6328, 'twoHundredDayAverageChangePercent': 0.10274586, 'sourceInterval': 120, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^DJI'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'INDEX', 'typeDisp': 'Index', 'quoteSourceName': 'Delayed Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'USD', 'marketState': 'POSTPOST', 'regularMarketChangePercent': 1.1172926, 'regularMarketPrice': 15628.045, 'exchange': 'NIM', 'shortName': 'NASDAQ Composite', 'longName': 'NASDAQ Composite', 'messageBoardId': 'finmb_INDEXIXIC', 'exchangeTimezoneName': 'America/New_York', 'exchangeTimezoneShortName': 'EST', 'gmtOffSetMilliseconds': -18000000, 'market': 'us_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 34612200000, 'priceHint': 2, 'regularMarketChange': 172.68164, 'regularMarketTime': 1706566559, 'regularMarketDayHigh': 15630.585, 'regularMarketDayRange': '15449.868 - 15630.585', 'regularMarketDayLow': 15449.868, 'regularMarketVolume': 4581281000, 'regularMarketPreviousClose': 15455.363, 'bid': 0.0, 'ask': 0.0, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'Nasdaq GIDS', 'regularMarketOpen': 15470.7, 'averageDailyVolume3Month': 5267513114, 'averageDailyVolume10Day': 5317885000, 'fiftyTwoWeekLowChange': 4645.245, 'fiftyTwoWeekLowChangePercent': 0.42295638, 'fiftyTwoWeekRange': '10982.8 - 15630.585', 'fiftyTwoWeekHighChange': -2.540039, 'fiftyTwoWeekHighChangePercent': -0.00016250441, 'fiftyTwoWeekLow': 10982.8, 'fiftyTwoWeekHigh': 15630.585, 'fiftyTwoWeekChangePercent': 34.90416, 'fiftyDayAverage': 14723.929, 'fiftyDayAverageChange': 904.1162, 'fiftyDayAverageChangePercent': 0.06140455, 'twoHundredDayAverage': 13661.969, 'twoHundredDayAverageChange': 1966.0762, 'twoHundredDayAverageChangePercent': 0.1439087, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': '^IXIC'}] 2024-01-30 03:36:22.111 INFO (MainThread) [custom_components.yahoofinance.coordinator] Data updated [interval=6:00:00] 2024-01-30 03:36:22.111 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Finished fetching YahooSymbolUpdateCoordinator data in 0.111 seconds (success: True) 2024-01-30 03:36:22.112 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^GSPC available=True 2024-01-30 03:36:22.112 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^DJI available=True 2024-01-30 03:36:22.113 DEBUG (MainThread) [custom_components.yahoofinance.sensor] ^IXIC available=True

iprak commented 7 months ago

Something is not right. For now, you can perhaps define scan_interval at integration level (under yahoofinance) which will cause all symbols to be refreshed every 5 min.

iprak commented 7 months ago

Can you double check your config? I can't tell the exact declaration due to re-formatting.

This is how it should look: image

And you should see messages like this

2024-01-30 06:02:34.500 INFO (MainThread) [custom_components.yahoofinance] Creating coordinator with scan_interval 6:00:00 for symbols ['^GSPC', '^DJI']
2024-01-30 06:02:34.501 INFO (MainThread) [custom_components.yahoofinance] Requesting initial data from coordinator with update interval of 6:00:00.
2024-01-30 06:02:34.685 INFO (MainThread) [custom_components.yahoofinance.coordinator] Data updated [interval=6:00:00]
2024-01-30 06:02:34.685 INFO (MainThread) [custom_components.yahoofinance] Creating coordinator with scan_interval 0:05:00 for symbols ['^IXIC']
2024-01-30 06:02:34.685 INFO (MainThread) [custom_components.yahoofinance] Requesting initial data from coordinator with update interval of 0:05:00.
FS1961 commented 7 months ago

Here is my yaml entry:On Jan 30, 2024, at 12:55 PM, Indu Prakash @.***> wrote: Something is not right. For now, you can perhaps define scan_interval at integration level (under yahoofinance) which will cause all symbols to be refreshed every 5 min.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

iprak commented 7 months ago

Can you paste formatted configuration? show_trending_icon appears to be under symbol: ^IXIC which would be invalid.

FS1961 commented 7 months ago

I think it is. I'll try and move it.

yahoofinance: scan_interval: minutes: 1 symbols:

FS1961 commented 7 months ago

Is this better?

yahoofinance: scan_interval: minutes: 1 symbols:

FS1961 commented 7 months ago

Sorry, so here it is based on your example:

Screenshot 2024-01-30 at 3 52 13 PM

Doesn’t look like it’s updating.

Current time is after 16:00. No updates since I tried v1.2.3 this morning.

IMG_1769

FS1961 commented 7 months ago

Here is the recent log. yahoo finance log.txt The card is definitely not updating though.

Screenshot 2024-01-30 at 7 33 02 PM Screenshot 2024-01-30 at 7 33 15 PM
FS1961 commented 7 months ago

If I go back to the other version it updates:

Screenshot 2024-01-30 at 7 46 51 PM
iprak commented 7 months ago

Your configuration looks okay.

I reviewed the log files and it confirms '^GSPC', '^DJI' would be updates every 6 hour and ^IXIC every minute.

Later in the log, I can see updates for ^IXIC every minute.

2024-01-30 15:51:48.476 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^IXIC to 15609.6875
2024-01-30 15:52:52.101 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated ^IXIC to 15604.38

Data is stored along with unit. If the unit is changed, the new data is not saved unless the unit mismatch is resolved. And that is exactly what happened. When you went back to older version, the unit matched up and so data started appearing.

Here are the message from HomeAssistant about that:

2024-01-30 15:55:10.511 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_gspc (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-30 15:55:10.511 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_dji (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-30 15:55:10.511 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.yahoofinance_ixic (None) cannot be converted to the unit of previously compiled statistics (USD). Generation of long term statistics will be suppressed unless the unit changes back to USD or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this

You will have to go to Developer Tools > Statistics and fix the issue.

FS1961 commented 7 months ago

Okay I think it’s fixed now. here is my yaml now