[Feature Request] Additional columns for multiple (independent) entities filters
AleXSR700 opened this issue · comments
Hallo Markus,
great card and exactly what I was looking for after trying and failing to create nice tables with the stock cards :)
Well, almost exactly, because I am wondering if there is any way of filling a table with a second set of filters.
Background is quite simple: I would like to create a table that shows all climate information of my home.
But not all of that information is available in one entity or rather, the entities do not have all required attributes.
As you can see, most information is available by adding multiple sensors to the MQTT discovery topic. But this is not possible for other domains and the MQTT HVAC integrations does not allow for battery information.
So in the above table, battery information is missing.
It would be really cool if somehow the flex-table-card could create additional columns for a new set of filters.
MAybe something like:
type: custom:flex-table-card
entities:
include: climate.*
clickable: true
columns:
- name: ''
data: friendly_name
align: left
- name: Target Temperature
data: temperature
align: center
modify: if(x.length == 0){"-"}else{x}
- name: Current Temperature
data: current_temperature
align: center
modify: if(x.length == 0){"-"}else{x}
- name: Current Humidity
data: current_humidity
align: center
modify: if(x.length == 0){"-"}else{x}
entities_2:
include: sensor.xiaomi*battery*
clickable: true
columns_2:
- name: Battery
data: state
align: center
modify: if(x.length == 0){"-"}else{x}
entities_x
is then shown in columns_x
. Of course flexible if you force the card to start with entites
or replace it with entities_1
but for backward compatibility it would probably be best to have the first one without suffix and then the additional ones with suffix.
Would be extremely cool if something like this were possible.
Thank you for your consideration.
Viele Grüße
Alex
P.S.:
This would also allow creation of totally custom tables.
type: custom:flex-table-card
entities:
include: sensor.xiaomi*temperature*
clickable: true
columns:
- name: Temperature
data: state
align: center
modify: if(x.length == 0){"-"}else{x}
entities_2:
include: sensor.xiaomi*battery*
clickable: true
columns_2:
- name: Battery
data: state
align: center
modify: if(x.length == 0){"-"}else{x}
entities_3:
include: sensor.xiaomi*humidity*
clickable: true
columns_3:
- name: Humidity
data: state
align: center
modify: if(x.length == 0){"-"}else{x}
So one table with 3 independent columns but formatted as one table.
Why not using
include:
- sensor.xxxxx_*
- sensor.yyyyy_*
if you need two sets?
Those are added vertically, not horizontally which means that the comparison becomes difficult. So point of the table in this case is to see e.g. all climate for one room even if they are coming from separate sensors.
One picture is worth 100 words).
Can you post a picture of what you want?
Take the picture I posted above. Target temperature is from sensor.eq3_temperature_living_room, current is from sensor.xiaomi_temperature_living_room and humdiity is from sensor.xiaomi_humidity_living_room.
The only reason why this particular case worked is because I used Node-RED to join the sensors in one climate entity by changing the discovery message.
But I would like to make precisely this table by listing the different entities. In addition, e.g. battery information cannot be added to MQTT HVAC entities. So even if you try to use built-in workarounds you will always hit a dead end at some point.
So being able to build these tables with one entity/filter per column rather than per row would make this the ultimate table card and at the same time kind of a perfect overview card.
And going horizontal instead of vertical is much more display friendly and makes comparisons better :-)