thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

state-switch: group not work #20

Closed wolverinevn closed 4 years ago

wolverinevn commented 4 years ago
type: 'custom:state-switch'
entity: group
default: user
transition: slide-left
transition_time: 1000
states:
  user:
    type: entities
    title: User
    entities:
      - entity: AAA
  admin:
    entities:
      - entity: BBB
    show_header_toggle: false
    title: Admin
    type: entities

It always shows User card if default: user is present. When remove default state, it shows nothing. No error log in homeassistant. Browser cache is emptied. Hass has just started. entity_id option works well. User option does not work.

My bet is somehow javascript did not retrieve user or group value, this.hass.group. May another custom card break it? But I don’t see any error in browser console.

wolverinevn commented 4 years ago

Today it works. No idea why, maybe my bad. Thanks dev!