mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
follow proper calling convention for track_utc_time_change callback
This commit is contained in:
parent
e9367d5369
commit
db2140782f
@ -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. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user