diff --git a/homeassistant/components/light/vera.py b/homeassistant/components/light/vera.py index 42a5e7b7899..5b2e74f3ac8 100644 --- a/homeassistant/components/light/vera.py +++ b/homeassistant/components/light/vera.py @@ -15,7 +15,7 @@ from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.const import EVENT_HOMEASSISTANT_STOP, STATE_ON -REQUIREMENTS = ['pyvera==0.2.3'] +REQUIREMENTS = ['pyvera==0.2.5'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sensor/vera.py b/homeassistant/components/sensor/vera.py index b381974ab31..9bf1c071450 100644 --- a/homeassistant/components/sensor/vera.py +++ b/homeassistant/components/sensor/vera.py @@ -15,7 +15,7 @@ from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_TRIPPED, ATTR_ARMED, ATTR_LAST_TRIP_TIME, TEMP_CELCIUS, TEMP_FAHRENHEIT, EVENT_HOMEASSISTANT_STOP) -REQUIREMENTS = ['pyvera==0.2.3'] +REQUIREMENTS = ['pyvera==0.2.5'] _LOGGER = logging.getLogger(__name__) @@ -45,7 +45,10 @@ def get_devices(hass, config): hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_subscription) - categories = ['Temperature Sensor', 'Light Sensor', 'Sensor'] + categories = ['Temperature Sensor', + 'Light Sensor', + 'Humidity Sensor', + 'Sensor'] devices = [] try: devices = vera_controller.get_devices(categories) @@ -106,7 +109,12 @@ class VeraSensor(Entity): @property def unit_of_measurement(self): """ Unit of measurement of this entity, if any. """ - return self._temperature_units + if self.vera_device.category == "Temperature Sensor": + return self._temperature_units + elif self.vera_device.category == "Light Sensor": + return 'lux' + elif self.vera_device.category == "Humidity Sensor": + return '%' @property def state_attributes(self): @@ -140,7 +148,8 @@ class VeraSensor(Entity): def update(self): if self.vera_device.category == "Temperature Sensor": current_temp = self.vera_device.get_value('CurrentTemperature') - vera_temp_units = self.vera_device.veraController.temperature_units + vera_temp_units = ( + self.vera_device.vera_controller.temperature_units) if vera_temp_units == 'F': self._temperature_units = TEMP_FAHRENHEIT @@ -157,6 +166,8 @@ class VeraSensor(Entity): self.current_value = current_temp elif self.vera_device.category == "Light Sensor": self.current_value = self.vera_device.get_value('CurrentLevel') + elif self.vera_device.category == "Humidity Sensor": + self.current_value = self.vera_device.get_value('CurrentLevel') elif self.vera_device.category == "Sensor": tripped = self.vera_device.get_value('Tripped') self.current_value = 'Tripped' if tripped == '1' else 'Not Tripped' diff --git a/homeassistant/components/switch/vera.py b/homeassistant/components/switch/vera.py index 4094fe61f4f..ec7f7395e26 100644 --- a/homeassistant/components/switch/vera.py +++ b/homeassistant/components/switch/vera.py @@ -21,7 +21,7 @@ from homeassistant.const import ( STATE_ON, STATE_OFF) -REQUIREMENTS = ['pyvera==0.2.3'] +REQUIREMENTS = ['pyvera==0.2.5'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 863fa1b4d17..4d38ada0daf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -62,7 +62,7 @@ tellcore-py==1.1.2 # homeassistant.components.light.vera # homeassistant.components.sensor.vera # homeassistant.components.switch.vera -pyvera==0.2.3 +pyvera==0.2.5 # homeassistant.components.wink # homeassistant.components.light.wink