Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Allow "*" wildcards in "entities" option to define many entity_ids #95

Open
Mariusthvdb opened this issue Jan 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented Jan 16, 2022

Checklist:

  • [X ] I updated to the latest version available
  • [X ] I cleared the cache of my browser

Release with the issue:
1.3.6
Last working release (if known):
dk
Browser and Operating System:
any on MacOS

Description of problem:

Config doesnt auto-update based on the state changes of the embedded card. It does update on a pull/refresh.

The stand alone auto-entities card auto updates fine (albeit on a fixed threshold ofc). The latter being the sole purpose of embedding it in the config-template-card

    - type: custom:config-template-card
      entities:
        - input_number.power_threshold
      variables:
        threshold: states['input_number.power_threshold'].state
      card:
        type: custom:mod-card
        style:
          hui-grid-card:
            $: |
              .card-header {
                background-color: var(--background-color-off);
              }
        card:
          type: custom:auto-entities
          card:
            type: grid
            title: "${'Color custom-ui above ' + threshold}"
            columns: 4
          show_empty: false
          card_param: cards
          filter:
            include:
              - entity_id: sensor.*_actueel
                options:
                  type: custom:button-card
                  aspect_ratio: 1/1
                  custom_fields:
                    notification: >
                      [[[ return entity.state + 'W'; ]]]

            exclude:
              - state: '${"<" + threshold}'
          sort:
            method: state
            numeric: true

Javascript errors shown in the web inspector (if applicable):


Additional information:

community post
https://community.home-assistant.io/t/100-templatable-lovelace-configurations/105241/576?u=mariusthvdb

Schermafbeelding 2022-01-16 om 12 34 44

please have a look? thanks!

@Mariusthvdb Mariusthvdb added the bug Something isn't working label Jan 16, 2022
@Mariusthvdb
Copy link
Author

Mariusthvdb commented Jan 16, 2022

update of the above, Ildar explained to me in https://community.home-assistant.io/t/100-templatable-lovelace-configurations/105241/577 that we need to explicitly state all entities in the entities field.

I had not realized we need to explicitly point the card to all entities, if and when using an embedded auto-entities card. This makes the use of an auto-entities kind of moot.

So please read this rewrite as a FR for accepting globs in the entities field so we could do:

    - type: custom:config-template-card
      entities:
        - input_number.power_threshold
        - sensor.*_actueel ##<------ please consider adding this functionality
        - "${states['group.switches_sensors_actueel'].attributes.entity_id}" ## <---- alternative template option
      variables:
        threshold: states['input_number.power_threshold'].state
      card:
        type: custom:mod-card
        style:
          hui-grid-card:
            $: |
              .card-header {
                background-color: var(--background-color-off);
              }
        card:
          type: custom:auto-entities
          card:
            type: grid
            title: "${'Color custom-ui above ' + threshold}"
            columns: 4
          show_empty: false
          card_param: cards
          filter:
            include:
              - entity_id: sensor.*_actueel
      .....

thanks for considering

@Mariusthvdb Mariusthvdb changed the title config doesnt auto-update using an embedded auto-entities FR: add glob functionality to entities (was: config doesnt auto-update using an embedded auto-entities) Jan 16, 2022
@ildar170975 ildar170975 changed the title FR: add glob functionality to entities (was: config doesnt auto-update using an embedded auto-entities) [FR] Allow "*" wildcards in "entities" option to define many entity_ids Jan 16, 2024
@ildar170975 ildar170975 added enhancement New feature or request and removed bug Something isn't working labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants