Migrate rpi_gpio_pwm to extend LightEntity instead of Light (#36028)

This commit is contained in:
Sören Oldag 2020-05-23 14:09:59 +02:00 committed by GitHub
parent 04cfd36d06
commit cda2da62cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ from homeassistant.components.light import (
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_TRANSITION,
Light,
LightEntity,
)
from homeassistant.const import CONF_ADDRESS, CONF_HOST, CONF_NAME, CONF_TYPE, STATE_ON
import homeassistant.helpers.config_validation as cv
@ -104,7 +104,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(leds)
class PwmSimpleLed(Light, RestoreEntity):
class PwmSimpleLed(LightEntity, RestoreEntity):
"""Representation of a simple one-color PWM LED."""
def __init__(self, led, name):