Node 'get entities' rules with condition 'label_registry' not working correct if logic = 'is_not'
Describe the bug
If you have 2 rules with the same condition "label_registry" only the logic with 'is' is wokring correct. if you wan't only entities wich have label A but not have label B that don't work. You get all entities with label A. if you wan't entities wich have label A and label B that work. You get only entities with label A and label b.
To Reproduce
Don't work:
"rules": [
{
"condition": "label_registry",
"property": "name",
"logic": "is",
"value": Autolights,
"valueType": "str"
},
{
"condition": "label_registry",
"property": "name",
"logic": "is_not",
"value": "Presence",
"valueType": "str"
}
]
Work:
"rules": [
{
"condition": "label_registry",
"property": "name",
"logic": "is",
"value": Autolights,
"valueType": "str"
},
{
"condition": "label_registry",
"property": "name",
"logic": "is,
"value": "Presence",
"valueType": "str"
}
]
Expected behavior
Result should be only the entities which evaluated by all rules correctly.
Screenshots
No response
Example Flow
[{"id":"3bbf78bc61855d82","type":"inject","z":"eb338817c79c6a50","name":"Presence","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"home","payloadType":"str","x":100,"y":540,"wires":[["c8713f0b3ecf5add"]]},{"id":"c8713f0b3ecf5add","type":"ha-get-entities","z":"eb338817c79c6a50","name":"Get Entities","server":"426c98e3c840b7e6","version":1,"rules":[{"condition":"label_registry","property":"name","logic":"is","value":"Autolight_Innen","valueType":"str"},{"condition":"label_registry","property":"name","logic":"is_not","value":"Presence_Lights","valueType":"str"}],"outputType":"array","outputEmptyResults":false,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":350,"y":540,"wires":[["b7b1dc9d6ca0a17c"]]},{"id":"b7b1dc9d6ca0a17c","type":"debug","z":"eb338817c79c6a50","name":"Result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":540,"wires":[]},{"id":"426c98e3c840b7e6","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
Environment Information
Node-Red 4.0.8 node-red-contrib-home-assistant-websocket 0.75.0 Homeassistant 2025.1.4
Additional context
No response
FYI: Same happens with logic 'not include' and as single rule logic 'is_not' or 'not include' works like it should.
I got it to work by
- creating the labels... applying them to the entities.
- Full restart of Home Assistant
- Entities have lost the Labels so you need to readd them