ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.17k stars 160 forks source link

custom_components.smartthinq_sensors.light.LGELight does not set supported color modes, this will stop working #746

Closed SeanPM5 closed 5 months ago

SeanPM5 commented 6 months ago

Describe the bug When restarting Home Assistant, there is an error in the logs. which is related to the light entity from microwave.

Logger: homeassistant.components.light
Source: components/light/__init__.py:1267
integration: Light (documentation, issues)
First occurred: 12:42:36 AM (1 occurrences)
Last logged: 12:42:36 AM

None (<class 'custom_components.smartthinq_sensors.light.LGELight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/ollo69/ha-smartthinq-sensors/issues

Here is a blog post on HA Developers site about change and link to developer docs for light color mode. It seems that it's now required to specify ColorMode.ONOFF in supported_color_modes instead of leaving it blank.

Note: There is also a ColorMode.BRIGHTNESS but I don't know if that fits since you have to change brightness via effect. So I think ColorMode.ONOFF is most accurate for the microwave light.

Below is screenshot and state of the light entity from my microwave.

Screen Shot 2024-05-05 at 1 53 30 AM
light.microwave_light
Microwave Light
off
effect_list: LOW, HIGH
supported_color_modes: onoff
effect: null
color_mode: null
friendly_name: Microwave Light
supported_features: 4
icon: mdi:microwave

Environment details:

ollo69 commented 6 months ago

Thanks, this will be fixed with next release

ollo69 commented 5 months ago

Fixed in v0.39.2