I would like to collect my ESPresense devices and sensors in the same group in the default UI (the one that comes when you haven’t defined any custom UI’s). I tried this, which doesn’t work:
So obviously I can’t put the area in the sensor. But at the same time I can’t change anything in the UI, there are no options for that. So is it possible in any way?
No, can’t. Sensors that are defined in configuration.yaml does not have a device, it seems. If they did, it wouldn’t be a problem. I do know how to set the area of devices.
Invalid config for [sensor.mqtt_room]: [unique_id] is an invalid option for [sensor.mqtt_room]. Check: sensor.mqtt_room->unique_id. (See /home/homeassistant/.homeassistant/configuration.yaml, line 9). Please check the docs at MQTT room presence - Home Assistant
Edit: It is possible that this is only possible for regular mqtt sensors, and not for mqtt_room sensors.
Thanks! I will look at that later, it seems like it takes a bit of time. Just to make sure first, you are sure that this will work for mqtt_room sensors too, and not just physical sensors like the temp sensors in the script?
I have 41 MQTT-based entities (light, switch, binary_sensor, sensor, lock, alarm_control_panel, and climate) and they have all been created via MQTT Discovery using scripts like in the example.
FWIW, other users in this forum employ the same technique and have even more entities and devices.
Uh-oh! I may have to retract the advice I offered.
I just double-checked MQTT Discovery’s documentation and now I have my doubts it supports MQTT Room Presence. The two options called timeout and away_timeout are not in the list. That implies you won’t be able to define a Room Presence sensor using MQTT Discovery (or the documentation isn’t up to date). Give it a try but if it fails with an error (in the log) then it probably means it can’t be done (in which case you’re limited to using manual configuration and its limitations).
Hi,
123, sorry to hijack this topic a bit but I have exactly the same issue with being unable to have anything more than an entity (that doesn’t work nicely with area card)
I have a home automation that produces it’s mqtt logic:
this is how i get a normal light to work with homassistant:
They did use auto-discovery, and reported the loading time decreased dramatically.
I don’t know anything about your hardware and what it does so I can’t answer that question.
In the example you posted, the payload must contain valid JSON but it doesn’t. You can’t use single-quotes the way you did. Use a JSON validator to test and correct the payload’s syntax.