[solved] How to migrate MQTT Light to Lovelace?

Hi *,

I have a question according to migrating to Lovelace.
I upgraded homassistant and I am trying to get my Lovelace UI working in YAML mode.

I could configure Lovelace GUI according to my needs - except the mqtt Light.

In my configuration.yaml it is defined like this:

light:
  • platform: mqtt
    name: “Jonas Lampe”
    state_topic: “jonas/light/status”
    command_topic: “jonas/light/switch”
    brightness_state_topic: ‘jonas/light/brightness/status’
    brightness_command_topic: ‘jonas/light/brightness/set’
    brightness_scale: 100
    rgb_state_topic: ‘jonas/light/rgb/status’
    rgb_command_topic: ‘jonas/light/rgb/set’
    qos: 0
    payload_on: “ON”
    payload_off: “OFF”
    optimistic: false

When I try to get it into the Lovelace GUI like this in ui-lovelace.yaml within cards:

type: light
entity: mqtt.light

The card is shown, but only contains this error:

Specify an entity from within the light domain.
{
“type”: “light”,
“entity”: “mqtt.light”
}

I have really no idea, how to get this working in Lovelace UI. It works perfect in the old UI.

Perhaps someone can help me?

replace
entity: mqtt.light
with
entity: light.jonas_lampe

Thanks! That works.

1 Like