I am a bit lost between unique_id
, friendly_name
, name
and maybe entity_id
.
I defined a light as
light:
- friendly_name: "bureau"
id: ch1_lampe_bureau
platform: mqtt
state_topic: "ch1-lampe-bureau/relay/0"
command_topic: "ch1-lampe-bureau/relay/0/set"
payload_on: 1
payload_off: 0
I would like this light to be seen as bureau
in the UI and address its state via light.ch1_lampe_bureau
.
This does not work:
- the UI shows it as
MQTT Light
- it is not addressable via
light.ch1_lampe_bureau
No errors are raised in the logs, though.
After repeated experiences, I ended up with
light:
- name: "bureau"
platform: mqtt
state_topic: "ch1-lampe-bureau/relay/0"
command_topic: "ch1-lampe-bureau/relay/0/set"
payload_on: 1
payload_off: 0
which provides bureau
in the UI and let me call this light via light.bureau
. The latter is not good (not descriptive enough and there may be more “bureau” in various rooms). I also noted that if I set name: lampe bureau
, an unique id is calculated: light.lampe_bureau
.
Is there a way to achieve
I would like this light to be seen as
bureau
in the UI and address its state vialight.ch1_lampe_bureau
.