iantrich / config-template-card

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

Allow templates in entities #33

Closed kloggy closed 4 years ago

kloggy commented 4 years ago

Allow templates in entities

This could be very useful in the following example situation.

An input_text holds the name of a sensor and it is the sensor that needs to be watched for state changes (_not the inputtext)?

e.g. The state of input_text.my_sensor_name is the name of a sensor like 'sensor.my_sensor'.

type: custom:config-template-card
variables:
  - states['input_text.my_sensor_name'].state
entities:
  # I want to watch sensor.my_sensor
  - sensor.time