mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
add dimmer slide control to imported isy lights (#4152)
Supported attribute added and checks appear to pass. 🐬
This commit is contained in:
parent
18e965c3cd
commit
a3db0ec231
@ -7,7 +7,8 @@ https://home-assistant.io/components/light.isy994/
|
||||
import logging
|
||||
from typing import Callable
|
||||
|
||||
from homeassistant.components.light import Light, SUPPORT_BRIGHTNESS
|
||||
from homeassistant.components.light import (
|
||||
Light, SUPPORT_BRIGHTNESS, ATTR_BRIGHTNESS)
|
||||
import homeassistant.components.isy994 as isy
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNKNOWN
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
@ -68,6 +69,11 @@ class ISYLightDevice(isy.ISYDevice, Light):
|
||||
if not self._node.on(val=brightness):
|
||||
_LOGGER.debug('Unable to turn on light.')
|
||||
|
||||
@property
|
||||
def state_attributes(self):
|
||||
"""Flag supported attributes."""
|
||||
return {ATTR_BRIGHTNESS: self.value}
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Flag supported features."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user