Replies: 1 comment 1 reply
It is definitely supported when a dashboard is in a yaml mode. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Good evening, Iantrich. Brilliant work with the restriction card. I might have another idea that might help.
If many cards are being implemented, it would be great if the PIN, password, etc. could be assigned centrally. This way, it doesn't have to be changed manually for each card. Unfortunately, the function code: !secret xxx is not supported. only the code is requested here. Like: const isValid = this._config.restrictions.pin.code === input;
It would be great to consider secret.yaml entries. Something like this:
let pinCode = this._config.restrictions.pin.code;
if (typeof pinCode === 'string' && pinCode.startsWith('!secret ')) {
const secretName = pinCode.replace('!secret ', '').trim();
pinCode = this.hass.states[
secret.${secretName}]?.state || pinCode;}
const isValid = pinCode === input;
This would potentially allow for centralized, secure allocation. Changes would also be made very quickly.
Tanks!
All reactions