Thanks @andrey love icon_color
Here is a screen shot from the dev tools:
I should perhaps have mentioned that I just updated to 0.67.1 - sorry!
not sure i follow⌠is it working now? or are you saying it wont work under 67.1âŚ
( i ask since i was just about to do soâŚ)
I was on 0.65.5 and it was working (both with rgb(a, b, c)
with quote marks, and in my original configuration with square brackets [a, b, c]
).
Under 0.67.1 I cannot get any colour, using either icon_color
or rgb_color
thats not very promising⌠ill hold back the update then, until @andrey can confirm whats up? My request for icon_color was explicitly done to resolve the hs_color issue in .66 and up. Hope that @andrey s effort in that way wasnât in vain.
Not here I am afraidâŚ
hue messed up also.
But thatâs another threadâŚ;-((
What is going wrong?
Have you cleared your browser cache?
I am on 0.68.0b2 and icon_color
is working fine for me here. You can check my customize_glob for details.
yes its working in the desktop browsers, both Chrome and Safari. The app is not showing correct colors yet though. Have reloaded completely. App has different cache issues I guess, as with older images showing up too.
Hue is way off though, with correct settings according to the documentation ⌠so frustrating this
Hue is a separate issue and is being worked upon. Both the app and browsers working fine for me here.
BTW, can we use hex colors as well with icon_color
?
my guess would be we can use all correct CSS syntax. Only tested the ârgb(1,2,3)â yet, because it was the direct transition of my rgb_color templates
dont see the solution yet, but will take it to the correct thread, thanks for pointing me to this
icon_color
is applied verbatim to color:
style, so any CSS goes.
#FFACAC
red
rgba(10, 20, 30, 0.5)
etc.
It will be good to clarify the same in custom_ui
docsâŚit was not immediately obvious to me Thanks!!
Hi @andrey please have a look with me, how I could apply a multiple condition in a template? Cant seem to find correct syntax yet:
icon_template: "if (state === 'on') and (entities['sensor.driveway_reachable'].state === 'True') return 'mdi:power-plug';
else return 'mdi:power-plug-off';"
obviously in want both conditions to be true, for the âOnâ icon to show, else the âOffâ.
tried with && also and parentheses in various variations. No luck just yet.
Maybe you could point me in the right direction?
Thanks,
Marius
replace and
with &&
the thing is, of course i tried before posting, it didnt work though.
"if (state === 'on') && (entities['sensor.driveway_reachable'].state === 'True') return 'mdi:power-plug';
else return 'mdi:power-plug-off';"
hence i thought it might have been the parentheses placed wrong?
(to be complete, the (state === âonâ) is the state of the entity I want to customize. Both conditions working fine separately.