Fixed reporting of vera UV sensors (#9838)

This commit is contained in:
Alan Fischer 2017-10-12 11:51:25 -06:00 committed by Andrey
parent 3bdb7052b8
commit 4cf300a710

View File

@ -53,6 +53,8 @@ class VeraSensor(VeraDevice, Entity):
return self._temperature_units
elif self.vera_device.category == veraApi.CATEGORY_LIGHT_SENSOR:
return 'lux'
elif self.vera_device.category == veraApi.CATEGORY_UV_SENSOR:
return 'level'
elif self.vera_device.category == veraApi.CATEGORY_HUMIDITY_SENSOR:
return '%'
elif self.vera_device.category == veraApi.CATEGORY_POWER_METER:
@ -74,6 +76,8 @@ class VeraSensor(VeraDevice, Entity):
elif self.vera_device.category == veraApi.CATEGORY_LIGHT_SENSOR:
self.current_value = self.vera_device.light
elif self.vera_device.category == veraApi.CATEGORY_UV_SENSOR:
self.current_value = self.vera_device.light
elif self.vera_device.category == veraApi.CATEGORY_HUMIDITY_SENSOR:
self.current_value = self.vera_device.humidity
elif self.vera_device.category == veraApi.CATEGORY_SCENE_CONTROLLER: