Validation error: state is not a string
Describe the bug
Hello guys !
Fist, thank you so much for the effort and time you put into HA and NodeRed. These are such a great tools !!
Some early description can be found here.
The sensor node should, based on the error message, accept strings, numbers and boolean.
ValidationError: "state" must be one of [string, boolean, number]
This object arrives at the sensor:
And the sensor is configured like this:
Regardless of what I do (change node, etc.) to be sure to have a string attribute, I still get this error.
As a workaround, I copy the object and use "state" as boolean.
Btw, I also tried to set another attribute as boolean, but it seems to only consider msg.payload.state
I hope his description is precise enough.
Thank you in advance for you support.
Tim
To Reproduce
- Create an object with at least one string and one boolean object
- Pass the information to a sensor node
- Configure 'state' on the string attribute.
- Run the flow.
Expected behavior
String should be accepted on the sensor node and not generate and error such as ValidationError: "state" must be one of [string, boolean, number]
Screenshots

Example Flow
My flow is very messy. Not sure it would help in that shape.
This package's version (not the Home Assistant add-on version)
0.49.0
Is Node-RED running in Docker?
No
Node-RED version
3.0.2
Node.js version
don't know
Additional context
No response