Open v1k70rk4 opened 9 months ago
There are a few types of devices for which the entity selection is difficult, the implementation lacking and, thus, they produce unexpected result.
The root of the issue is selecting entities across multiple "filters" (e.g. domain
or domain
+device_class
). Let's say we're talking about windows and you want to know "how many windows are open".
In HA there are 2 types of "windows"
domain: cover, device_class: window
which are window actuators with state reportingdomain: binary_sensor, device_class: window
which are simply window sensorsA comprehensive query would take all of these entities, filter on state and count all of the matched entities. However, due to the way the recognition engine is set up, we can only have a single "filter" defined by requires_context
/excludes_context
and the current implementation (for windows, at least) is to count all cover
entities, having no equivalent for binary_sensor
.
It is indeed an issue, but the solution is not in the intents
repo, but rather in how we should query for entities.
Hi, now I understand everything. Should I open a bug in the core for this, or should we consider it correct behavior?
Hello, I noticed something that I think used to work: If I ask whether the living room door is open, I get a correct answer that it is. But if I ask how many doors are open, it says 0 and it's as if it doesn't see a single door at all. The question seems to be language-independent because I get a similar result in English as well.
Q: A nappali ajtó nyitva van? [living room door is open] R: yes
Q: Hány ajtó van nyitva? [ how many doors are open] R: 0 It shows here that there are no targets even though there are 3 doors that I am monitoring.