Closed dmkjr closed 2 years ago
name: ${"Today we've used " + states['sensor.daily_water'].state}
Thank you @iantrich . That worked. What about if we were doing this on the results line? For example,
type: custom:config-template-card
entities:
- sensor.time
- sensor.date
card:
type: entity
name: ${ states['sensor.date'].state }
entity: ${"Hello World! " + states['sensor.daily_water'].state}
icon: mdi:water
Obviously it's throwing an error in that context. Is there a 'prefix' or 'suffix' type attribute?
No, it is just Javascript
Probably less of a bug report than a syntax, but we cannot figure out how to append plain text before some code in the 'name'.
`type: custom:config-template-card entities:
That works fine but I want to create something like "Today we've used [insert sensor data]" or something similar.
Anyone that can point me in the right direction, I would appreciate it.