Skip to content

Creating sensor for speed, convert to km/h #578

Closed Answered by bartowski1182
bartowski1182 asked this question in Q&A
Discussion options

You must be logged in to vote

Okay so I was stupid, and writing it this way causes 1.609 to be rounded up to 2

the actual way to write it is with an extra bracket:
{{ (state_attr('device_tracker.thunderfury_location_tracker', 'speed') | float * 1.609) | round }}

closing as solution

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@alandtse
Comment options

Answer selected by bartowski1182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants