Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Is this possible, and which custom-card (combination) is needed

$
0
0

@Mariusthvdb wrote:

trying to create a card with set of multiple-entity-row 's I a trying to pass along a templated entity_id from the main switch, and template the power sensors as primary and secondary info per line. as I created a config with a decluttering card, (with which we can not template as such) I need a config per line for each switch/sensors combination.

Would love to explore the possibility for templating though, and maybe this is possible with the Lovelace_gen? Or card_templater.

this is what it would ideally look like:

type: custom:auto-entities
card:
  type: entities
  title: Multiple entities
  show_header_toggle: false
filter:
  include:
    - entity_id: switch.sw*_template
      options:
        type: custom:multiple-entity-row
        state_color: true
        toggle: true
        secondary_info: last-changed
          primary:
            entity: sensor.{{entity.entity_id[10:-9]}}_actueel
            name: Actueel
            unit: Watt
          secondary:
            entity: sensor.{{entity.entity_id[10:-9]}}_totaal
            name: Totaal
            unit: kWh
          sort:
            method: name

hope this is self explanatory, and of course it doesn’t work, but it shows what I need.

loooking like this:

made with decluttering:

card:
  type: custom:multiple-entity-row
  entity: switch.sw_[[entity]]_template
  state_color: true
  toggle: true
  secondary_info: last-changed
  primary:
    entity: sensor.[[entity]]_actueel
    name: Actueel
    unit: Watt
  secondary:
    entity: sensor.[[entity]]_totaal
    name: Totaal
    unit: kWh

and card config:

type: entities
title: Switches multiple entity
show_header_toggle: false
entities:
  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'espresso_keuken'

  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'multi_purpose'

  - type: custom:decluttering-card
    template: switches_multiple_entity
    variables:
      - entity: 'vaatwasser_keuken'

the switches all have the entity_id’s like:

switch.sw_boiler_bijkeuken_template

and the sensors:

sensor.boiler_bijkeuken_state
sensor.boiler_bijkeuken_totaal

would you please have a look if I can realize this, in 1 config with custom-cards?

thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles