From 8a1fa822055253c8a6224de74df345bb062eff8d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 20 Feb 2016 00:08:02 -0800 Subject: [PATCH] Add sensor class to bloomsky binary_sensor --- homeassistant/components/binary_sensor/__init__.py | 2 +- homeassistant/components/binary_sensor/bloomsky.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/binary_sensor/__init__.py b/homeassistant/components/binary_sensor/__init__.py index 844bc609bfd..c51b30d8b7c 100644 --- a/homeassistant/components/binary_sensor/__init__.py +++ b/homeassistant/components/binary_sensor/__init__.py @@ -64,7 +64,7 @@ class BinarySensorDevice(Entity): @property def sensor_class(self): - """Return the class of this sensor, from SENSOR_CASSES.""" + """Return the class of this sensor, from SENSOR_CLASSES.""" return None @property diff --git a/homeassistant/components/binary_sensor/bloomsky.py b/homeassistant/components/binary_sensor/bloomsky.py index 3f18af03013..ce24a0c1015 100644 --- a/homeassistant/components/binary_sensor/bloomsky.py +++ b/homeassistant/components/binary_sensor/bloomsky.py @@ -56,6 +56,11 @@ class BloomSkySensor(BinarySensorDevice): """Unique ID for this sensor.""" return self._unique_id + @property + def sensor_class(self): + """Return the class of this sensor, from SENSOR_CLASSES.""" + return SENSOR_TYPES.get(self._sensor_name) + @property def is_on(self): """If binary sensor is on."""