Dynamic background and info entities layout #101
-
|
Hi, I have two questions.
I've tried the code below, but that doesn't work: type: custom:room-card
title: Bureau
entity: light.licht_bureau_luchter
icon: mdi:sofa
show_icon: false
tap_action:
action: navigate
navigation_path: sub_bureau
styles:
template:
styles: >
if (entity.state == 'off') return 'background-image: url(some image)'
else return 'background-image: url(some other image)';
entities:
....
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
I've tried several template/style code variations but none seem to work. There is no style code inserted in the resulting html. |
Beta Was this translation helpful? Give feedback.
-
|
Ah now that I have time to look at it on my laptop I see the problem. The main entity has no template support yet. Its going to be a big update so it could take a while. |
Beta Was this translation helpful? Give feedback.
-
|
@Jorre05 check v1.07.00 |
Beta Was this translation helpful? Give feedback.
-
|
Yes!, that works. Thank's a lot. Now, another small thing... |
Beta Was this translation helpful? Give feedback.
@Jorre05 check v1.07.00