Hello All,
I need help!..I am on the quest of creating a custom template sensor; where I use the value from one entity and multiply that value by the number 5000.
The goal here is that I added the yahoo finance integration to my HA and want to use a stock’s current price (entity value) AND times that number by the number of shares that I have for it (5000).
- platform: template
sensors:
mystock_holding:
friendly_name: My Stock Holding's Value
value_template: "{{ (states('sensor.yahoofinance_ticker_usd') | float * 5000) | round(0) }}"
I have attempted everything on this page, as well as other threads, but cant seem to output the desired calculation. What I get is either the “on” or the “unavailable” values.
Image of UI:

Thank you in advance