I have some entity attributes that sometime exceed Jinja’s 255-byte string limit. Is there any method of expanding the limit? Alternately, is there some way of parsing an attribute into two concatenated sensors for use with a single entity?
Attributes do not have the limit. Only states do.
There are attributes that exceed Jinja’s ability to use it. If I need to create a sensor, I use a Jinja template. It’s the Jinja string variable that has the 255-byte limit. I’m trying to associate the attribute with a custom-card entity. Any string over the limit will generate an error.
Nope. It is only the entity state that has the 255 char limit. Jinja can quite happily work with more than that. e.g.
Ahhh…I see what you mean. My template is working but it seems the custom card is generating the error.
I’m embarrassed. I assumed it was me–which is typically the case.
Thanks for the help.
Which custom card?
Not a lot of them support jinja templates, most are JavaScript.
I’ve investigated a bit further. This is where things fail:
nws_daily_summary:
value_template: "{{ state_attr('weather.kbwi_daynight', 'forecast')[0].detailed_description }}"
When the attribute exceeds 255 characters, the nws_daily summary
state is unknown
along with logged errors. It appears to be the bottleneck. When I truncate the attribute, all’s well.