mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix temp not being reported properly (#28973)
This commit is contained in:
parent
b4f477f4de
commit
0a58853689
@ -72,19 +72,19 @@ class AbodeSensor(AbodeDevice):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
if self._sensor_type == "temp":
|
if self._sensor_type == CONST.TEMP_STATUS_KEY:
|
||||||
return self._device.temp
|
return self._device.temp
|
||||||
if self._sensor_type == "humidity":
|
if self._sensor_type == CONST.HUMI_STATUS_KEY:
|
||||||
return self._device.humidity
|
return self._device.humidity
|
||||||
if self._sensor_type == "lux":
|
if self._sensor_type == CONST.LUX_STATUS_KEY:
|
||||||
return self._device.lux
|
return self._device.lux
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
"""Return the units of measurement."""
|
"""Return the units of measurement."""
|
||||||
if self._sensor_type == "temp":
|
if self._sensor_type == CONST.TEMP_STATUS_KEY:
|
||||||
return self._device.temp_unit
|
return self._device.temp_unit
|
||||||
if self._sensor_type == "humidity":
|
if self._sensor_type == CONST.HUMI_STATUS_KEY:
|
||||||
return self._device.humidity_unit
|
return self._device.humidity_unit
|
||||||
if self._sensor_type == "lux":
|
if self._sensor_type == CONST.LUX_STATUS_KEY:
|
||||||
return self._device.lux_unit
|
return self._device.lux_unit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user