From e877ed01afca576a405041af78de23b53a19ee86 Mon Sep 17 00:00:00 2001 From: jamespcole Date: Sun, 22 Mar 2015 14:43:20 +1100 Subject: [PATCH] Fixed attribute error with new unit_of_measurement changes --- homeassistant/components/sensor/sabnzbd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/sabnzbd.py b/homeassistant/components/sensor/sabnzbd.py index 431752f544c..d33c9603c01 100644 --- a/homeassistant/components/sensor/sabnzbd.py +++ b/homeassistant/components/sensor/sabnzbd.py @@ -118,7 +118,7 @@ class SabnzbdSensor(Entity): self.type = sensor_type self.client_name = client_name self._state = None - self.unit_of_measurement = SENSOR_TYPES[sensor_type][1] + self._unit_of_measurement = SENSOR_TYPES[sensor_type][1] @property def name(self): @@ -134,7 +134,7 @@ class SabnzbdSensor(Entity): """ Returns the state attributes. """ return { ATTR_FRIENDLY_NAME: self.name, - ATTR_UNIT_OF_MEASUREMENT: self.unit_of_measurement, + ATTR_UNIT_OF_MEASUREMENT: self._unit_of_measurement, } def refresh_sabnzbd_data(self):