Good evening,
how can i display more than 256 characters?
I made a sensor that gets the weather forecast, but it happens that the forecast is longer than 256 characters, in this case the sensor does not update.
how can I do?
Thank you very much
Good evening,
how can i display more than 256 characters?
I made a sensor that gets the weather forecast, but it happens that the forecast is longer than 256 characters, in this case the sensor does not update.
how can I do?
Thank you very much
Put the forecast text into an attribute. Then display the attribute text.
Attributes aren’t limited to 256 characters.
Thank you,
could you give me an example?
i use node-red to extract the data
Sorry, but I don’t use node-red so I have no idea how to create a sensor and attributes in HA with it.
thanks anyway.
I will try
I think exist the limit of 256 char also for attributes, because I try to set attribute with a text of 260 char but nothing displayed.
I study and try
No, I’m absolutely sure there is no char limit for attributes.
I have some that are hundreds of characters from a weather alert system in the US.
Maybe Node-Red have a limit?
But if it does then do split in Node-Red. like whenever you encounter a ". "
Another possibility is a bug in HA where nothing is shown if a value from a sensor is added to a lovelace card without any other text, like no unit.
Try to but the value line in between font tags, like sensor line
This will prevent the bug from occuring.
This is correct .
Possibly, I don’t use it either.
[{"id":"faf70f78ce583873","type":"inject","z":"ffbd7f06.4a014","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"porttitor massa id neque aliquam vestibulum morbi blandit cursus risus at ultrices mi tempus imperdiet nulla malesuada pellentesque elit eget gravida cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus mauris vitae ultricies leo integer malesuada nunc vel risus commodo viverra maecenas accumsan lacus vel facilisis volutpat est velit egestas dui id ornare arcu odio ut sem nulla pharetra diam sit amet nisl suscipit adipiscing bibendum est ultricies integer quis auctor elit sed vulputate mi sit amet mauris commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada proin libero nunc consequat interdum varius sit amet mattis vulputate enim nulla aliquet porttitor lacus luctus accumsan tortor posuere ac ut consequat semper viverra nam libero justo laoreet sit amet cursus sit amet dictum sit amet justo donec enim diam vulputate ut pharetra sit amet aliquam id diam maecenas ultricies mi eget mauris pharetra et ultrices neque ornare aenean euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus mattis rhoncus urna neque viverra justo nec ultrices dui sapien eget mi proin sed libero enim sed faucibus turpis in eu mi bibendum neque egestas congue quisque egestas diam in arcu cursus euismod quis viverra nibh","payloadType":"str","x":322,"y":832,"wires":[["041d307a73597621"]]},{"id":"041d307a73597621","type":"ha-entity","z":"ffbd7f06.4a014","name":"","server":"","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":""},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"","stateType":"date","attributes":[{"property":"lorem","value":"payload","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":488,"y":832,"wires":[["f79c603bd68b1494"]]},{"id":"f79c603bd68b1494","type":"debug","z":"ffbd7f06.4a014","name":"length of payload","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload ~> $length","targetType":"jsonata","statusVal":"payload","statusType":"auto","x":748,"y":832,"wires":[]}]
No Node-Red has no limits of 256 characters, in fact if I write the sensor status on a text file, I find everything even if it is greater than 256 characters.
I tried to set msg.payload with a 256 characters long string and I can’t see anything, if on the contrary I set the string with 255 characters, I see them correctly, even if I set the sensor attribute I always get the same behavior, if greater than 256 I do not see anything if less than the data is displayed