remote_homeassistant icon indicating copy to clipboard operation
remote_homeassistant copied to clipboard

Select Area

Open dmatora opened this issue 4 years ago • 7 comments

Is there a way to make area selectable for generated devices?

dmatora avatar Dec 20 '20 02:12 dmatora

Most things are possible, some things are just rather difficult. Almost all registers are persistent in each instance, which means we have to duplicate them on the master instance and also remove stuff that is no longer valid once the connection is lost. Some things are not possible to duplicate, like internal identifiers used to represent areas for instance. That means we have to do some sort of translations between the instances... It becomes complex extremely fast. I do think it's doable, possibly with some warnings in the log that are harmless, but it's tricky to get right. The same goes with everything else, like devices and entity register.

postlund avatar Dec 20 '20 17:12 postlund

I'm not talking about translation of areas from one instance to another I'm talking about translated sensors having unique id (or whatever requirement is) which would allow assigning them to areas already existing on the instance

dmatora avatar Dec 21 '20 04:12 dmatora

Ok, I understand. It's the same problem though as it would require the entities to be added to the entity registry. The entity registry is probably easier to accomplish as the unique id is actually globally unique (it's the same no matter which instance it is added to). But some translation is needed to handle the case where entity_it is changed on the master instance, so it doesn't match what is on the remote side.

postlund avatar Dec 21 '20 06:12 postlund

I might actually give the entity registry an attempt when I'm done with the proxy services. Should be an interesting exercise and having support for unique_id is pretty convenient.

postlund avatar Dec 21 '20 07:12 postlund

This would be a great addition to this service, thank you!

dinan5 avatar Mar 19 '21 14:03 dinan5

I might actually give the entity registry an attempt when I'm done with the proxy services. Should be an interesting exercise and having support for unique_id is pretty convenient.

Hi there, hope you are doing great! Just curious if there's any update on this? Would be extremely convenient to be able to have a unique id and assign areas. Pretty new to HA so haven't figure out how to do the coding yet, otherwise would love to get involved too lol

KardelSniper avatar Dec 27 '21 23:12 KardelSniper

What about this:

  1. The user have to take care, that all areas exists on all instances with the same id (the id is given by Home Assistant using the initial name of the area).
  2. The user have to take care, that devices/entities are linked to the area which they should belong to on the instance, where the entity "physical" exists.
  3. remote_homeassistant will just "copy" these information to the master instance. So Home Assistant can use them.

IMHO this would be a great improvement for remote_homeassistant.

@postlund Whats your opinion abut this?

FrankGiesecke avatar Mar 14 '24 10:03 FrankGiesecke