Skip to content

Commit e4333a7

Browse files
authored
Rename Light to LightEntity (#34593)
1 parent 8402363 commit e4333a7

File tree

93 files changed

+248
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+248
-191
lines changed

homeassistant/components/abode/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
SUPPORT_BRIGHTNESS,
1111
SUPPORT_COLOR,
1212
SUPPORT_COLOR_TEMP,
13-
Light,
13+
LightEntity,
1414
)
1515
from homeassistant.util.color import (
1616
color_temperature_kelvin_to_mired,
@@ -33,7 +33,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
3333
async_add_entities(entities)
3434

3535

36-
class AbodeLight(AbodeDevice, Light):
36+
class AbodeLight(AbodeDevice, LightEntity):
3737
"""Representation of an Abode light."""
3838

3939
def turn_on(self, **kwargs):

homeassistant/components/ads/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ATTR_BRIGHTNESS,
88
PLATFORM_SCHEMA,
99
SUPPORT_BRIGHTNESS,
10-
Light,
10+
LightEntity,
1111
)
1212
from homeassistant.const import CONF_NAME
1313
import homeassistant.helpers.config_validation as cv
@@ -43,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
4343
add_entities([AdsLight(ads_hub, ads_var_enable, ads_var_brightness, name)])
4444

4545

46-
class AdsLight(AdsEntity, Light):
46+
class AdsLight(AdsEntity, LightEntity):
4747
"""Representation of ADS light."""
4848

4949
def __init__(self, ads_hub, ads_var_enable, ads_var_brightness, name):

homeassistant/components/avea/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ATTR_HS_COLOR,
99
SUPPORT_BRIGHTNESS,
1010
SUPPORT_COLOR,
11-
Light,
11+
LightEntity,
1212
)
1313
from homeassistant.exceptions import PlatformNotReady
1414
import homeassistant.util.color as color_util
@@ -31,7 +31,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
3131
add_entities(AveaLight(bulb) for bulb in nearby_bulbs)
3232

3333

34-
class AveaLight(Light):
34+
class AveaLight(LightEntity):
3535
"""Representation of an Avea."""
3636

3737
def __init__(self, light):

homeassistant/components/avion/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ATTR_BRIGHTNESS,
1010
PLATFORM_SCHEMA,
1111
SUPPORT_BRIGHTNESS,
12-
Light,
12+
LightEntity,
1313
)
1414
from homeassistant.const import (
1515
CONF_API_KEY,
@@ -66,7 +66,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
6666
add_entities(lights)
6767

6868

69-
class AvionLight(Light):
69+
class AvionLight(LightEntity):
7070
"""Representation of an Avion light."""
7171

7272
def __init__(self, device):

homeassistant/components/blinksticklight/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
PLATFORM_SCHEMA,
1111
SUPPORT_BRIGHTNESS,
1212
SUPPORT_COLOR,
13-
Light,
13+
LightEntity,
1414
)
1515
from homeassistant.const import CONF_NAME
1616
import homeassistant.helpers.config_validation as cv
@@ -43,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
4343
add_entities([BlinkStickLight(stick, name)], True)
4444

4545

46-
class BlinkStickLight(Light):
46+
class BlinkStickLight(LightEntity):
4747
"""Representation of a BlinkStick light."""
4848

4949
def __init__(self, stick, name):

homeassistant/components/blinkt/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
PLATFORM_SCHEMA,
1111
SUPPORT_BRIGHTNESS,
1212
SUPPORT_COLOR,
13-
Light,
13+
LightEntity,
1414
)
1515
from homeassistant.const import CONF_NAME
1616
import homeassistant.helpers.config_validation as cv
@@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
4242
)
4343

4444

45-
class BlinktLight(Light):
45+
class BlinktLight(LightEntity):
4646
"""Representation of a Blinkt! Light."""
4747

4848
def __init__(self, blinkt, name, index):

homeassistant/components/deconz/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
SUPPORT_EFFECT,
1616
SUPPORT_FLASH,
1717
SUPPORT_TRANSITION,
18-
Light,
18+
LightEntity,
1919
)
2020
from homeassistant.core import callback
2121
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@@ -82,7 +82,7 @@ def async_add_group(groups):
8282
async_add_group(gateway.api.groups.values())
8383

8484

85-
class DeconzLight(DeconzDevice, Light):
85+
class DeconzLight(DeconzDevice, LightEntity):
8686
"""Representation of a deCONZ light."""
8787

8888
def __init__(self, device, gateway):

homeassistant/components/decora/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ATTR_BRIGHTNESS,
1313
PLATFORM_SCHEMA,
1414
SUPPORT_BRIGHTNESS,
15-
Light,
15+
LightEntity,
1616
)
1717
from homeassistant.const import CONF_API_KEY, CONF_DEVICES, CONF_NAME
1818
import homeassistant.helpers.config_validation as cv
@@ -84,7 +84,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
8484
add_entities(lights)
8585

8686

87-
class DecoraLight(Light):
87+
class DecoraLight(LightEntity):
8888
"""Representation of an Decora light."""
8989

9090
def __init__(self, device):

homeassistant/components/decora_wifi/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
PLATFORM_SCHEMA,
1616
SUPPORT_BRIGHTNESS,
1717
SUPPORT_TRANSITION,
18-
Light,
18+
LightEntity,
1919
)
2020
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP
2121
import homeassistant.helpers.config_validation as cv
@@ -80,7 +80,7 @@ def logout(event):
8080
hass.bus.listen(EVENT_HOMEASSISTANT_STOP, logout)
8181

8282

83-
class DecoraWifiLight(Light):
83+
class DecoraWifiLight(LightEntity):
8484
"""Representation of a Decora WiFi switch."""
8585

8686
def __init__(self, switch):

homeassistant/components/demo/light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
SUPPORT_COLOR_TEMP,
1313
SUPPORT_EFFECT,
1414
SUPPORT_WHITE_VALUE,
15-
Light,
15+
LightEntity,
1616
)
1717

1818
from . import DOMAIN
@@ -57,7 +57,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
5757
await async_setup_platform(hass, {}, async_add_entities)
5858

5959

60-
class DemoLight(Light):
60+
class DemoLight(LightEntity):
6161
"""Representation of a demo light."""
6262

6363
def __init__(

0 commit comments

Comments
 (0)