Flex-table-card

The error relates to this file being !included from configuration.yaml in a way that is the template key invalid.

template:

You may need to read Splitting up the configuration - Home Assistant to understand how to properly split up your configuration if you want to have this in a separate file.

To be able to help you directly I would need some context.

How are you including the file “packages/package_stampante.yaml”? (what is the line in configuration.yaml you use to do this?)

Mine looks like this

  packages: !include_dir_named db1138/packages

my package files are in /config/db1138/packages/some_package_file.yaml

I just wonder if you could help me out, and make my life a bit better :slight_smile:

I have like 60 nodes that sends Mqtt data to a home assistant “scada unit”.

The data is sent in three packages each depending on how quick they need to be I JSON format.

bild

Then we make sensor out of all the data, like below.

And then to the flex table card and the questions.

I have no problem to list all BatSOC or BatTemp like in the picture imtogether with site name, but I really would like to have it ONE card. Do you have any ideas?
The cards that I have (one for each sensor) looks like below.

bild

I hope you can help me, or at least point the direction for me to solve it.

Your reply is highly appreciated.

Can you make a mock up of what you would like the flex table to look like please? Just a few lines of data would be sufficient.

I currently have an entities card with multiple custom: multiple-entity-rows to match humidity from one sensor to the temperature from another:

title: Current House Temp and Humidity
type: entities
entities:
  - entity: sensor.lumi_lumi_weather_pantryxx_temperature
    name: Pantry
    show_state: false
    type: custom:multiple-entity-row
    secondary_info: last-changed
    entities:
      - entity: sensor.lumi_lumi_weather_pantryxx_temperature
        name: false
      - entity: sensor.pantry_temp_humidity
        name: false
  - entity: sensor.lumi_lumi_weather_6d712c02_temperature
    name: Alfresco
    show_state: false
    type: custom:multiple-entity-row
    secondary_info: last-changed
    entities:
      - entity: sensor.lumi_lumi_weather_6d712c02_temperature
        name: false
      - entity: sensor.lumi_lumi_weather_6d712c02_humidity
        name: false

image

But of course I can only have a fixed sort rather than clickable, which I believe is possible with flex table. Is it possible to “migrate”?
(I can rename the entities to get them to match better)

I would like it to look like “sitename” “state of charge” “Battery temperature” .

Check this
You cannot use flex-table-card to place different entities in columns.

Can you not create a new template that has those 3 fields in it?

1 Like

thats what I thought - was just confirming.

Yes you can.

You will have to create a sensor template entity for each room. From configuration.yaml:

template:
  - sensor:
      - name: Living Room
        state: "Room Entity"
        attributes:
          temperature: '{{ states("sensor.living_room_temperature") }} °F'
          humidity: '{{ states("sensor.living_room_humidity") }}%'
          last_change_time: '{{ relative_time(states.sensor.living_room_temperature.last_changed) }} ago'

      - name: Bedroom
        state: "Room Entity"
        attributes:
          temperature: '{{ states("sensor.bedroom_temperature") }} °F'
          humidity: '{{ states("sensor.bedroom_humidity") }}%'
          last_change_time: '{{ relative_time(states.sensor.bedroom_temperature.last_changed) }} ago'

Then you can use a custom:auto-entities card to select them. I used a fixed state as a selection filter, but you could use a naming convention, group, label, or other method of selection.

The card is then:

type: custom:auto-entities
filter:
  include:
    - state: Room Entity
card:
  type: custom:flex-table-card
  title: Current House Temp and Humidity
  columns:
    - name: ''
      modify: '''<ha-icon icon="mdi:thermometer" style=color:green;></ha-icon>''    '
    - name: Friendly Name
      data: friendly_name
    - name: Last Changed
      data: last_change_time
    - name: Temperature
      data: temperature
    - name: Humidity
      data: humidity

The result:

You can then sort by clicking on a column header.

3 Likes