mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
LiteJet: Lights should have the option to dim in the UI. (#6031)
* LiteJet: Lights should have the option to dim in the UI. * Fix lint error.
This commit is contained in:
parent
0f1a254f3b
commit
9c176ad85a
@ -7,7 +7,8 @@ https://home-assistant.io/components/light.litejet/
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import homeassistant.components.litejet as litejet
|
import homeassistant.components.litejet as litejet
|
||||||
from homeassistant.components.light import ATTR_BRIGHTNESS, Light
|
from homeassistant.components.light import (
|
||||||
|
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light)
|
||||||
|
|
||||||
DEPENDENCIES = ['litejet']
|
DEPENDENCIES = ['litejet']
|
||||||
|
|
||||||
@ -49,6 +50,11 @@ class LiteJetLight(Light):
|
|||||||
_LOGGER.debug("Updating due to notification for %s", self._name)
|
_LOGGER.debug("Updating due to notification for %s", self._name)
|
||||||
self._hass.async_add_job(self.async_update_ha_state(True))
|
self._hass.async_add_job(self.async_update_ha_state(True))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def supported_features(self):
|
||||||
|
"""Flag supported features."""
|
||||||
|
return SUPPORT_BRIGHTNESS
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""The light's name."""
|
"""The light's name."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user