Skip to content

Label search is not working for get-entities #1836

@akrupnov

Description

@akrupnov

Describe the bug

It appears that no matter what conditions I put into get-entities under labelRegistry they are getting ignored. I tried label_id search, name and description. Also exact match, starts with etc.

When I add a condition for area (see example flow) it works just fine.

I questioned myself but documentation does have example for negative label search and I tried that as well - no luck https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/get-entities.html

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Example Flow

[
    {
        "id": "de4cb707ab7888af",
        "type": "ha-get-entities",
        "z": "flow1",
        "name": "Get All Entities Labeled for Auto Off",
        "server": "2467b1b7.eb5bfe",
        "version": 1,
        "rules": [
            {
                "condition": "label_registry",
                "property": "name",
                "logic": "is",
                "value": "Invisible Lights",
                "valueType": "str"
            },
            {
                "condition": "area_registry",
                "property": "name",
                "logic": "is",
                "value": "Garage",
                "valueType": "str"
            }
        ],
        "outputType": "array",
        "outputEmptyResults": false,
        "outputLocationType": "msg",
        "outputLocation": "payload",
        "outputResultsCount": 1,
        "x": 440,
        "y": 240,
        "wires": [
            [
                "setEntity",
                "ef28881ee73e84bc"
            ]
        ]
    },
    {
        "id": "2467b1b7.eb5bfe",
        "type": "server",
        "name": "Home",
        "version": 5,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": "at: ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "h23",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": true
    }
]

Environment Information

[
{
"id": "de4cb707ab7888af",
"type": "ha-get-entities",
"z": "flow1",
"name": "Get All Entities Labeled for Auto Off",
"server": "2467b1b7.eb5bfe",
"version": 1,
"rules": [
{
"condition": "label_registry",
"property": "name",
"logic": "is",
"value": "Invisible Lights",
"valueType": "str"
},
{
"condition": "area_registry",
"property": "name",
"logic": "is",
"value": "Garage",
"valueType": "str"
}
],
"outputType": "array",
"outputEmptyResults": false,
"outputLocationType": "msg",
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 440,
"y": 240,
"wires": [
[
"setEntity",
"ef28881ee73e84bc"
]
]
},
{
"id": "2467b1b7.eb5bfe",
"type": "server",
"name": "Home",
"version": 5,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": "at: ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "h23",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions