bobtosh
1
I am trying to find a way to calculate ABS() value of this and then to compare if > 1 ?
Any workarounds on that?
condition: template
value_template: ‘{{ (states.sensor.X.state | float | round (2) - states.sensor.Y.state | float | round (2)) > 1 }}’
1 Like
treno
(travis reno)
2
‘{{ (states.sensor.X.state | float | round (2) - states.sensor.Y.state | float | round (2) ) | abs > 1 }}’
4 Likes
bobtosh
3
Thank you so much! I was tricked by the documentation that says to use Abs() format, not “| abs”. Great!
2 Likes