Use shorthand attributes in Roomba (#99831)
This commit is contained in:
parent
1fe17b5bed
commit
114b5bd1f0
4 changed files with 8 additions and 36 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue