#Truncating / rounding entity state in mobile notification

1 messages · Page 1 of 1 (latest)

pearl cypress
#

I'm working on an automation that sends a notification to my phone if the Wayze integration detects that my commute to / from work is longer than a certain amount of minutes within a time window.

It seems to be working, but the Wayze entity doesn't seem to round or truncate the commute time - its sending something like 31.666666666666 minute commute home. Is there a way to force the entity state to round to the nearest whole number?

I'm using: {{states('sensor.my_evening_commute')}} minute commute home.

wild moth
#

Try

{{states(''sensor.my_evening_commute')|float |round(0)}}