Rename Light to LightEntity (#34593)
This commit is contained in:
parent
8402363568
commit
e4333a7a44
93 changed files with 248 additions and 191 deletions
|
@ -3,7 +3,11 @@ import logging
|
|||
|
||||
from pyhomeworks.pyhomeworks import HW_LIGHT_CHANGED
|
||||
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
SUPPORT_BRIGHTNESS,
|
||||
LightEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -28,7 +32,7 @@ def setup_platform(hass, config, add_entities, discover_info=None):
|
|||
add_entities(devs, True)
|
||||
|
||||
|
||||
class HomeworksLight(HomeworksDevice, Light):
|
||||
class HomeworksLight(HomeworksDevice, LightEntity):
|
||||
"""Homeworks Light."""
|
||||
|
||||
def __init__(self, controller, addr, name, rate):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue