How to assign a device to an area

Any news on this matter ? I too am configuring KNX via yaml, and am not able to assign rooms.

Only entities that provide a unique_id are assignable to areas. KNX entities don’t currently but its worked on https://github.com/XKNX/xknx/pull/576

1 Like

But then it is only for this adapter. Would like to maintain own unique IDs for every entity and then be able to assign an area for all of them. For my own entities, rest adapters, etc. etc.

Seems like a pretty major shortcoming. Essentially there is no way to assign an area to any device that is integrated via yaml, which makes for a big mess. I have LightwaveRF and Hue lights and both the integrations add lights as entities, so they cannot be assigned an area :frowning: is this going to be fixed at any point?

3 Likes

Hey all,
I’m VERY new to HA. I’m an OpenHAB user for several years now and I’m starting my way in migrating over to HA. It’s been a few weeks since my first installation so I took my first steps with the UI, now I’m starting my way with the yaml files.

Obviously my thinking is biased towards the openHAB way of things, and I think it’s making it difficult for me to grasp the logic of the HA system. But after reading all the previous questions I guess I’m not alone.
If the top level of the hierarchy is the deivce (set aside the integration level), there shouldn’t be an entity with no parent device.
So I would expect that with the case of an entity configured via yaml, I would have the option to create a dummy device to be the parent. This way I could assign it to an area but also I could view a complete list of my devices in the devices page.
Now the list is only partially because it’s missing the “orphan” entities.

A long way to say that I agree with all the other members that wrote here and I wonder if I’m missing anything (I’m very new to this after all).

Thanks, very excited to learn all the great features of this system.

Entities that aren’t part of a Device can have unique_id and be assigned to areas. Regardless of configuration method (yaml or UI).
It’s just a thing the integration has to support, and many do.
A Device in HA is afaik a representation of a physical device. It can contain multiple entities - eg. a Motion binary_sensor and a temperature sensor. Not having a devices but only an entity should be perfectly fine.

1 Like

I am in the same boat as you, migrating from OH. I managed to assign an area to my entity after defining a unique_id in the configuration.yaml file. I believe this can be done via templates too

Screenshot 2021-05-08 at 21.18.35

Manual sensor

binary_sensor GateSensor:
platform: mqtt
state_topic: “tele/GateEntrance/POWER2”
name: “Gate Sensor”
unique_id: “GateSensor_1”

4 Likes

Responding to the original post as of today with Home Assistant v7.2.
You go to Configuration > Devices > select a device > Click the Pencil icon > Area dropdown > Update

1 Like

On that note, has this broken for anybody with Home Assistant 2022.2.2? I have done this for all my devices but I just added a few switches today while on Home Assistant 2022.2.2 and when I go to that Device info dialog, when I set the name and/or area and hit “Update” it just hangs and the device is not updated.

The devices were on the “Z-Wave JS” integration.

1 Like

Hi
Same for me…

Glad I’m not the only one experiencing this. Was banging my head against the wall thinking this was some specific problem with how I was configuring my MQTT entities/devices!

Broken for me too. Just hangs.

Hi There,
same here, but with different devices / integrations: Zigbee and ble for example…

This was indeed broken in an older version of the UI. This can be fixed (on a PC) with clicking into the area dropdown and then selecting the area with your keyboard (up and down keys and return). Then the value is written correctly into the field and can be saved.

Hi there, quite new to HA

was there a solution found for this issue please?

Thanks

I am able to set the areas for all my devices and entities, however when i update HA or I reload HA after an adjustment, some of the devices or entities lose ther area, and I have to re add them by the Gear Icon
Is this Normal?
Paul