Is it possible to create a template device?

My use case is the following.
I have an really high quality but ‘dumb’ air purifier.
I’ve figured out a way how I could make it look “smart”.
It would have the following sensors:

  • controlling the on/off (using a zigbee based IR remote)
  • controlling fan speed (using a zigbee based IR remote)
  • getting particle count (PM) using a small smart counter sitting right on top of it
  • get temp and humidity similarly to above

This will replicate 100% the sensors that I have a newer smart air purifier I have other than an indicator when the filters are done (ALTHOUGH I could actually keep track of that using knowledge of the speed it’s been running at provided no one controls it directly from its remote which I’ll hide :P)

At this point, you could ask, why not just buy a new air purifier? This one is from IQAir, is quite expensive and very effective and I’ve had it for a while and it’s still rock solid (these things last over 10yrs in hospitals running 24/7).

So it is still vastly cheaper (and more fun!) for me to ‘smarten’ this using some cheap relatively cheap sensors.

Is it possible to define a template device? Or the best I can do is define a bunch of “unrelate” template sensors and just name them appropriately. And maybe actually there will be little value in having a template device other than if I need to somehow bind all these template sensors together if I want to target them as a whole in an automation…

I agree 100% with Taras. I don’t want to promote the use of device triggers and such (they’re problematic for various reasons), but there is technically a way to create a device: MQTT. I haven’t done it myself though, but you should be able to find the info and how to create the correct discovery payloads to achieve this — if you really feel strongly about this. A lot of work, overhead and less resilience for basically no gain: publishing an array of values just to subscribe to them again.