Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mustache templates not working when provided in action #1697

Closed
bkupidura opened this issue Nov 23, 2024 · 1 comment · Fixed by #1676
Closed

Mustache templates not working when provided in action #1697

bkupidura opened this issue Nov 23, 2024 · 1 comment · Fixed by #1676
Labels
bug Something isn't working

Comments

@bkupidura
Copy link

Describe the bug

When trying to use mustache template in action, no action is triggered:

message: "InputError: Invalid action format: notify."

Used payload:

{"topic":"red/notify","qos":0,"retain":false,"_msgid":"27469928bfeb88cb","notify":{"destination":["bartosz"],"message":"example message","method":"ios","type":"normal","destinationApp":"mobile_app_iphone_bartosz"},"notify_payload":{"message":"example message","data":{}},"error":{"message":"InputError: Invalid action format: notify.","source":{"id":"854f481d.469568","type":"api-call-service","name":"IOS notify","count":1},"stack":"InputError: Invalid action format: notify.\n    at ActionController.onInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/action/ActionController.js:58:19)\n    at ActionController._InputOutputController_preOnInput (/data/node_modules/node-red-contrib-home-assistant-websocket/dist/common/controllers/InputOutputController.js:61:76)\n    at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:214:26\n    at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)\n    at Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:206:11)\n    at Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:190:25)\n    at Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:499:10)\n    at deliverMessageToDestination (/usr/src/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:803:40)\n    at Immediate.<anonymous> (/usr/src/node-red/node_modules/@node-red/r..."}}

Same flow was working with previous version of node-red-contrib-home-assistant.

To Reproduce

No response

Expected behavior

No response

Screenshots

Screenshot 2024-11-23 at 19 23 09

Example Flow

No response

Environment Information

node-red-contrib-home-assistant-websocket 0.74.2
node-red 4.0.5
home-assistant 2024.10.4

Additional context

No response

@zachowj zachowj added the bug Something isn't working label Nov 23, 2024
@zachowj
Copy link
Owner

zachowj commented Nov 23, 2024

There's a current bug with mustache templates in the action field where the action property is converted to lowercase, causing variables with mixed or uppercase letters to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants