node-red-contrib-home-assistant-websocket icon indicating copy to clipboard operation
node-red-contrib-home-assistant-websocket copied to clipboard

Event State Node Searching Entity Fails

Open koolsb opened this issue 1 year ago • 0 comments

Describe the bug

When adding or editing an event state node, I try to select or change the entity. Clicking the box properly loads the entites in my HA server. When I type anything in the box, I get a "The results could not be loaded". Looking at my browser console I am getting a HTTP 500 error:


TypeError: _a.toLowerCase is not a function
    at /data/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:75:113
    at Array.filter (<anonymous>)
    at getEntitiesSelect2 (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:72:66)
    at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/src/node-red/node_modules/express/lib/router/route.js:149:13)
    at checkHomeAssistant (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:35:5)
    at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/src/node-red/node_modules/express/lib/router/route.js:149:13)
    at disableCache (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:23:5)
    at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)

To Reproduce

  1. go to node red
  2. drag an events: state node to a flow
  3. click the new node
  4. click the entity dropdown box
  5. search for anything, even one letter
  6. get error message

Expected behavior

No response

Screenshots

Screenshot 2024-06-04 at 4 17 51 PM

Screenshot 2024-06-04 at 4 18 01 PM

Screenshot 2024-06-04 at 4 18 18 PM

Example Flow

No response

Environment Information

Version: 0.64.0

Home Assistant version: 2024.5.5 Companion version: 0.0.0

Node-RED version: 3.1.9 Docker: yes Add-on: no

Node.js version: v16.20.2 x64 linux OS: Linux 5.15.107-1-pve x64

Additional context

No response

koolsb avatar Jun 04 '24 21:06 koolsb