Skip to content
Snippets Groups Projects
Commit 4935043f authored by michaeldavie's avatar michaeldavie Committed by Fabian Affolter
Browse files

Add battery attribute to Sensibo (#14735)

* Added battery attribute

* Simplify current_battery
parent f5d74e07
No related branches found
No related tags found
No related merge requests found
...@@ -154,7 +154,8 @@ class SensiboClimate(ClimateDevice): ...@@ -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): ...@@ -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."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment