Card visibility not working the same since 2025.4

I’m curious if anyone else has noticed this - I have a tile card that has a visibility condition where the entity state cannot be ‘unknown’ or ‘unavailable’. I have that set because it’s for an entity that is not always enabled - and currently I have it disabled (because it’s not plugged in).

Prior to 2025.4, the card would not show, however now (even on 2025.4.1) the tile card shows with an error saying that it’s referencing an unknown entity. If I edit the dashboard and then click done, the condition seems to take effect and the card is properly hidden, but it seems to randomly show up again sometimes.

The only thing I’m not certain about is that I also recently installed Spook and ran the delete all orphaned entities action. I did re-enable the entity (but the device wasn’t powered on) and it seemed OK, so I don’t think Spook deleted anything it needed, but I’m also not ruling it out.

Has anyone else noticed this issue spring up?

There was a bug which was fixed. So, the behavior of visibility could be changed in your setup.
Double check if you have properly set conditions.
And check what state this entity has now.

Argh! Thanks for finding that - exactly what my issue is related to.

I’ll keep an eye out though the next time my card pops up. I currently have it checking for unknown, but interestingly, if you try is_state('something.that_doesnt_exist', 'unknown') it will return false even though states('something.that_doesnt_exist') will return unknown. I’m thinking that perhaps unknown is treated differently - kind of like NaN in JS. If that’s the case, they introduced another issue.

Check in dev tools - Template these lines:

is_state(‘sun.sunnn’,’unknown’)
states(‘sun.sunnn’)

)))

Should be the same for anyone else running 2025.4.x:

{{ is_state('sun.sunnn','unknown') }}
{{ states('sun.sunnn') }}

produces:

False
unknown