Closed Mariusthvdb closed 2 years ago
currently I use:
- type: custom:state-switch default: '' entity: sensor.alerts_counter states: '1': !include /config/lovelace/buttons/buttons_alerts_1.yaml '2': !include /config/lovelace/buttons/buttons_alerts_2.yaml '3': !include /config/lovelace/buttons/buttons_alerts_3.yaml '4': !include /config/lovelace/buttons/buttons_alerts_4.yaml
would you consider adding a template functionality, so we can do like:
- type: custom:state-switch default: '' entity: sensor.alerts_counter states: !include /config/lovelace/buttons/buttons_alerts_{{entity.state}}.yaml
thanks for considering!
That's not how yaml works.
!include is processed by the backend, before state-switch can know anything about it.
!include
currently I use:
would you consider adding a template functionality, so we can do like:
thanks for considering!