Cleanup of HomematicIP Cloud code (#15475)
* Check if device supports lowBat and shows it only if battery is low * Show empty battery icon if lowBat is true * Default return None * Sabotage attribute and icon if device has this feature * Bug fix and cleanup * Use dedicated function for security state * Cleanup of sensor attributes and icons * Empty
This commit is contained in:
1 parent
e427f9ee38
commit
9c5bbfe96d
3 files changed
+24
-20
No files matched your search
@@ -80,11 +80,6 @@ class HomematicipAccesspointStatus(HomematicipGenericDevice):
|
||||
"""Return the unit this state is expressed in."""
|
||||
return '%'
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the access point."""
|
||||
return {}
|
||||
|
||||
|
||||
class HomematicipHeatingThermostat(HomematicipGenericDevice):
|
||||
"""MomematicIP heating thermostat representation."""
|
||||
@@ -98,6 +93,8 @@ class HomematicipHeatingThermostat(HomematicipGenericDevice):
|
||||
"""Return the icon."""
|
||||
from homematicip.base.enums import ValveState
|
||||
|
||||
if super().icon:
|
||||
return super().icon
|
||||
if self._device.valveState != ValveState.ADAPTION_DONE:
|
||||
return 'mdi:alert'
|
||||
return 'mdi:radiator'
|
||||
|
||||
Reference in new issue
Block a user