I reworked my yaml.
- command_topic: "dummy"
<<: &anchor
platform: "mqtt"
qos: 2
retain: true
availability_topic: "zigbee2mqtt/bridge/state"
brightness: true
schema: "json"
brightness_scale: 254
color_mode: true
supported_color_modes:
- "xy"
- "color_temp"
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
- name: "Rob Ledstrip test"
unique_id: innr_ledstrip_rob
command_topic: "zigbee2mqtt/ledstrip/bureautest/set"
state_topic: "zigbee2mqtt/ledstrip/test/state"
<<: *anchor
When I look into a json representation of this yaml, it looks correct but HA does not add unique_id: innr_ledstrip_rob.
It now produces an array which was not the case in my previous yaml.
JSON:
[
{
"command_topic": "dummy",
"platform": "mqtt",
"qos": 2,
"retain": true,
"availability_topic": "zigbee2mqtt/bridge/state",
"brightness": true,
"schema": "json",
"brightness_scale": 254,
"color_mode": true,
"supported_color_modes": [
"xy",
"color_temp"
],
"max_mireds": 500,
"min_mireds": 150,
"effect": true,
"effect_list": [
"blink",
"breathe",
"okay",
"channel_change",
"finish_effect",
"stop_effect"
]
},
{
"platform": "mqtt",
"name": "Rob Ledstrip test",
"unique_id": "innr_ledstrip_rob",
"command_topic": "zigbee2mqtt/ledstrip/bureautest/set",
"state_topic": "zigbee2mqtt/ledstrip/test/state",
"qos": 2,
"retain": true,
"availability_topic": "zigbee2mqtt/bridge/state",
"brightness": true,
"schema": "json",
"brightness_scale": 254,
"color_mode": true,
"supported_color_modes": [
"xy",
"color_temp"
],
"max_mireds": 500,
"min_mireds": 150,
"effect": true,
"effect_list": [
"blink",
"breathe",
"okay",
"channel_change",
"finish_effect",
"stop_effect"
]
}
]