thomasloven / hass-plejd

🔹 Plejd BLE integration for Home Assistant
81 stars 10 forks source link

Issue with naming of the "parent device" #36

Closed ricmik closed 7 months ago

ricmik commented 10 months ago

There is a logical issue with naming of the parent device when the device has two outputs in different rooms. I have a Plejd DIM-02 with outputs in two different rooms on two different floors. This creates some issues in the naming of the device in the Plejd integration and the configured area in Home Assistant integration.

If I try to change the area in Home Assistant of one of the outputs (lights), the parent device also changes area, thus changing the area for both outputs of the device in the operation.

In the example below I have a DIM-02 that originally was named "Taklampe Soverom" by the Plejd integration with one output enabled initially, - also called "Taklampe Soverom". I then configured output 2 as a dummy output as a workaround do scene events in Home Asisstant without actually making changes on the lights in the house. Suddenly the parent device is called "Dummy" with the outputs (lights) "Taklampe Soverom" and "Dummy". If I change the area of the "Dummy"-light to another room, the parent device also changes area".

bilde bilde bilde
thomasloven commented 10 months ago

I've tried to explain this to the Home Assistant core team, but "one device is one device". I'll bring this post up to try to convince them otherwise.

In the mean time, you can select for each entity to not use the device area:

image
ricmik commented 10 months ago

Yeah, I can see the concept of "one device is one device" since it actually is just one device with two outputs 😄 Changing the entity area might help, I'll see if that'll do it.

Anyway, I'm not sure how the device could have been named in order to better reflect the actual device. But right now it's a bit confusing. I see in the Plejd app that the device from my example is "Type: DIM-02", "Name: Soverommet, Dummy" maybe it would help using this name when naming the device in Home Assistant (if that name is available on the Plejd mesh)

thomasloven commented 10 months ago

I noticed Plejd name the devices from the two outputs. The problem with using that device name is that would mean your entities get named "Soverommet, Dummy Soverommet" and "Soverommet, Dummy Dummy", which is less than ideal...

ricmik commented 10 months ago

I must say that I prefer the previous naming since the devices are handled the way they are.

light.{devicetype}{output_name}

Example: light.plejd_dim_01_2p_soverommet is better than light.soverommet_taklampe_soverommet (which also gives the display name Dummy Taklampe Soverommet in my case, making a discrepancy between the display name and device name).

thomasloven commented 7 months ago

The naming scheme has been updated.