however, just to be sure, please let me ask: this makes the pin text appear first, and, after successfully entering the code, makes the confirm text appear. Which is the other way round from what I expected
The design is to use one restriction. The example is just for show. Sounds pretty unfriendly to put so many clicks in the way. The the order is what it is, I have no intention of changing it.
in the repo, there’s an ‘Invalid pin entered’ dialogue video, but no instruction how to do that… Would anyone know which confirmation text that is? Right now, with the above code, simply nothing happens except for the icon to flash.
That was removed
the last_changed isnt displayed on the entity. Since there is plenty space, that can’t be it. Does the lock overlay prevent displaying secondary_info ? Would be really appreciated if this could be done.
No, it doesn’t. You are not using the correct option; last-changed
Though I realize we can set the position of the icon in a theme, and I do use the relative setting to do so, I need the lock to be on a different spot using the cover, than when using eg a single toggle.
I will not be changing it
btw, I also added the restriction on a core entity card, but that seems futile, because clicking that simply opens the more-info, where the lock is not displayed?
If the toggle button ("input_boolean.test_boolean_4") is ON then the 2nd row is supposed to be hidden.
But it happens only after manual refresh (F5): Is it a bug?
The restriction card is supposed to be used in different places of HA GUI.
That is why it is better to have a PIN defined in one place.
I tried to specify smth like "pin: !secret my_pin" (no success). What is the best practice of storing the PIN ?
The same question about user id.
Of course, there is a walkaround - we can create a "decluttering-card" template for this:
The idea is to define a restriction-card with required settings (presumably same settings for all HA views) in ONE place (with specified pin & user id data) and then use this template in all views.
How to use the template for a row:
Hello Ian, thank you very much for your card and a quick reply!
Great that you found a reason of that behaviour. Looking forward for an update, will test it when released. Probably this “hide” option could be useful.
Every time I start learning a new card, I am usually trying to test it with some test cases (may find some new issues).
Regarding PIN - basically this is not about a privacy (“someone can steal my PIN !!!”), this is about reducing a code (“define it in one place, call it from many places”).
So I will proceed (and recommend it to other people) with decluttering-card. Together these two cards will help a lot.
I’m assuming this is an answer to me.
And yes, this is the question.
I don’t understand where to put / configure the Theme Variables.
I haven’t found one example that can tell me this.
Thanks for answering, but these are not really answers at all.
First, I have never heard of themes before, and therefore I had no configuration for it.
And how is it logical to assume that configuration that applies to this specific card only goes into a global configuration file?
It is ok not to answer questions. Better that, than to “answer” questions.
I had a feeling that you may not be aware of themes after you ignored the first link I made to help you that linked to this (emphasis mine):
The following variables are available and can be set in your theme to change the appearance of the lock. Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically anything supported by CSS.
So I linked to the Home Assistant themes document for you. Where you could read all about them.
Since you apparently have a card like this configured, why don’t you just copy / paste a few lines from that config, and this would have been answered a long time ago.
Because as I said many times already it does not go in the card, it goes in your theme. And as my theme makes extensive use of card mod it would just be confusing. But sure, here you go: Day and Night - #29 by tom_l