Open ildar170975 opened 2 months ago
And compare with visibility options where unavailable
& unknown
are different cases - and anyway treated same way:
type: entity
entity: sun.sun
visibility:
- condition: state
entity: sun.su
state: unavailable
If unknown
is selected:
type: entity
entity: sun.sun
visibility:
- condition: state
entity: sun.su
state: unknown
and the card is NOT shown - although it should be shown.
Guess your issue probably comes from here. In conditional card validation logic an entity that does not exist is assumed to have state UNAVAILABLE. Perhaps that's not correct.
In conditional card validation logic
Is same logic used for a visibility? Because it is buggy too.
I would assume it is the same, but didn't check.
Checklist
Describe the issue you are experiencing
A non-existing entity has![image](https://github.com/user-attachments/assets/d7f70de4-7160-4984-b95c-0867981beda4)
unknown
state:Consider this code:
which shows this card:![image](https://github.com/user-attachments/assets/9483610e-ddf1-4e81-96e8-2b6f55b7d951)
But the state is not
unavailable
- it isunknown
. Then why the 1st condition istrue
?Describe the behavior you expected
unknown
should not be treated asunavailable
Steps to reproduce the issue
as above
What version of Home Assistant Core has the issue?
2024.7.1
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Chrome 126.0.6478.127
Which operating system are you using to run this browser?
Win10x64
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response