Hello,
I am using MQTT discovery for my custom made controllers, using Arduinos and Raspi’s to have them show up automagically in HA.
For instance, a switch is configured in MQTT as:
{"name":"Verwarming","uniq_id":"meterkast_switch1","stat_t":"domus/meterkast/stat/relay","cmd_t":"domus/meterkast/in","pl_on":"R01","pl_off":"R00","stat_on":"on","stat_off":"off","val_tpl":"{{value_json.POWER0}}","dev":{"ids":["domus_meterkast"],"cns":[["ip","192.168.178.31"],["mac","00:01:02:03:05:0B"]],"name":"Domus Kolkrijst Meterkast","mdl":"Mega 2560","mf":"Arduino","sw":"2023.07.28-1(2023.07.28-1)"}}
This works fine, and I also have some scenes I configured this way.
The problem is, when I configure a scene, the ‘device’ keys are not used, the scene is not shown as part of the device where the other item (switches, lights, etc.) are shown, and I can’t see why.
If I send this config to HA via MQTT:
{"name": "Classic FM", "uniq_id": "classic_fm", "avty_t": "domus/pitop/availability/station", "pl_avail": "online", "pl_not_avail": "offline", "cmd_t": "cmnd/pitop/station", "payload_on": "classic_fm", "dev": {"name": "Domus Pi-Top", "mdl": "Raspberry Pi 3 Model B Rev 1.2", "mf": "Raspberry Pi", "ids": ["domus_pitop"], "cns": [["ip", "192.168.178.127"], ["mac", "b8:27:eb:cc:5e:74"]]}}
The scene is visible and working, but all the device info is not used.
I saw some conflicting documentation on this:
-
on MQTT Scene - Home Assistant it is noted that the ‘device’ keys can be used,
-
but on this topic ‘Mqtt scene config/discovery from addon not working’ it is said that the ‘device’ key is not supported.
Does anybody has any ideas? Is this a bug, or am I forgetting something?