mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +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()
|
self.update()
|
||||||
|
|
||||||
track_utc_time_change(
|
track_utc_time_change(
|
||||||
hass, self.update_ha_state,
|
hass, self.update_sonos,
|
||||||
second=range(0, 60, 5))
|
second=range(0, 60, 5))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def update_sonos(self, now):
|
||||||
|
""" Updates state, called by track_utc_time_change """
|
||||||
|
self.update_ha_state(True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
""" Returns the name of the device. """
|
""" Returns the name of the device. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user