Rename Light to LightEntity (#34593)
This commit is contained in:
1 parent
8402363568
commit
e4333a7a44
93 files changed
+248
-191
No files matched your search
@@ -332,7 +332,7 @@ class Profiles:
|
||||
return None
|
||||
|
||||
|
||||
class Light(ToggleEntity):
|
||||
class LightEntity(ToggleEntity):
|
||||
"""Representation of a light."""
|
||||
|
||||
@property
|
||||
@@ -428,3 +428,14 @@ class Light(ToggleEntity):
|
||||
def supported_features(self):
|
||||
"""Flag supported features."""
|
||||
return 0
|
||||
|
||||
|
||||
class Light(LightEntity):
|
||||
"""Representation of a light (for backwards compatibility)."""
|
||||
|
||||
def __init_subclass__(cls, **kwargs):
|
||||
"""Print deprecation warning."""
|
||||
super().__init_subclass__(**kwargs)
|
||||
_LOGGER.warning(
|
||||
"Light is deprecated, modify %s to extend LightEntity", cls.__name__,
|
||||
)
|
||||
Reference in new issue
Block a user