From d4834ff408cef0080b9105cde3f9e3766ccdfa2d Mon Sep 17 00:00:00 2001 From: Roy Hooper Date: Sun, 13 Sep 2015 16:53:05 -0400 Subject: [PATCH] Add hass property to Entity to prevent 'Attribute hass is None' error during self.update_ha_state --- homeassistant/components/media_player/sonos.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/media_player/sonos.py b/homeassistant/components/media_player/sonos.py index 058a676ebc8..1f299486047 100644 --- a/homeassistant/components/media_player/sonos.py +++ b/homeassistant/components/media_player/sonos.py @@ -57,6 +57,7 @@ class SonosDevice(MediaPlayerDevice): # pylint: disable=too-many-arguments def __init__(self, hass, player): + self.hass = hass super(SonosDevice, self).__init__() self._player = player self.update()