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
|
@ -75,6 +75,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
class SighthoundEntity(ImageProcessingEntity):
|
||||
"""Create a sighthound entity."""
|
||||
|
||||
_attr_unit_of_measurement = ATTR_PEOPLE
|
||||
|
||||
def __init__(
|
||||
self, api, camera_entity, name, save_file_folder, save_timestamped_file
|
||||
):
|
||||
|
@ -164,11 +166,6 @@ class SighthoundEntity(ImageProcessingEntity):
|
|||
"""Return the state of the entity."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement."""
|
||||
return ATTR_PEOPLE
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
"""Return the attributes."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue