iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
441 stars 56 forks source link

Hide entity #38

Closed andreamastro closed 4 years ago

andreamastro commented 4 years ago

I think that would be useful add an option to hide a specific entity if it has not a specific state. For example:

type: 'custom:config-template-card'
variables:
  - states[light.bedroom'].state
entities:
  - light.bedroom
card:
  type: entities
  entities:
    - entity: "${vars[0] === 'on' ? 'light.bedroom' : 'hide_entity'}"
      name: Bedroom light
iantrich commented 4 years ago

That's supported by core