From e96ac74b1170484e0dd4777972c99856d4425e39 Mon Sep 17 00:00:00 2001 From: awkwardDuck <34869622+awkwardDuck@users.noreply.github.com> Date: Sun, 25 Feb 2018 22:28:41 -0500 Subject: [PATCH] Fix formatting of minutes for sleep start in the fitbit sensor (#12664) * fix formatting of minutes for sleep start https://github.com/home-assistant/home-assistant/issues/12594 * Update fitbit.py --- homeassistant/components/sensor/fitbit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/fitbit.py b/homeassistant/components/sensor/fitbit.py index 35748b30ecf..6ea18d318b8 100644 --- a/homeassistant/components/sensor/fitbit.py +++ b/homeassistant/components/sensor/fitbit.py @@ -463,7 +463,8 @@ class FitbitSensor(Entity): hours -= 12 elif hours == 0: hours = 12 - self._state = '{}:{} {}'.format(hours, minutes, setting) + self._state = '{}:{:02d} {}'.format(hours, minutes, + setting) else: self._state = raw_state else: