Why can't we add template entities to existing devices?

Template entities are great. However if you need to template a value for a specific device, there’s no way to link it to the original device?

I’d like to add link other devices from other integration also. My living room TV has Samsung, Google Cast, Netgear, and DLNA. Four devices. One would be nice.

helpers and such would be nice as well

Related to this feature request for some use cases New Helper: Entity from attribute

Also Riemann sum integral and utility meter entities, insofar as they are used to track energy consumption of a single device. I really like how the Powercalc custom component links the power, energy and utility meter sensors that it creates to the relevant device.

2 Likes

I have several homebuilt particulate sensor monitors. Through some templates I’m able to run the math to convert the raw particulate counts to an AQI which I can compare against official sources and other sensors out there.

But I can’t attach those calculated values to the devices themselves! Instead I’ve got a whole separate set of entities to keep track of.

Easily my number 1 frustration with HA right now is the clutter of different entities floating around that I can’t associate with the actual source. I would so very much love to be able to attach a calculated template entity to an existing device.

Related: Wth can't I add a helper to a existing device?
Just adding so that the comment context is somewhat linked for people originally on this thread.

2 Likes

I am currently building a custom integration that will allow the user to modify devices in the following ways:

  • Change device attributes
  • (Re-)Assign any entity to any device
  • Create new devices
  • Merge two devices

Changing attributes and assigning entities already works, however the integration is currently under development, lacking documentation and should be treated as unstable and experimental.

If you are still interested in these features, Maybe you’d like to check out the repository and follow the development: GitHub - EuleMitKeule/device-tools: Device tools integration for Home Assistant.

3 Likes

Looks promising! Just to check: If I use it to merge 2 devices will it then also merge the statistics of those devices?

I’m not sure what you mean with the statistics of the devices. If you mean the recorder data, that is only in regards to entities not devices. Merging the devices will simply move all entities from one device to another and disable the entity-less device. This process will not change anything about the entities and recorder data should therefore be kept.