Default/main "bucket" sensors (to bridge device changes for longterm stats)

Hey, morning. This is technically not so much a feature request. The functionality itself is already available today, but not established for what I think it could be.

The problem: when an important/main metric of your household depends on a certain device/sensor, it’s pretty complicated to keep continuous statistics when the physical device breaks, or when you switch to a different device, or when you migrate your system to another HA setup allover.

Example: I’m tracking the outside temperature with an Aquara zigbee sensor which is technically not meant for outdoor use, and which will sooner or later completely die. If I would start from scratch with my HA setup today, I would first create a template sensor as a “bucket sensor” so to say, just referencing the physical device/sensor as the source. With that, once the device dies, I could just get a new one running, and just switch the source in the template sensor and keep recording longterm data into the same statistics.

As mentioned above: this is already possible today (at least I hope I didn’t miss something that breaks the idea), but it’s not an established concept. One idea could be that HA establishes a set of default/main bucket sensors for the most common use cases, with the option to extend them with self-chosen options on top.

What do you think? Curious to hear your opinions/thoughts :slight_smile:

This is essential a duplicate of: Add a method of replacing devices

If you use the automation editor you may have noticed that even entity ids are now replaced with unique ids. This means it is no longer possible to replace an entity and make the entity id of the new one match the old.

I suspect this was not done to make our lives harder and is actually a work in progress for a method of replacing entities and devices. Though I don’t actually have any proof for this.

But would that cover cases where a sensor value comes from different “places” in a device? Or even beyond a device?

Example outside temperature: today I get the value from a sensor where the temperature is the state, but maybe the next device I want to use has it as an attribute. Or maybe I won’t use a device anymore, but a REST sensor with a public weather data source.

Making it easier to replace devices with similar/same devices would cover part of that, but with a “bucket” sensor it wouldnt matter at all where the data comes from.

That already exists.

I know :slight_smile: , that’s why I wrote in the original post that this isn’t so much of a massive feature request, but more of a request around a “best practice” so to say. And maybe the UI components to establish it. In the same way that it might e.g. make sense to pre-establish certain default area definitions out of the box.