Im sure there is a way to do what i want, i just dont know it yet, but you might!
i use the “open exchange rate” integration, to display the rats for some of the currencies i use daily, however, i am interested in some more “complex” calculation, to display more ratios than the integration gives (to my knowledge), as this integration take USD as base for all currencies ratios.
so… i want to use a template to extract the ratio of some certain rates, do some calculation with basic math, to show the solution of the new equation as a new entity (or new exchange ratio).
example:
the integration shows the state of the EUR to USD as:
‘sensor.open_exchange_rates_usd_eur’ with state of 0.91
and the state of GBP to USD as:
‘sensor.open_exchange_rates_usd_gbp’ with state of 0.78
the following equations will give me the ratio i need directly between the two:
(1/‘sensor.open_exchange_rates_usd_eur’)/(1/‘sensor.open_exchange_rates_usd_gbp’)
or
‘sensor.open_exchange_rates_usd_gbp’/‘sensor.open_exchange_rates_usd_eur’
im sharing my thoughts as i believe more ppl will benefit from them, as we all come from different countries, and might not have local integrations to properly show their home country currency of choice - as in my case.
this will allow everyone who needs it, to properly calculate their currency of choice.
could anyone pls show the proper template for this?
cheers!