It will behave in the same way I’m afraid. It looks like the last_changed attribute is not updated when you start a timer that is already running. That’s more a HA core component bug… I’ll have a look if I can PR something there.
EDIT: In the meantime, you could timer.cancel and then timer.start again. Use a script to do that and instead of calling timer.start call that script from your automation or your frontend.
Hihi, I actually wanted to report a bug, but it seems it is an iOS 13 problem
Everytime I press a button on the iphone it will do it again (so it cancels the previous action). When I turn a light on it will immediately turn off again. Only when doing it in fast succession it will work. Anyways nothing to do about it for now. Safari does the same thing. Though I thought lets try it on my desktop and older ios devices and it works fine there
Lol I know, that is why I said, “wanted to”. But no worries, I can live with a workaround so np, the darkmode is just too awesome (and all other stuff seems to work fine).
Btw, just a question. I’m a bit confused about the operator stuff, is it used for changing an icon depending on state value? Or is it just for changing color? And if not, how can I change the icon, say I want a power icon when it is on and another icon when it is off.
That’s correct, if you were going to use my config “as-is” you’d need to use YAML mode. However, you could still take bits and pieces of it to use with the UI editor.
this would be a great opportunity to ask you to have a look at my earlier feature request for icon_template, (might have been snowed under here: Lovelace: Button card)
though in this case the battery icon might be better served with device_class battery which automatically changes all these icons… the icon template could color like:
icon_color: >
if (state > 75) return 'green';
if (state > 50) return 'yellow';
if (state > 25) return 'orange';
if (state > 10) return 'brown';
return 'red';
Thanks, though I am truly amazed tbh…
Considering you allow entity_picture_template (which is magic, and working wonders) among the other templates, this would be the logical thing to add wouldn’t it? You’ve introduced card templates to declutter the config, you’ve even created a dedicated unclutter card. And very glad you did!
Adding this template option would seriously enhance the options of the Button card while in the same time, seriously make it easier (and much much shorter) to configure, maintain and debug. Talk about uncluttering, this would be it
Just look at all the code doubling in your example which 1 simple template could reduce significantly. Less code, less risk for errors.
added to that, sometimes it can be useful to have the same functionality in several ways:
replace the value 0 in the last example with a state of another entity, and it makes sense to use the template variant.
Anyways, really hope you might reconsider at sometime.
have you given the <br> in name issue some thought yet? Would be really cool to have multiline names possible. I obviously tried it before asking but no such luck yet using
Could you please share your code on the section/divider for covers and living room lights.
It looks awesome how you have some customized buttons on them!
I am sorry if this is shown somewhere in this post already… this post is just so huge
Is there different configuration for toggling lights and switches?
I’ve configured exactly the same switch and light, the switch toggle works perfect, but when I use it with light - it always opening “more-info” popup like this:
You’re probably not using the latest version of the card and if you do, don’t forget to clear your cache.
You configuration is valid for the version 0.4, not valid for any version after that (default_color, color_off, … that’s deprecated for a long time already)
If that is the case… I don’t think there is a work around. It will always trigger more-info.
You should try custom:vertical-stack-in-card, if you are trying to group a button with say… for example a lovelace-slider-entity-row.
It would be funny if this is the reason, because I just tried doing this lol.