I use this script in the lights.yaml for getting a Gledopto GL-C-007-2ID light controller into HA. This has endpoints for RGB and White and I am able to control them but what is the syntax for getting the state of these two endpoints?
I forgot to mention that I am on an old version of HA (0.103.6) I know!!
Anyway all my Z2M devices are configured in Yaml but none with more than one endpoint.
Maybe someone in here knows how to define the state topic for both in Yaml.
Probably not “Nobody” but I suspect it will be a small group of people that have a clear recollection of how a 6+ year old version of HA works - thats before my “HA Time”.
Current versions of HA and Z2M handle it automatically via auto-discovery, so it’s not necessary to know how to do it any more. As such there is no reason to spend any time figuring out how to do it in current HA versions - it’s not something I will ever need to do.
Even when I build my own MQTT integrations, I use auto-discovery instead of configuring via YAML.