Using regex for sensors

Hi Guys,

I’m using a switch with PoE and would like to get the total value of all the PoE devices. Is it possible to do this with regex?

USW-24-PoE Port [0-9]+ PoE Power

And if so, how can I do it?

In short, yes. I’m not in front of a computer now, so I’ll just give a short description. You need to operate on the state object directly using select or selectattr (Jinja docs). There is a regex function in the HA templating docs you can use in conjunction.