Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/abode/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
Light,
LightEntity,
)
from homeassistant.util.color import (
color_temperature_kelvin_to_mired,
Expand All @@ -33,7 +33,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities)


class AbodeLight(AbodeDevice, Light):
class AbodeLight(AbodeDevice, LightEntity):
"""Representation of an Abode light."""

def turn_on(self, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/ads/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -43,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([AdsLight(ads_hub, ads_var_enable, ads_var_brightness, name)])


class AdsLight(AdsEntity, Light):
class AdsLight(AdsEntity, LightEntity):
"""Representation of ADS light."""

def __init__(self, ads_hub, ads_var_enable, ads_var_brightness, name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/avea/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
Light,
LightEntity,
)
from homeassistant.exceptions import PlatformNotReady
import homeassistant.util.color as color_util
Expand All @@ -31,7 +31,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(AveaLight(bulb) for bulb in nearby_bulbs)


class AveaLight(Light):
class AveaLight(LightEntity):
"""Representation of an Avea."""

def __init__(self, light):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/avion/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import (
CONF_API_KEY,
Expand Down Expand Up @@ -66,7 +66,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(lights)


class AvionLight(Light):
class AvionLight(LightEntity):
"""Representation of an Avion light."""

def __init__(self, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/blinksticklight/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
Light,
LightEntity,
)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -43,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([BlinkStickLight(stick, name)], True)


class BlinkStickLight(Light):
class BlinkStickLight(LightEntity):
"""Representation of a BlinkStick light."""

def __init__(self, stick, name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/blinkt/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
Light,
LightEntity,
)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
)


class BlinktLight(Light):
class BlinktLight(LightEntity):
"""Representation of a Blinkt! Light."""

def __init__(self, blinkt, name, index):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/deconz/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
SUPPORT_EFFECT,
SUPPORT_FLASH,
SUPPORT_TRANSITION,
Light,
LightEntity,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
Expand Down Expand Up @@ -82,7 +82,7 @@ def async_add_group(groups):
async_add_group(gateway.api.groups.values())


class DeconzLight(DeconzDevice, Light):
class DeconzLight(DeconzDevice, LightEntity):
"""Representation of a deCONZ light."""

def __init__(self, device, gateway):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/decora/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_API_KEY, CONF_DEVICES, CONF_NAME
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -84,7 +84,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(lights)


class DecoraLight(Light):
class DecoraLight(LightEntity):
"""Representation of an Decora light."""

def __init__(self, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/decora_wifi/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_TRANSITION,
Light,
LightEntity,
)
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -80,7 +80,7 @@ def logout(event):
hass.bus.listen(EVENT_HOMEASSISTANT_STOP, logout)


class DecoraWifiLight(Light):
class DecoraWifiLight(LightEntity):
"""Representation of a Decora WiFi switch."""

def __init__(self, switch):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/demo/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
SUPPORT_COLOR_TEMP,
SUPPORT_EFFECT,
SUPPORT_WHITE_VALUE,
Light,
LightEntity,
)

from . import DOMAIN
Expand Down Expand Up @@ -57,7 +57,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
await async_setup_platform(hass, {}, async_add_entities)


class DemoLight(Light):
class DemoLight(LightEntity):
"""Representation of a demo light."""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/dynalite/light.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Support for Dynalite channels as lights."""
from typing import Callable

from homeassistant.components.light import SUPPORT_BRIGHTNESS, Light
from homeassistant.components.light import SUPPORT_BRIGHTNESS, LightEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant

Expand All @@ -18,7 +18,7 @@ async def async_setup_entry(
)


class DynaliteLight(DynaliteBase, Light):
class DynaliteLight(DynaliteBase, LightEntity):
"""Representation of a Dynalite Channel as a Home Assistant Light."""

@property
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/elgato/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ATTR_COLOR_TEMP,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR_TEMP,
Light,
LightEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_NAME
Expand Down Expand Up @@ -45,7 +45,7 @@ async def async_setup_entry(
async_add_entities([ElgatoLight(entry.entry_id, elgato, info)], True)


class ElgatoLight(Light):
class ElgatoLight(LightEntity):
"""Defines a Elgato Key Light."""

def __init__(
Expand Down
8 changes: 6 additions & 2 deletions homeassistant/components/elkm1/light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""Support for control of ElkM1 lighting (X10, UPB, etc)."""

from homeassistant.components.light import ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
SUPPORT_BRIGHTNESS,
LightEntity,
)

from . import ElkEntity, create_elk_entities
from .const import DOMAIN
Expand All @@ -15,7 +19,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities, True)


class ElkLight(ElkEntity, Light):
class ElkLight(ElkEntity, LightEntity):
"""Representation of an Elk lighting device."""

def __init__(self, element, elk, elk_data):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/enocean/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_ID, CONF_NAME
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -39,7 +39,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([EnOceanLight(sender_id, dev_id, dev_name)])


class EnOceanLight(enocean.EnOceanDevice, Light):
class EnOceanLight(enocean.EnOceanDevice, LightEntity):
"""Representation of an EnOcean light source."""

def __init__(self, sender_id, dev_id, dev_name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/esphome/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SUPPORT_FLASH,
SUPPORT_TRANSITION,
SUPPORT_WHITE_VALUE,
Light,
LightEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.typing import HomeAssistantType
Expand Down Expand Up @@ -50,7 +50,7 @@ async def async_setup_entry(
)


class EsphomeLight(EsphomeEntity, Light):
class EsphomeLight(EsphomeEntity, LightEntity):
"""A switch implementation for ESPHome."""

@property
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/eufy/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
Light,
LightEntity,
)
import homeassistant.util.color as color_util
from homeassistant.util.color import (
Expand All @@ -31,7 +31,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([EufyLight(discovery_info)], True)


class EufyLight(Light):
class EufyLight(LightEntity):
"""Representation of a Eufy light."""

def __init__(self, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/everlights/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_EFFECT,
Light,
LightEntity,
)
from homeassistant.const import CONF_HOSTS
from homeassistant.exceptions import PlatformNotReady
Expand Down Expand Up @@ -65,7 +65,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities(lights)


class EverLightsLight(Light):
class EverLightsLight(LightEntity):
"""Representation of a Flux light."""

def __init__(self, api, channel, status, effects):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/fibaro/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_WHITE_VALUE,
Light,
LightEntity,
)
from homeassistant.const import CONF_WHITE_VALUE
import homeassistant.util.color as color_util
Expand Down Expand Up @@ -48,7 +48,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
)


class FibaroLight(FibaroDevice, Light):
class FibaroLight(FibaroDevice, LightEntity):
"""Representation of a Fibaro Light, including dimmable."""

def __init__(self, fibaro_device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/flux_led/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SUPPORT_COLOR_TEMP,
SUPPORT_EFFECT,
SUPPORT_WHITE_VALUE,
Light,
LightEntity,
)
from homeassistant.const import ATTR_MODE, CONF_DEVICES, CONF_NAME, CONF_PROTOCOL
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -176,7 +176,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(lights, True)


class FluxLight(Light):
class FluxLight(LightEntity):
"""Representation of a Flux light."""

def __init__(self, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/futurenow/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_DEVICES, CONF_HOST, CONF_NAME, CONF_PORT
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -64,7 +64,7 @@ def to_hass_level(level):
return int((level * 255) / 100)


class FutureNowLight(Light):
class FutureNowLight(LightEntity):
"""Representation of an FutureNow light."""

def __init__(self, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/greenwave/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
Light,
LightEntity,
)
from homeassistant.const import CONF_HOST
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -54,7 +54,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
)


class GreenwaveLight(Light):
class GreenwaveLight(LightEntity):
"""Representation of an Greenwave Reality Light."""

def __init__(self, light, host, token, gatewaydata):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/group/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def async_setup_platform(
)


class LightGroup(light.Light):
class LightGroup(light.LightEntity):
"""Representation of a light group."""

def __init__(self, name: str, entity_ids: List[str]) -> None:
Expand Down
Loading