mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add battery attribute to Sensibo (#14735)
* Added battery attribute * Simplify current_battery
This commit is contained in:
parent
f5d74e07d5
commit
4935043f4a
@ -154,7 +154,8 @@ class SensiboClimate(ClimateDevice):
|
|||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes."""
|
"""Return the state attributes."""
|
||||||
return {ATTR_CURRENT_HUMIDITY: self.current_humidity}
|
return {ATTR_CURRENT_HUMIDITY: self.current_humidity,
|
||||||
|
'battery': self.current_battery}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def temperature_unit(self):
|
def temperature_unit(self):
|
||||||
@ -191,6 +192,11 @@ class SensiboClimate(ClimateDevice):
|
|||||||
"""Return the current humidity."""
|
"""Return the current humidity."""
|
||||||
return self._measurements['humidity']
|
return self._measurements['humidity']
|
||||||
|
|
||||||
|
@property
|
||||||
|
def current_battery(self):
|
||||||
|
"""Return the current battery voltage."""
|
||||||
|
return self._measurements.get('batteryVoltage')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_temperature(self):
|
def current_temperature(self):
|
||||||
"""Return the current temperature."""
|
"""Return the current temperature."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user