New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISY994 Lights not showing dimmer slide in 0.36.1 #5428
Comments
@Teagan42 @rmkraus @fabaff @randellhodges @OverloadUT Any of you try the latest release and observe the same? |
@jbcodemonkey could you go to /dev-state and paste here all the attributes of this device? Is this light/isy994.py ? |
A change I have done for light UI in 36.x was to show the brightness slider if the device supports it via |
Yes, light/isy994.py Attributes for light.1dr_floods: |
In light/isy994.py, there is:
|
Found the bug: @property
def state_attributes(self):
"""Flag supported attributes."""
return {ATTR_BRIGHTNESS: self.value} in @property
def state_attributes(self):
"""Return optional state attributes."""
data = {}
if self.is_on:
for prop, attr in PROP_TO_ATTR.items():
value = getattr(self, prop)
if value is not None:
data[attr] = value
if ATTR_RGB_COLOR not in data and ATTR_XY_COLOR in data and \
ATTR_BRIGHTNESS in data:
data[ATTR_RGB_COLOR] = color_util.color_xy_brightness_to_RGB(
data[ATTR_XY_COLOR][0], data[ATTR_XY_COLOR][1],
data[ATTR_BRIGHTNESS])
else:
data[ATTR_SUPPORTED_FEATURES] = self.supported_features
return data |
Created a Fix PR |
@jbcodemonkey Your feedback is required on the fix PR |
The ISY component included an ISYDevice base class that is used by all of the isy994 platforms. This still overwrote the state_attributes property instead of the more appropriate device_state_attributes property. This was also repeated in the isy994 light platform. Both of these were addressed. This also fixes issue #5428.
Hijacked @andrey-git's PR like a pirate. ☠️ |
Tested with commit from 5433, works again. Thank you!! |
* Updated ISY component to not overwrite state_attributes. The ISY component included an ISYDevice base class that is used by all of the isy994 platforms. This still overwrote the state_attributes property instead of the more appropriate device_state_attributes property. This was also repeated in the isy994 light platform. Both of these were addressed. This also fixes issue #5428. * Removed custom state attributes from ISY lights. The brightness attribute need not be manually reported by the isy994 light platform. * Removed ISY Node cleanup. The ISY entities don’t really need to unsubscribe themselves while hass is shutting down. Because these updates are not sent in a thread, there is no negative impact from shutting down without unsubscribing. This greatly speeds up hass shutdown. * Removed unused attribute from isy994 light platform. * Cleaned up ISY994 light entity class. 1) Removed the state property. This property is set in the Entity base class and shouldn’t be overridden here. 2) Set the brightness property. This is the proper way of setting the brightness for the Light base class. 3) Removed properties that are now unused because of these changes.
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.36.1
Python release (
python3 --version
):3.5.2+
Component/platform:
ISY
Description of problem:
ISY imported Lights do not show brightness slider below journal chart. Instead a dropdown labelled 'Effect' is in its place.
Expected:
Rolling back to 0.35.3 restored functionality.
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info:
The text was updated successfully, but these errors were encountered: