Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106850

Calculation with template sensor

$
0
0

I’m trying to do a ROI calculation with a template sensor. But somehow I don’t get it working, and I expect it is something small…

{{((8000 / ((states.sensor.thuisbatterij_total | int) / (states.sensor.aantal_dagen_batterij_operationeel | int )) /365 | int )) }}

What I am trying to do:
Investment is 8000
sensor.thuisbatterij_total is the profit in total - current value approx 400
Sensor.aantal_dagen_batterij_operationeel is the number of days operational - current value 129
This deciding by 365 days a year

So I expect a result of 7. But it doesn’t give any result, nor a failure
What am I missing?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>