follow proper calling convention for track_utc_time_change callback

This commit is contained in:
Roy Hooper 2015-09-11 23:57:34 -04:00
parent e9367d5369
commit db2140782f

View File

@ -55,13 +55,17 @@ class SonosDevice(MediaPlayerDevice):
self.update()
track_utc_time_change(
hass, self.update_ha_state,
hass, self.update_sonos,
second=range(0, 60, 5))
@property
def should_poll(self):
return False
def update_sonos(self, now):
""" Updates state, called by track_utc_time_change """
self.update_ha_state(True)
@property
def name(self):
""" Returns the name of the device. """