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

Event State node - conditional check always false when changed to boolean #299

Closed
DirkMu opened this issue Dec 5, 2020 · 1 comment
Closed
Labels
Type: Bug Something isn't working

Comments

@DirkMu
Copy link

DirkMu commented Dec 5, 2020

Describe the bug

The conditional of the event state node is always false when the if state is changed to boolean.

I have lots of event state notes that use binary_sensors (on/off). The if state is changed to boolean as well as the state type. Before 0.27.8 (0.27.6) averything worked fine. Now, the conditional is only true if checked against the original value received from HA (on/off). Exemplatory I used a light which behaves the same.

To Reproduce

Steps to reproduce the behavior:

  1. Create a event state node and use an switch, light or binary_sensor
  2. Change if state to boolean 'true'
  3. Change State type to boolean
  4. Output

Expected behavior

As per documentation on is converted to true automatically. Thus the condition is true and should be send to the first output.

Screenshots

this works:
image

this does work before but does not work in 0.27.8
image

Example Flow

[{"id":"1d6d56e5.13ac69","type":"server-state-changed","z":"93117621.425f48","name":"","server":"97a02c30.758c8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.buero","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":1440,"wires":[["e6b425d7.064fc8"],["a519bebd.dc46f"]]},{"id":"e6b425d7.064fc8","type":"debug","z":"93117621.425f48","name":"true","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":528,"y":1488,"wires":[]},{"id":"a519bebd.dc46f","type":"debug","z":"93117621.425f48","name":"false","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":528,"y":1584,"wires":[]},{"id":"97a02c30.758c8","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Environment (please complete the following information):

  • Node Red Version: 1.2.5
  • Node.js Version: [e.g. 12.16.1]
  • NR Home Assistant Plugin Version: 0.27.8
  • Is Node Red running in Docker: yes

Other (please complete the following information):

  • Have you searched previous issues for duplicates?: yes

Additional context

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2020

@DirkMu: hello! 👋

This issue is being automatically closed because it does not follow the issue template.

Fixing this with automatically reopen the issue.

@github-actions github-actions bot closed this as completed Dec 5, 2020
@github-actions github-actions bot reopened this Dec 5, 2020
@zachowj zachowj added the Type: Bug Something isn't working label Dec 5, 2020
@zachowj zachowj closed this as completed in f49fd82 Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants