Rename Light to LightEntity (#34593)

This commit is contained in:
Erik Montnemery authored and GitHub committed 2020-04-26 18:49:41 +02:00
1 parent 8402363568
commit e4333a7a44
93 files changed
+248 -191

No files matched your search

+12 -1
View File
@@ -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__,
)