I'm trying to select the battery entities of certain device types only, e.g. switches. The only way I can think of to do that is to look at all entities of the same device and see if there is an entity of a certain device type, e.g. switch, present on the same device, but I have no idea how to do even that.
Is this even possible? Or am I going about this in entirely the wrong way?