More complex filtering for Entity Filter and Conditional cards

Currently the entity filter and conditional cards filter on state values being equal or not equal.
I would also like to filter based on more complex conditions such as “>”, “<”, “>=”, “<=”,

My use case is that I would like to only show batteries in a card with their batteries below a certain threshold.

Ideally, the filter/condition should be able use state value as well as an attribute value.