Add battery attribute to Sensibo (#14735)
* Added battery attribute * Simplify current_batterypull/14743/merge
parent
f5d74e07d5
commit
4935043f4a
|
@ -154,7 +154,8 @@ class SensiboClimate(ClimateDevice):
|
|||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {ATTR_CURRENT_HUMIDITY: self.current_humidity}
|
||||
return {ATTR_CURRENT_HUMIDITY: self.current_humidity,
|
||||
'battery': self.current_battery}
|
||||
|
||||
@property
|
||||
def temperature_unit(self):
|
||||
|
@ -191,6 +192,11 @@ class SensiboClimate(ClimateDevice):
|
|||
"""Return the current humidity."""
|
||||
return self._measurements['humidity']
|
||||
|
||||
@property
|
||||
def current_battery(self):
|
||||
"""Return the current battery voltage."""
|
||||
return self._measurements.get('batteryVoltage')
|
||||
|
||||
@property
|
||||
def current_temperature(self):
|
||||
"""Return the current temperature."""
|
||||
|
|
Loading…
Reference in New Issue