Use shorthand attributes in Roomba (#99831)

This commit is contained in:
Joost Lekkerkerker 2023-09-07 15:56:40 +02:00 committed by GitHub
parent 1fe17b5bed
commit 114b5bd1f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 36 deletions

View file

@ -27,7 +27,7 @@ async def async_setup_entry(
class RoombaBinStatus(IRobotEntity, BinarySensorEntity):
"""Class to hold Roomba Sensor basic info."""
ICON = "mdi:delete-variant"
_attr_icon = "mdi:delete-variant"
_attr_translation_key = "bin_full"
@property
@ -35,11 +35,6 @@ class RoombaBinStatus(IRobotEntity, BinarySensorEntity):
"""Return the ID of this sensor."""
return f"bin_{self._blid}"
@property
def icon(self):
"""Return the icon of this sensor."""
return self.ICON
@property
def is_on(self):
"""Return the state of the sensor."""