ha-smartthinq-sensors icon indicating copy to clipboard operation
ha-smartthinq-sensors copied to clipboard

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

Open SeanPM5 opened this issue 9 months ago • 1 comments

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:

  • Environment (HASSIO, Raspbian, etc): Home Assistant OS
  • Home Assistant version installed: 2024.5.1
  • Component version installed: 0.39.1
  • Last know working version: n/a
  • LG device type and model with issue: WMVEL2137-MicrowaveOven (MICROWAVE) by LG Firmware: clip_ble_v1.9.198

SeanPM5 avatar May 05 '24 06:05 SeanPM5

Thanks, this will be fixed with next release

ollo69 avatar May 06 '24 00:05 ollo69

Fixed in v0.39.2

ollo69 avatar Jun 05 '24 22:06 ollo69