iantrich / restriction-card

🔒 Apply restrictions to Lovelace cards
MIT License
270 stars 23 forks source link

restriction-card doesn't appear in lovelace and code from Microsoft ? #90

Closed land88 closed 8 months ago

land88 commented 1 year ago

Hi,

I can't find custom:restriction-card in lovelace with Home Assistant 2023.6.2

With hacs I upload Restriction card, I find the .JS after installation here :

/config/www/community/restriction-card/restriction-card.js

My HA configuration.yaml content :

lovelace: mode: yaml resources:

But is it normal when I open the restriction-card.js, I find a code from 2017/Microsoft / Polymer ?

Thank you.

/*! ***** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. *** */ function t(t,e,i,s){var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o /

ildar170975 commented 1 year ago

I can't find custom:restriction-card in lovelace with Home Assistant 2023.6.2

What do you mean by "can't find"? Does this code work?

type: custom:restriction-card
action: hold
card:
  type: entities
  entities:
    - entity: sun.sun

image

If you mean that you cannot SELECT this card in "Add card" - well, this is a CUSTOM card w/o UI editor, you are supposed to add a code manually: image

ildar170975 commented 1 year ago

As for this - please do not create ONE issue for several unrelated reasons:

image

Please create a separate issue for that Microsoft matter.

ildar170975 commented 8 months ago

Support was provided. No feed back from OP. Closed.