Setting Area from within ESPHome

I have a number of ESPHome devices, I would like to set the “area” for them in the ESPHome yaml file in order to simplify adding them into HA. Is this an option?

1 Like

I don’t believe so, but its a one off, 2 seconds for each new device.

sure but after tweaking configs and re flashing devices and having to delete each device and readd, just trying to get all the steps cut to 0

1 Like

…why that?

Well if you change the name of a entity or remove it the easiest way to clean things up is delete the ESPHome integration for that device and readd it. As I have been working on converting devices over from Tasmota it has resulted in a few add/deletes. Unless there is a better way to refresh the device?

Here are some ESPHome configs if anyone is interested: GitHub - crzykidd/esphome-configs: Different ESPhome Configs

For me changes of the entities name and other stuff (removing/adding components) are just reflected on ha virtually instantly after flashing the esphome node with the new version.

For rare cases their is even a “reload” button on each and every esphome integration (in ha) to enforce changes from the esphome node.

If I rename an entity the old name stays on the device as unavailable. and I can’t delete it… so the only way I have found to clean it up is remove and readd the ESPHome device. Maybe an HA reboot would clean it up.

I’d also like to see this capability added

You get an area selector as part of the popup when adding the ESP device in the first place (in the add device menu) so it’s really not something to worry about…

1 Like

yes, I’m well aware of this selector but that does not address the fact that I have 20+ devices that have entities spread across multiple rooms (on each physical ESPHome device), so it would be great if that part of an entities configuration could be set from within the ESPHome config and not the HA device adoption flow

So, you have devices/nodes in one room/area but the devices entities arent in the same room. Thats not impossible but, IMO thats far from the norm which is likely why theres only an area configuration for the node.

What kind of stuff has you putting a node in one room and entities in another?

I have a Bluetooth temperature sensor in my bathroom linked to an esp in the next room.

crzykidd wanted to setting an area for a device, this has been possible since 2023.11.0.

Although what you want is entity, which I believe is not possible

Perhaps you should have explained yourself better then because this was not mentioned before.

Yes, setting the area at inclusion too HA applies to the whole device, but you can then change the individual entities to other areas. No, this can’t be done in the ESP code. You should have said this was your request in the first place.