MQTT Invalid color mode received

hello
i have non stop log: Invalid color mode received
this is in my logs:

Logger: homeassistant.components.mqtt.light.schema_json
Source: components/mqtt/light/schema_json.py:247
Integration: MQTT (documentation, issues)
First occurred: 8 juin 2021, 16:32:41 (62 occurrences)
Last logged: 8 juin 2021, 23:54:26

can u help me ?

Not without a lot more information. Are your mqtt lights discovered or defined manually in yaml?

If yaml, what is your configuration for the lights?

What make and model of lights?

hello
lights are from zigbee2mqtt mijia ZNLDP12LM
i m use the last release of mqtt zigbee2mqtt and homeassistant.
i think it happen since 2021.6 version
my yaml:

 platform: group
  name: lumieres etage
  entities:
    - light.lampe1_light
- platform: group
  name: lumieres cuisine
  entities:
    - light.lampe2_light
    - light.lampe3_light
- platform: group
  name: lumieresX
  entities:
    - light.lampe1_light
    - light.lampe2_light
    - light.lampe3_light

MQTT :

{
  "availability": [
    {
      "topic": "zigbee2mqtt/bridge/state"
    },
    {
      "topic": "zigbee2mqtt/lampe3/availability"
    }
  ],
  "brightness": true,
  "brightness_scale": 254,
  "color_mode": true,
  "command_topic": "zigbee2mqtt/lampe3/set",
  "device": {
    "identifiers": [
      "zigbee2mqtt_0x00158d0004850447"
    ],
    "manufacturer": "Xiaomi",
    "model": "Aqara smart LED bulb (ZNLDP12LM)",
    "name": "lampe3",
    "sw_version": "Zigbee2MQTT 1.19.1"
  },
  "effect": true,
  "effect_list": [
    "blink",
    "breathe",
    "okay",
    "channel_change",
    "finish_effect",
    "stop_effect"
  ],
  "json_attributes_topic": "zigbee2mqtt/lampe3",
  "max_mireds": 500,
  "min_mireds": 150,
  "name": "lampe3",
  "schema": "json",
  "state_topic": "zigbee2mqtt/lampe3",
  "supported_color_modes": [
    "color_temp"
  ],
  "unique_id": "0x00158d0004850447_light_zigbee2mqtt"
}

zigbee2mqtt:

MQTT publish: topic 'zigbee2mqtt/lampe3', payload '{"brightness":115,"color_mode":"xy","color_temp":239,"linkquality":99,"power_outage_memory":null,"state":"ON","update":{"state":"idle"},"update_available":false}'

i saw this in 2021.5 version:

thank you

Hmm, interesting, got the same error. Newest version of HA and Z2MQTT, with Mosquito as MQTT, did you already find a solution?

no and the response from koenkk was:

:thinking:

Purely from a code perspective, Z2T sends

"color_mode":"xy"

While the HA config says:

  "supported_color_modes": [
    "color_temp"
  ],

hence the error

I donā€™t have MQTT lights, so I donā€™t know how you configure supported_color_modes

As ZNLDP12LM is non color lamp, and ā€œxyā€ is color mode, that would lead to a Z2T bug or misconfiguration

i tryied to

filtered_optimistic: ["color_mode"]

in zigbee2mqtt configuration.yaml but it did nothing. color_mode still there
so i removed the log,ā€¦with the logger .

hassio config.yaml:

logger: 
  default: warning
  logs:
    homeassistant.components.mqtt.light.schema_json: critical

but , itā€™s dirty.

any news to this? I have the same ā€œspamā€ in the log file using zigbee2mqtt with mosquitto and HA.

unfortunately setting availability_timeout to 0 does not helpā€¦ still getting a lot of these messages :frowning:

hi, i do not have any more my bads logs.
iā€™m on 2021.8.0 and latest zigbee2mqtt.
you havnā€™t the same error.

2021-08-10 08:44:26 WARNING (MainThread) [homeassistant.components.mqtt.light.schema_json] Invalid or incomplete color value received

this about color value not about color_mode
i think you should open another thread

1 Like

@tomdudu38 sh*** you are right, completely overread this difference :slight_smile:

I just installed some Hue (RGB) lights and are getting the same error messages. No solution yet I guess?

Still nothing? I get this as well.

Zigbee2mqtt configuration.yaml:

'0x00xxxxxx'
filtered_attributes: ["color_mode"]
1 Like

Well, this made it worse. I get (in addition) this error:

Exception in state_received when handling msg on 'zigbee2mqtt/LED Sofa': '{"brightness":254,"color":{"h":34,"hue":34,"s":74,"saturation":74,"x":0.4348,"y":0.4033},"color_temp":330,"color_temp_startup":65535,"level_config":{"on_level":"previous"},"linkquality":255,"state":"OFF"}' Traceback (most recent call last): File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/components/mqtt/debug_info.py", line 47, in wrapper msg_callback(msg) File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/components/mqtt/light/schema_json.py", line 333, in state_received self._update_color(values) File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/components/mqtt/light/schema_json.py", line 271, in _update_color color_mode = values["color_mode"] KeyError: 'color_mode'

Hello! Did you ever fix this? Iā€™m seeing the exact same error on my hass now, using Hue color bulbs.

Yeah im also seeing this. Mostly with my Hue lightstrip.

Same issue here with two hue bulbs (LTW012) which just support color_temp and not xy.
Is ignoring logger ā€œhomeassistant.components.mqtt.light.schema_jsonā€ the only way to get rid of those messages?

thx

Iā€™m using Z2M, had two HUE bulps and a HUE strip, both with the same ā€˜faultā€™
In Setting (specific) set color sync to true.
Problem solved :slight_smile:

1 Like