iantrich / restriction-card

🔒 Apply restrictions to Lovelace cards
MIT License
259 stars 22 forks source link

Lovelace error with HA .106 with covers and locks #13

Closed gary-reyes closed 4 years ago

gary-reyes commented 4 years ago

I have configurations where I restrict covers and locks. These are not loading with HA .106

iantrich commented 4 years ago

Fixed in 1.1.8

gary-reyes commented 4 years ago

I tried 1.1.8 but still see the same issue with lock and cover entities

This is an example config:

entities:
  - entity: light.garage
    secondary_info: last-changed
  - card:
      entity: switch.garage_outlet
      secondary_info: last-changed
      state_color: true
    condition:
      entity: switch.garage_outlet
      value: 'on'
    restrictions:
      confirm: true
    row: true
    type: 'custom:restriction-card'
  - card:
      entity: cover.garage
      secondary_info: last-changed
    condition:
      entity: cover.garage
      value: closed
    restrictions:
      confirm: true
    row: true
    type: 'custom:restriction-card'
show_header_toggle: false
state_color: true
title: Garage
type: entities

The switch restriction works, cover shows an error message that I cannot read since the line seems to be cropped out

iantrich commented 4 years ago

If you open your browser console, does it print out that you have 1.1.8 installed?

gary-reyes commented 4 years ago

HACS does. I am not sure what to look for or where exactly to look at in the console.

Also, one of the first things I did was uninstall and reinstall.

A bit more info: I added a cover entity without restriction and a cover entity with restriction. This configuration shows both entities. If I only have the cover entity with restriction, nothing shows up, only a cropped red window.

Similarly, If I have 1 lock entity without restriction and other entities without restrictions, everything shows up. If I all locks have restrictions, none show up.