custom-cards / entity-attributes-card

Entity Attributes
Apache License 2.0
68 stars 12 forks source link

please add option to reference entity in include and exclude keys #8

Open Mariusthvdb opened 4 years ago

Mariusthvdb commented 4 years ago

as title. we now have to use eg:

  - type: custom:entity-attributes-card
    title: Attributes Card
    heading_name: List
    heading_state: States
    filter:
      include:
        - key: sensor.essen_brussel_noord.*
      exclude:
        - key: sensor.essen_brussel_noord.unit_of_measurement
        - key: sensor.essen_brussel_noord.icon
        - key: sensor.essen_brussel_noord.custom_ui_state_card
        - key: sensor.essen_brussel_noord.attribution

while an entity: option would allow for:

  - type: custom:entity-attributes-card
    title: Attributes Card
    heading_name: List
    heading_state: States
    entity: ensor.essen_brussel_noord
    filter:
      include:
        - key: *.*
      exclude:
        - key: unit_of_measurement
        - key: icon
        - key: custom_ui_state_card
        - key: attribution

if the key could be allowed to be a list or comma separated list that would be even better:

  - type: custom:entity-attributes-card
    title: Attributes Card
    heading_name: List
    heading_state: States
    entity: ensor.essen_brussel_noord
    filter:
      include:
        - key: *.*
      exclude:
        - key: 
            - unit_of_measurement
            - icon
            - custom_ui_state_card
            - attribution

example using only specific includes:

  - type: custom:entity-attributes-card
    title: Attributes Card
    heading_name: List
    heading_state: States
    entity: ensor.essen_brussel_noord
    filter:
      include:
        - key: 
            - departure
            - platform_arriving
            - destination

or maybe even:

  - type: custom:entity-attributes-card
    title: Essen - Brussel-Noord
    heading_name: List
    heading_state: States
    entity: sensor.essen_brussel_noord
    filter:
      include:
        - key: entity.*
      exclude:
        - key: entity.friendly_name, entity.unit_of_measurement, entity.icon, entity.custom_ui_state_card
        - key: entity.attribution

instead of having to repeat the sensor (entity) over and over in either include or exclude.

thanks for considering