#Entity descriptions
1 messages · Page 1 of 1 (latest)
depends on the integration. The one I'm building right now has 3 (battery, tank level, take percentage). I have some that have 7-8
Right, let me get into bed and I'll explain
Okay so sometimes you have a lot of sensors which have the same logic
The only difference is maybe what value they get, unit of measurement, device class, name etc
So a design pattern that started was extracting those differences into a data carry object
I have a lot like that actually
And make the entity generic
Checkout the Withings sensor platform for example
It has a huge list
But without a million separate classes
will do. If it works the way I'm imagining it should let me remove a bunch of duplicate code, thanks!
If you want some feedback, feel free to ask in devs or slide in my dms