Hello
I would like to calculate the cost of our daily oil consumption, but the template does not work.
I would be really grateful for support.
template:
sensor:
- name: "oil_kosten_täglich"
unique_id: oil_kosten_täglich
state: "{{ iif(states('sensor.olverbrauch_taglich'), (states('sensor.olverbrauch_taglich') | float*0,112) | round(2)) }}"
unit_of_measurement: "Euro"
icon: "mdi:cash"
state_class: total_increasing
device_class: monetary
I thought it would be easiest to calculate the value of the daily consumption with 0,112€, but the formula seems to be incorrect.