Add hass property to Entity to prevent 'Attribute hass is None' error during self.update_ha_state
This commit is contained in:
1 parent
ce22f3c82d
commit
d4834ff408
1 file changed
+1
@@ -57,6 +57,7 @@ class SonosDevice(MediaPlayerDevice):
|
|||||||
|
|
||||||
# pylint: disable=too-many-arguments
|
# pylint: disable=too-many-arguments
|
||||||
def __init__(self, hass, player):
|
def __init__(self, hass, player):
|
||||||
|
self.hass = hass
|
||||||
super(SonosDevice, self).__init__()
|
super(SonosDevice, self).__init__()
|
||||||
self._player = player
|
self._player = player
|
||||||
self.update()
|
self.update()
|
||||||
|
|||||||
Reference in new issue
Block a user