Collection of changing entity properties to class attributes (#51248)
* Collection of changing entity properties to class attributes * Apply suggestions from code review Co-authored-by: Erik Montnemery <erik@montnemery.com> Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
5acc3a1083
commit
258b388f41
32 changed files with 106 additions and 305 deletions
|
@ -127,6 +127,8 @@ class DeconzTampering(DeconzDevice, BinarySensorEntity):
|
|||
|
||||
TYPE = DOMAIN
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_PROBLEM
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
"""Return a unique identifier for this device."""
|
||||
|
@ -148,8 +150,3 @@ class DeconzTampering(DeconzDevice, BinarySensorEntity):
|
|||
def name(self) -> str:
|
||||
"""Return the name of the sensor."""
|
||||
return f"{self._device.name} Tampered"
|
||||
|
||||
@property
|
||||
def device_class(self) -> str:
|
||||
"""Return the class of the sensor."""
|
||||
return DEVICE_CLASS_PROBLEM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue