# General understanding of the 'current state' node

**URL:** <https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372>\
**Category:** General\
**Created:** [15 February 2022 09:22 UTC](https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372 "2022-02-15T09:22:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomDK](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@TomDK](https://discourse.nodered.org/u/TomDK)\
**Post date:** [15 February 2022 09:22 UTC](https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372/1 "2022-02-15T09:22:41Z")

</div>

I have a problem understanding the 'current state' node. Set to check if the light level of a sensor is equal or less than 100, and a state type set to boolean I get two outputs channels: 'if true' and 'if false'.  
I would expect, that there is nothing coming out of the 'if true' channel if the sensor measures more than 100 lux, but there is output: false!  
So, if I connect thereafter a call service to turn on a light source, then the light will be turned on because through the 'if true' channel comes the signal 'false'.

Is there something going wrong? I am running on version 2.2.0 on home assistant add-on version 11.0.1

```auto
[{"id":"51169996390fa340","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"0df060dcc990f7a7","type":"inject","z":"51169996390fa340","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":310,"y":290,"wires":[["16c169eda288cf66"]]},{"id":"16c169eda288cf66","type":"api-current-state","z":"51169996390fa340","name":"Light level <= 100","server":"164cb1b.35ebe4e","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.outdoor_motion_sensor_terrace_2_light_level","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":530,"y":290,"wires":[["f476e7ce96bcc660"],[]]},{"id":"f476e7ce96bcc660","type":"debug","z":"51169996390fa340","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":290,"wires":[]},{"id":"164cb1b.35ebe4e","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 February 2022 10:02 UTC](https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372/2 "2022-02-15T10:02:58Z")

</div>

Is the current state node an HA node? If so you might be better asking on and HA forum.

For the future please see this post for how to post flows so that they are importable - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![TomDK](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@TomDK](https://discourse.nodered.org/u/TomDK)\
**Post date:** [15 February 2022 10:20 UTC](https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372/3 "2022-02-15T10:20:58Z")

</div>

Yes, the current state node is a HA node...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 April 2022 10:21 UTC](https://discourse.nodered.org/t/general-understanding-of-the-current-state-node/58372/4 "2022-04-16T10:21:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
