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

Trigger service transforms 0 to undefined #983

Closed
pticon91 opened this issue Jul 12, 2023 · 0 comments · Fixed by #984
Closed

Trigger service transforms 0 to undefined #983

pticon91 opened this issue Jul 12, 2023 · 0 comments · Fixed by #984

Comments

@pticon91
Copy link

pticon91 commented Jul 12, 2023

Describe the bug

When calling a service nodered.trigger with numeric value 0 in payload, the payload won't be passed (tested in conjunction with switch node)

Service call

service: nodered.trigger
      data:
        entity_id: switch.friendly_name
        payload: 0

Switch node output - payload = 0

{"topic":"triggered","_msgid":"d79d6e8321acb963"}

Switch node output - payload = 1

{"topic":"triggered","payload":1,"_msgid":"5d8dd7542a767bad"}

To Reproduce

  1. NODRED
    1.A Create Switch node
    1.B Connect Switch node to Debug node
  2. Hass
    2A. Make a service call: nodered.trigger with payload = 0

Expected behavior

To receive the value as is

Screenshots

No response

Example Flow

No response

This package's version (not the Home Assistant add-on version)

0.53.0

Is Node-RED running in Docker?

Yes

Node-RED version

3.0.2

Node.js version

16.20.1

Additional context

This issue has been discovered after upgrade from v0.44 to v0.53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant