mirror of
https://github.com/home-assistant/core.git
synced 2025-08-10 08:05:06 +02:00
follow proper calling convention for track_utc_time_change callback
This commit is contained in:
@@ -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. """
|
||||
|
Reference in New Issue
Block a user