Melissa state_attributes (#18201)
* Melissa attributes * overide device_state_attributes rather than state_attributes * Selected attributes * Adding current humidity rather than a state_attribute
This commit is contained in:
parent
34d7758b4a
commit
c6f3c239bb
1 changed files with 9 additions and 2 deletions
|
@ -88,6 +88,12 @@ class MelissaClimate(ClimateDevice):
|
|||
if self._data:
|
||||
return self._data[self._api.TEMP]
|
||||
|
||||
@property
|
||||
def current_humidity(self):
|
||||
"""Return the current humidity value."""
|
||||
if self._data:
|
||||
return self._data[self._api.HUMIDITY]
|
||||
|
||||
@property
|
||||
def target_temperature_step(self):
|
||||
"""Return the supported step of target temperature."""
|
||||
|
@ -113,8 +119,9 @@ class MelissaClimate(ClimateDevice):
|
|||
@property
|
||||
def target_temperature(self):
|
||||
"""Return the temperature we try to reach."""
|
||||
if self._cur_settings is not None:
|
||||
return self._cur_settings[self._api.TEMP]
|
||||
if self._cur_settings is None:
|
||||
return None
|
||||
return self._cur_settings[self._api.TEMP]
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue