Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove distance unit of measurement from sensors #5

Open
BertrumUK opened this issue Jul 26, 2020 · 2 comments
Open

Remove distance unit of measurement from sensors #5

BertrumUK opened this issue Jul 26, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@BertrumUK
Copy link

BertrumUK commented Jul 26, 2020

I live in the UK where we use Miles but Strava provides our distances in KM. The distance sensor 0.3 / 1.3 etc, provided by this integration, adds km to the end of this sensor therefore a templates sensor to convert it to miles is not possible. Looking at your code it will either return Miles or KM depending on if HA is set for metric or Imperial - is there a way to add an option on the integration to set metric or Imperial ?

{{ states.sensor.strava_0_3.state | float * 0.621371 | round(2) }}
{{ states.sensor.strava_1_3.state | float * 0.621371 | round(2) }}

error

Can I suggest that the unit of measurement on this sensor is removed so that its value can be manipulated with a template sensor or a sensor to provide both the distance in Miles & KM or provide a why to set it in the integration ?

distance

@codingcyclist
Copy link
Owner

@BertrumUK Good idea to remove the UOM from the sensor value. I hope I get to that soon, but I'm pretty busy at work right now, so I can't promise anything :-/

@codingcyclist codingcyclist added the enhancement New feature or request label Jan 6, 2021
@kkemseke
Copy link

I would like to request the same for the YTD distance ridden. This way I can have a gauge with my yearly target distance... unless there is an easy way to parse the value to a number in yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants