rtlamr2mqtt: state class exceeding 255 chars
So over night my gas sensor stopped working and my HomeAssistant logs began to fill with a repeated error:
2022-02-09 15:03:16 ERROR (MainThread) [homeassistant.util.logging] Exception in message_received when handling msg on 'rtlamr/98546445/state': '{"Time": "2022-02-09T23:03:16.552376855Z", "Offset": 0, "Length": 0, "Type": "SCM+", "Message": {"FrameSync": 5795, "ProtocolID": 30, "EndpointType": 156, "EndpointID": 98546445, "Consumption": "60090", "Tamper": 3592, "PacketCRC": 29813, "Predicted": 60110.93482659571, "Anomaly": false}}'
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.gas. State max length is 255 characters.
I’m not sure what changed to suddenly upset the state class limit, if it was my update to 2022.2.x or something else, but now my gas meter is no longer reporting any info, as it’s state class has ~280 some odd characters in it.
Am I doing something wrong that’s causing too much information to be dumped into the state, or was there a change in 2022.2.X that made it more sensitive to the output from rtlamr2mqtt that’s making the data in mqtt no longer valid to parse? (I did see there was a lot of MQTT work in 2022.2.1 through 4 so maybe that had something to do with this?)
Edit: It does seem the comment threads in Home Assistant are reporting a plethora of MQTT pains for users, so I’m leaning towards this not being something I am doing wrong, and I might need to just sit tight.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (9 by maintainers)
Yes, this what I’ve asked! Thank you.
Well, I really cannot see anything wrong with anything you have sent…
I’m going to make a change to split state_value and attributes into 2 different topics. This is something I was planning to do in the future, but it will fix the problem you’re experiencing.
I will update this issue in a few hours and will let you know how to test it out.
Thank you and sorry for the inconvenience.
On Thu., Feb. 10, 2022, 7:09 p.m. J. Eckert, @.***> wrote: