Internal devices and device configuration for entities

It would be really nice for Home Assistant’s overall organization if we could attach an entity to an existing device and/or create internal devices.

For example, attach helper entities that were created to help with automation or for statistics related to entities that already exist on a device.

Or create an internal device to group several helper entities related to a specific use.

I think it could go like this:

  1. Add the ability to create devices in current Helpers.
  2. Add the ability to include a device in the configuration of entities that are not linked to one. On the frontend it can be similar to the area configuration.

Devices are not really deeply integrated into HA and you should somewhat ignore them.
HA works on entities and there are very few device specific functions, and certainly none for custom devices, so grouping them in devices will make no real difference.

I think devices is mostly for integrations to be able to handle a group of entities, like deleting and creating on connection changes and if you have custom entities, then they might not be handled well by a deletion and later recreation.

See and add you +1 somewhere here as well.

2 Likes

I don’t think the OP is asking for a deep integration, just a logical association so that you can view all entities for a device (both integration added and custom ones like template sensors) in the device details screen.

I’ve had to create template sensors for all of my energy meters to prevent them resetting if they go offline, these are now just a big list and I depend on the names or IDs to know which device they are about, it would be nice to be able to associate each template with the device it’s based on for organisation.

Another use case could be associating input values that are used to control automations of a device with the device itself so you can change your automation settings that impact a device from the device screen directly.

I understand the wish, but proper naming if automations and scripts could solve a lot of the organization issues. Automations and scripts can be connected to multiple entities and thereby also multiple devices, which could make it hard.

The “deep” was more meant that HA do not really have the device concept that well implemented and you wish for an easy way to control anything from the device overview is already flawed in the current way devices work, which is why the experts here will advice you not to use devices whenever possible.

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.

4 Likes

I have a smart plug added to my major white good. One of things that I do is create a template sensor which tells me when a cycle is running. So I can use it in automations.

eg. this is my dishwasher smart plug device.
.

The it would be really great if I could add this template sensor to this page and it just appears as one of the sensors for this device. This would make ot much cleaner and able to view this data when you need to.