Rename Light to LightEntity (#477)

* Rename Light to LightEntity

* Add link to base class

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Erik Montnemery 2020-05-01 22:58:53 +02:00 committed by GitHub
parent 4d70f3424e
commit ff435a269f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ sidebar_label: Light
---
A light entity is a device that controls the brightness, RGB value,color temperature and effects of a light source.
A light entity controls the brightness, hue and saturation color value, white value, color temperature and effects of a light source. Derive platform entities from [`homeassistant.components.light.LightEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/light/__init__.py).
## Properties
@ -38,7 +38,7 @@ A light entity is a device that controls the brightness, RGB value,color tempera
# Turn on Light Device
```python
class MyLightDevice(LightDevice):
class MyLightEntity(LightEntity):
def turn_on(self, **kwargs):
"""Turn the device on."""
@ -49,7 +49,7 @@ class MyLightDevice(LightDevice):
# Turn Off Light Device
```python
class MyLightDevice(LightDevice):
class MyLightEntity(LightEntity):
def turn_off(self, **kwargs):
"""Turn the device off."""