I think I’ve got it. It took me only two days…
So, I display the brand attribute in a (hidden) colum, modify it to show undefined if it’s not one of the brands I want and use strict: true to hide the rows that contain an undefined cell.
type: custom:flex-table-card
clickable: true
sort_by: state+
strict: true
max_rows: 5
entities:
include:
- sensor.station_*sp98
columns:
- data: brand
name: Brand
hidden: true
modify: "x ==='BP' || x === 'Agip' || x === 'Gulf' || x === 'Shell' || x.includes('Total') || x.includes('Esso') ? x : null"
The only thing is that I couldn’t make it case-insensitive.
x.toLowerCase() === 'agip' doesn’t work
I was looking for any native HA solution, really. It also felt more efficient to ask HA to build the list once instead of having the card to it every time it’s displayed.
I made the template sensor that builds the list, I just couldn’t parse it to the card.