From db2140782f7ec8cd8240bc66fe7bd55bd4eb2504 Mon Sep 17 00:00:00 2001 From: Roy Hooper Date: Fri, 11 Sep 2015 23:57:34 -0400 Subject: [PATCH] follow proper calling convention for track_utc_time_change callback --- homeassistant/components/media_player/sonos.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/sonos.py b/homeassistant/components/media_player/sonos.py index d355049741c..3bcf6021bda 100644 --- a/homeassistant/components/media_player/sonos.py +++ b/homeassistant/components/media_player/sonos.py @@ -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. """