yahoofinance icon indicating copy to clipboard operation
yahoofinance copied to clipboard

Url to stock chart

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

Using your integration for quick look at my main stocks. Would be nice to have a stock attribute in the form as an url to Yahoo charts for the stock.

Tom-ahawk avatar Oct 08 '22 10:10 Tom-ahawk

I feel this is a very specific use case. The chart url for a symebol is just https://finance.yahoo.com/chart/symbol. How are you planning to use the url?

iprak avatar Nov 06 '22 18:11 iprak

Using:

type: custom:flex-table-card
entities:
  include: sensor.yahoofinance*
columns:
  - name: Trend
    data: icon
  - name: Råvarer
    data: friendly_name
  - name: Pris $US
    data: state
  - name: ∆%
    data: regularMarketChangePercent

image

Clicking on the icon or other field containing the url so one can quickly got to the stock chart.

Tom-ahawk avatar Nov 06 '22 20:11 Tom-ahawk

That is a neat card.

I don't know how clickable links can be generate by it but it is through advanced formatting the prefix can be used to generate the url data. - https://github.com/custom-cards/flex-table-card/blob/master/docs/example-cfg-simple-cell-formatting.md

This proposed data attribute feels redundant to me and would like to avoid it since the symbol values can be tracked for longer periods.

iprak avatar Nov 07 '22 00:11 iprak

Got it working like this:

  - name: Link
    data: symbol
    modify: '''<a href=https://finance.yahoo.com/quote/'' + x + ''>Y</a>'''

Tom-ahawk avatar Nov 07 '22 11:11 Tom-ahawk