Clean up default ZHA entity names (#91841)
* Always use `Light` for lights, including subclasses * Clean up other platforms * Add a unit test to ensure all future entity classes have names * Remove stale `_name` * Address review feedback and rename `Open` to `Opening`
This commit is contained in:
parent
da05763a5c
commit
6842cdcb65
18 changed files with 180 additions and 79 deletions
|
@ -71,6 +71,8 @@ async def async_setup_entry(
|
|||
class ZhaCover(ZhaEntity, CoverEntity):
|
||||
"""Representation of a ZHA cover."""
|
||||
|
||||
_attr_name: str = "Cover"
|
||||
|
||||
def __init__(self, unique_id, zha_device, cluster_handlers, **kwargs):
|
||||
"""Init this sensor."""
|
||||
super().__init__(unique_id, zha_device, cluster_handlers, **kwargs)
|
||||
|
@ -197,6 +199,7 @@ class Shade(ZhaEntity, CoverEntity):
|
|||
"""ZHA Shade."""
|
||||
|
||||
_attr_device_class = CoverDeviceClass.SHADE
|
||||
_attr_name: str = "Shade"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -308,6 +311,8 @@ class Shade(ZhaEntity, CoverEntity):
|
|||
class KeenVent(Shade):
|
||||
"""Keen vent cover."""
|
||||
|
||||
_attr_name: str = "Keen vent"
|
||||
|
||||
_attr_device_class = CoverDeviceClass.DAMPER
|
||||
|
||||
async def async_open_cover(self, **kwargs: Any) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue