There must be something else though. I agree its more elegant, but also it does not work when I use it “directly”, it only works when using it via a variable… Thats what made me asking…
If you are trying to eliminate currentTime, currentDate or currentHour then I’d suggest reading up on JavaScript Date getHours() Method
There is nothing else, because the time itself is variable.
Thanks for all the tips. I got it working without the variable. Looks like single quotes are needed for the value… It works now, thanks!
Works with: 'Date().getHours()' >= '9'
Or also with: 'now().hour' >= '9'
okay… I think you just invented a new programming language
hahaha.
Well, I dont know if it was too late in the evening or if its an issue with something else. I could swear yesterday it worked, today it doesnt.
I gave up and am using your code now, that works like a charm. Thank you!
Has anyone managed to create a custom button-card that mirrors the formatting of the native Tile card, including colors, hover effect, etc.?
actually… Mushroom and Minimalist made that before HA did… and they both use the custom button card as a base… Minimalist is very well documented and you can read every line of code they used
Custom:Button Card is JS based while Mushroom is Jinga based on the standard Tile card.
Unfortunately the custom Minimalist UI intergration is looking for new Maintainers
UI-Lovelace-Minimalist
Important
Looking for New Maintainers!
This project is in need of new maintainers! The current maintainers are no longer actively working on it, and without fresh leadership, we may be forced to shut down the project and its associated Discord server.
If you’re passionate about this project and would like to take over its development and community management, we’d love to hear from you!
Hello guys. I need your help to create a button card whereto icon must be BLUE (default OFF HA color) when identity is ON and ORANGE, when identity is OFF.
I would like to use the icon mdi:heating-coil for my card.
The card is very simple… the same as HA but only doing the swapping icon colors
identities:
So… the only thing thing is keeping this layout… the icon should be ORANGE when OFF and BLUE when OFF…
I hope you can help me please…
Thanks