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
|
@ -112,6 +112,8 @@ class HMCover(HMDevice, CoverEntity):
|
|||
class HMGarage(HMCover):
|
||||
"""Represents a Homematic Garage cover. Homematic garage covers do not support position attributes."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_GARAGE
|
||||
|
||||
@property
|
||||
def current_cover_position(self):
|
||||
"""
|
||||
|
@ -127,11 +129,6 @@ class HMGarage(HMCover):
|
|||
"""Return whether the cover is closed."""
|
||||
return self._hmdevice.is_closed(self._hm_get_state())
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class."""
|
||||
return DEVICE_CLASS_GARAGE
|
||||
|
||||
def _init_data_struct(self):
|
||||
"""Generate a data dictionary (self._data) from metadata."""
|
||||
self._state = "DOOR_STATE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue