mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Migrate rpi_gpio_pwm to extend LightEntity instead of Light (#36028)
This commit is contained in:
parent
04cfd36d06
commit
cda2da62cf
@ -17,7 +17,7 @@ from homeassistant.components.light import (
|
|||||||
SUPPORT_BRIGHTNESS,
|
SUPPORT_BRIGHTNESS,
|
||||||
SUPPORT_COLOR,
|
SUPPORT_COLOR,
|
||||||
SUPPORT_TRANSITION,
|
SUPPORT_TRANSITION,
|
||||||
Light,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_ADDRESS, CONF_HOST, CONF_NAME, CONF_TYPE, STATE_ON
|
from homeassistant.const import CONF_ADDRESS, CONF_HOST, CONF_NAME, CONF_TYPE, STATE_ON
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
@ -104,7 +104,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
add_entities(leds)
|
add_entities(leds)
|
||||||
|
|
||||||
|
|
||||||
class PwmSimpleLed(Light, RestoreEntity):
|
class PwmSimpleLed(LightEntity, RestoreEntity):
|
||||||
"""Representation of a simple one-color PWM LED."""
|
"""Representation of a simple one-color PWM LED."""
|
||||||
|
|
||||||
def __init__(self, led, name):
|
def __init__(self, led, name):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user