I made a package of a carheater function I saw on a FB group and since I wanted it to be easy for everyone to download and use I added all the sensors etc. into the package to make a plug and play solution. The problem is that in the package I have a time_date sensor added. Because I already have that added elsewhere I suddenly have both a sensor.time and a sensor_time_2 .
Not sure if it’s possible but it would be nice if home-assistant hade the logic to check for duplicate sensors and just use one of them.
At the simplest level you have two sensors that are the same and are just wasting space, but if they are slightly different then which one does HA use ?
Your assumption that everyone needs sensor.time or that each package that uses it should have it included is staggering. I just counted, I have 63 packages that use sensor.time and not 63 repetitions.
Many packages need access to common elements, why not have all those in a common package ? sun.sun / time_date / brightness values for different lighting values this list is only limited by your imagination.
What about movement sensors ? Door sensors ? They are similar but only one instance allowed, for good reason.
I also note that neither of you voted for this either.
Edit: if your package relies on ‘other’ common elements, then advise of such in your publication