Closed Spirituss closed 2 years ago
Duplicate ticket, already reported: https://github.com/thomasloven/lovelace-state-switch/issues/63
It is not. I don’t see “blank spaces”, there is no any stuff on the screen.
I have the same issue inside custom:grid-layout. I can get it to work by manually typing in the #state in the URL, but only if I first use the state that is not assigned as default.
type: custom:grid-layout
path: home
layout:
#default
grid-gap: var(--custom-layout-card-padding)
grid-template-columns: repeat(4, 1fr) 0
grid-template-rows: 0 repeat(2, fit-content(100%)) 0
grid-template-areas: |
"sidebar . . . ."
"sidebar entities entities entities ."
"sidebar_buttons footer footer footer ."
". . . . ."
mediaquery:
#phone
"(max-width: 800px)":
grid-gap: calc(var(--custom-layout-card-padding) * 1.7)
grid-template-columns: 0 repeat(2, 1fr) 0
grid-template-rows: 0 repeat(4, fit-content(100%)) 0
grid-template-areas: |
". . . ."
". sidebar sidebar ."
". entities entities ."
". footer footer ."
". sidebar_buttons sidebar_buttons ."
". . . ."
#portrait
"(max-width: 1200px)":
grid-gap: calc(var(--custom-layout-card-padding) * 2.4)
grid-template-columns: repeat(3, 1fr) 0
grid-template-rows: 0 repeat(2, fit-content(100%)) 0
grid-template-areas: |
"sidebar . . ."
"sidebar entities entities ."
"sidebar_buttons footer footer ."
". . . ."
cards:
- !include sidebar.yaml
- type: custom:state-switch
entity: hash
default: rooms
view_layout:
grid-area: entities
states:
rooms:
type: vertical-stack
cards:
- a bunch of stuff
devices:
type: vertical-stack
cards:
- more stuff
media:
type: vertical-stack
cards:
- more stuff
- !include footer.yaml
When selecting the dashboard in lovelace, nothing loads in the state-switch area. When adding #rooms to the URL, again nothing loads. When adding #devices to the URL, the devices will load. From there, I can then select the button created for #rooms and #media and those entities will load. I have also tested this by changing the default: state, which confirmed that the default will not load, even when initially manually putting the # in the URL.
Seems to be the general issue. I use state-switch on many places in lovelace and all of them don't show anything.
@thomasloven Could you advice any fix of the issue, since states: <value>:
condition doesn't works anymore.
Similar issue is here https://github.com/thomasloven/lovelace-state-switch/issues/63#issuecomment-1046300332
Any news here?
@thomasloven It works again after the last update. Thanks!
Lovelace doesn't show anything in lovelace. Here is the example of custom:state-switch, which is defined inside custom:layout-card, sensor sensor.priority has value 0.