Hi
Ive got a steps counter in my HA, so it shows how many steps I have taken each day.
I would like to convert this into kilo meters, is there a helper available to make this possible?
or another configuration?
Thanks in advance
Hi
Ive got a steps counter in my HA, so it shows how many steps I have taken each day.
I would like to convert this into kilo meters, is there a helper available to make this possible?
or another configuration?
Thanks in advance
Create a Template Sensor that multiplies the value of your steps sensor by 0.5 (or whatever is the length of your step in meters) and then divides the result by 1000, to get kilometers, and finally rounds the result to two decimal places.
template:
- sensor:
- name: Walking Distance
state: "{{ (states('sensor.your_steps') | int(0) * 0.5 / 1000) | round(2) }}"
unit_of_measurement: km
thanks! this is exactly what I was looking for