From e7cb5ce284d40399894004526d39b52354ac141e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 25 Apr 2020 09:07:31 +0200 Subject: [PATCH 1/3] Rename Light to LightEntity --- docs/entity_light.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/entity_light.md b/docs/entity_light.md index 05ff8119e6d..4ebd499424c 100644 --- a/docs/entity_light.md +++ b/docs/entity_light.md @@ -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 MyLightDevice(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 MyLightDevice(LightEntity): def turn_off(self, **kwargs): """Turn the device off.""" From 4b1be8bea1c1df2c0124766c020b812baa1032b0 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 25 Apr 2020 09:37:21 +0200 Subject: [PATCH 2/3] Add link to base class --- docs/entity_light.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/entity_light.md b/docs/entity_light.md index 4ebd499424c..1b70cc0558d 100644 --- a/docs/entity_light.md +++ b/docs/entity_light.md @@ -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, RGB value,color temperature and effects of a light source. Derive entity platforms from [`homeassistant.components.light.LightEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/light/__init__.py). ## Properties From ff87c9146fc68b24ffdcf7377ef0c7af7616a3f2 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Sun, 26 Apr 2020 02:22:50 +0200 Subject: [PATCH 3/3] Apply suggestions from code review --- docs/entity_light.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/entity_light.md b/docs/entity_light.md index 1b70cc0558d..eec064180dc 100644 --- a/docs/entity_light.md +++ b/docs/entity_light.md @@ -4,7 +4,7 @@ sidebar_label: Light --- -A light entity controls the brightness, RGB value,color temperature and effects of a light source. Derive entity platforms from [`homeassistant.components.light.LightEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/light/__init__.py). +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 controls the brightness, RGB value,color temperature and effects # Turn on Light Device ```python -class MyLightDevice(LightEntity): +class MyLightEntity(LightEntity): def turn_on(self, **kwargs): """Turn the device on.""" @@ -49,7 +49,7 @@ class MyLightDevice(LightEntity): # Turn Off Light Device ```python -class MyLightDevice(LightEntity): +class MyLightEntity(LightEntity): def turn_off(self, **kwargs): """Turn the device off."""