Skip to content

Commit

Permalink
Steps should have a unit of 'steps'
Browse files Browse the repository at this point in the history
This will allow charting the values over time. Per https://www.home-assistant.io/lovelace/history-graph/ sensors need a unit of measurement for the history card to show a a graph instead of a single horizontal bar.
  • Loading branch information
ppicazo authored Dec 17, 2020
1 parent 46a47e3 commit 8579c13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/tryfi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def unit_of_measurement(self):
if self.statType.upper() == "DISTANCE":
return LENGTH_KILOMETERS
else:
return None
return "steps"

@property
def device_info(self):
Expand Down

0 comments on commit 8579c13

Please sign in to comment.