So I’m stupid, and I can’t figure out what I need to do in order to fix this issue that i’m having with the value character limit of states.
For context, I have about 36 entities whose values I want to group together into a single sensor for API reasons (using the value externally). This has worked wonderfully in the past, until I hit the 255 max length character limit on state values…
I read about JSON attributes and how they can store a lot more info, but I am stupid and don’t know how to get them to work.
Here’s my Sensor template;
sensor:
- platform: template
sensors:
shelf_values:
friendly_name: "Shelf Values"
value_template: >-
[
{{ states('input_text.shelf1_input') }},
{{ states('input_text.shelf2_input') }},
and so on for 34 more inputs...
]
attributes: >-
[
shelf1_input: "{{ states('input_text.shelf1_input') }}"
]
And essentially what I’m trying is to put all those inputs as an attribute, but both attributes
or attribute_templates
hits me with the error 'attributes' is an invalid option for 'sensor.template'
.
Does anyone have any pointers?