You’re only rounding the 1000, not the entire equation. Parenthesis are your friend. EDIT: Also make sure each opening parenthesis has a closing one. I.e. ( ( ) is invalid where ( ( ) ) is not invalid.
- platform: template
sensors:
pv_stromnetz:
friendly_name: "Stromnetz"
value_template: "{{ states('sensor.temperature') | float / 10 | round(2) }}"
That works. value Format doenst work to.
Thank you for your time
Because you’re only rounding the last number… again, you have to use wrap the entire division in parenthesis in order for the round to be applied to the whole equation. It’s just being applied to the 10.
is that your entire equation? What about the whole states(‘sensor.pv_tageseinkauf_2’) part? WHy is that not included in the parenthesis?
I understand you might be frustrated here, but if I give you the answer, you’ll be back here asking the same question. It’s best you actually learn how this works. states('sensor.pv_tageseinkauf_2') | float is the entire value of your sensor. That’s equivalent to x in my previous response.
I suggest you start to use the template editor as well. Developer tools → templates. You can test any template there and see the result.