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.
Thanks.
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.
Thanks.
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
I just discovered by accident that this card seems to have a bug. If I hover my mouse slightly above the locked entity switch I get control.
Has anyone else noticed this?
Yeah I see that too. If you get it just on the edge of the touch radius:
Here´s the issue you created
I was wondering if I can apply restrictions to a button card with restriction card. Whenever trying I get something weird looking like this:
Therefore: which types of cards are supported @iantrich ?
All of them.
So how can I add it to a button card? Everything I tried ended up in… (see screenshot above Lovelace Restriction Card - Client-side Security - #138 by e-raser).
I never saw an example of restriction-card applied to a button card.
A good start would be sharing your attempted card config, rather than a screenshot.
I meanwhile managed to have it basically work and look like this (row
was set to true… beginner´s fault):
type: custom:restriction-card
row: false
card:
type: button
tap_action:
action: toggle
entity: switch.kiosk_tablet_kiosk_lock
show_state: false
show_icon: true
show_name: true
name: Kiosk-Sperre
restrictions:
confirm: null
pin:
code: 1234
text: 'Gesperrter Bereich. PIN nötig:'
retry_delay: 0
max_retries: unlimited
max_retries_delay: 0
exemptions:
- user: ######################
style: |
:host {
--restriction-lock-icon-size: 18px;
--restriction-regular-lock-color: var(--accent-color);
--restriction-success-lock-color: green;
--restriction-lock-row-margin-left: 28px;
}
div#overlay {
align-items: center;
}
That button is embedded in a grid with setting
columns: 2
square: true
As you can see it looks different to the other buttons, so restriction-card behaves a bit different (it doesn´t respect/apply the square: true
setting. Any idea how to fix that?
Not that I would want to slow you down with this project of yours, but have you taken a look at custom:butto-card?
It would offer this functionality with just two lines of code and seems more appropriate for your use case.
Why bother with another card, if you can have it all-in-one?
Just saying.
Nice card, thanks. As far as I can see misses at least
…and it has some GUI issues as well.
So related to these features I still prefer custom:restriction-card
.
I am really struggling here. I have tried everything I can think of but it isn’t working. I would rather not mess with Themes for now so I was trying to move the lock icon and color it red using card-mod but I just can’t get it to work.
type: custom:restriction-card
restrictions:
confirm:
text: Are you sure you want to toggle the HVAC systems?
card:
style: |
.card-header {
font-size: 18px;
padding: 2px 15px 2px 35px
}
title: Systems
type: entities
entities:
- type: section
- entity: light.downstairs_hvac
icon: hass:hvac
type: custom:multiple-entity-row
toggle: true
entities:
- entity: sensor.downstairs_hvac_power
name: ' '
- entity: light.upstairs_hvac
icon: hass:hvac
type: custom:multiple-entity-row
toggle: true
entities:
- entity: sensor.upstairs_hvac_power
name: ' '
The style code in there is customized to move the “Systems” label over compared to the code used in all the other ones (see Sensors as an example). I would rather have “Systems” aligned with Sensors (thus using same style code), and move the Lock over to the right of the title.
At one point I was able to change the color of the text so I knew the style was doing something, but the restriction-card variables were not working.
AWESOME card by the way!! Love it!
Is there any easy way to control the height?
I have 3 horizontal stacks with button cards and the restriction card has a different height than the button card. In the past I’ve used stuff like card-mod, but I’d like to get rid of that as much as possible because it always causes some kind of problems.
created the whole dashboard from scratch and the problem is gone
I have been tearing my hair out. I have the simplest card, just trying to test it out. A basic block that shouldn’t matter to my user. When I go to interact with the card, I get the flashing lock and can’t do anything.
Apparently, I don’t know what user I am or something. Is there a special ID or something?
I have no idea, what stupid thing am I missing or do I not understand exemptions? Any help would be appreciated. Thank you
type: custom:restriction-card
restrictions:
block:
exemptions:
- user: Steve
card:
type: thermostat
entity: climate.icomfort
You need to use the user ID not username.
Thanks a lot. I never went into the users section looking for it, just profile and people. Thanks
Hi,
great card. I have a question how can i configure this card? I need to disable a boolean (Jeden Tag) if both booleans (Zeit and Helligkeit) are off:
The restriction-card
supports ONE entity for a condition.
This may be done w/o the restriction-card
- use card-mod
.
Another way to do this would be to put Zeit and Helligkeit in a group and the the group status as your restriction card condition.