natekspencer / hacs-pura

Home Assistant integration for Pura smart fragrance diffusers
MIT License
18 stars 1 forks source link

[2024.3.0b0] Invalid supported color modes #44

Closed RobertD502 closed 6 months ago

RobertD502 commented 6 months ago

The problem

Seems that starting with HA 2024.3.0b0, HA starts to complain that the currently set supported color modes attribute (ColorMode.BRIGHTNESS, ColorMode.RGB) is invalid:

Logger: homeassistant.components.light
Source: components/light/__init__.py:1165
integration: Light (documentation, issues)
First occurred: 7:28:20 PM (3 occurrences)
Last logged: 7:28:20 PM

None (<class 'custom_components.pura.light.PuraLightEntity'>) sets invalid supported color modes {<ColorMode.RGB: 'rgb'>, <ColorMode.BRIGHTNESS: 'brightness'>}, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/natekspencer/hacs-pura/issues

I read through the light entity documentation and can't seem to discern what exactly is wrong about the currently set supported modes.

What version of Home Assistant Core are you running?

2024.3.0b0

What was the last working version of Home Assistant Core?

2024.2.x

Diagnostics information

No response

Anything in the logs that might be useful?

No response

Additional information

No response

natekspencer commented 6 months ago

Looks like ColorMode.RGB inherently supports brightness, so the issue is the inclusion of ColorMode.Brightness in the set. I'll get that adjusted shortly.

RobertD502 commented 6 months ago

Ah, yup that's it! I thought that may be the case and removed brightness, but forgot to keep RGB in a set and instead just used ColorMode.RGB. Putting it in a set fixed it.

natekspencer commented 6 months ago

Release 0.1.22 adjusts this