Adding current_humidity to attributes if its not None. (#18261)
* Adding current humidity if not None * Removed the logic in supported feature * More appropriate placementpull/18269/head
parent
2e517ab6bc
commit
39412dc930
|
@ -249,9 +249,11 @@ class ClimateDevice(Entity):
|
|||
self.hass, self.target_temperature_low, self.temperature_unit,
|
||||
self.precision)
|
||||
|
||||
if self.current_humidity is not None:
|
||||
data[ATTR_CURRENT_HUMIDITY] = self.current_humidity
|
||||
|
||||
if supported_features & SUPPORT_TARGET_HUMIDITY:
|
||||
data[ATTR_HUMIDITY] = self.target_humidity
|
||||
data[ATTR_CURRENT_HUMIDITY] = self.current_humidity
|
||||
|
||||
if supported_features & SUPPORT_TARGET_HUMIDITY_LOW:
|
||||
data[ATTR_MIN_HUMIDITY] = self.min_humidity
|
||||
|
|
Loading…
Reference in New Issue