Skip to content

Commit

Permalink
fixed gtt to report isotime (#20128)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliseomartelli authored and fabaff committed Jan 15, 2019
1 parent 80bc42a commit 5fd1053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/sensor/gtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from homeassistant.const import DEVICE_CLASS_TIMESTAMP
from homeassistant.helpers.entity import Entity
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util

REQUIREMENTS = ['pygtt==1.1.2']

Expand Down Expand Up @@ -80,7 +79,8 @@ def device_state_attributes(self):
def update(self):
"""Update device state."""
self.data.get_data()
next_time = dt_util.parse_time(self.data.state_bus['time'][0]['run'])
next_time = datetime.strptime(
self.data.state_bus['time'][0]['run'], "%H:%M")
self._state = next_time.isoformat()


Expand Down

0 comments on commit 5fd1053

Please sign in to comment.