Maybe there is something in this. When I have dev tools open on the network tab with disable cache checked and do a reload I can change the value quite a few times before that error message comes up… Even after the error being thrown it seems to be working because if I go to the other view I have this helper shown in the value has changed… Looking closely at the error it has milliseconds in there which is weird as that is not part of the helper. @chris.huitema mentioned that as well
Console log is:
{code: 'invalid_format', message: "Invalid time specified: {'hours': 6, 'minutes': 10…'amPm': 'AM'} for dictionary value @ data['time']"}
code
:
"invalid_format"
message
:
"Invalid time specified: {'hours': 6, 'minutes': 10, 'seconds': 0, 'milliseconds': 0, 'amPm': 'AM'} for dictionary value @ data['time']"
Is it time to open an issue? I am doing nothing except changing the numbers on the entity card and this error is thrown?
Have you tried this? It could still have something to do with a corrupt .storage (maybe).
That does seem odd, given it doesn’t happen every time either. I don’t know the frontend’s protocol/comms well enough to comment. I’m not sure if this goes via websockets or the REST API even.
Which DB backend are you using? SQLite? And would deleting your DB be an option? I want to rule out a corrupt DB. This might not be a feasible option for you.
I don’t know, to be honest. It could be something very specific to you instance that went wrong. Do you have more helpers like this exhibiting the same issue, or is it only this one?
Yes deleted and did a search of all files using notepad++ search feature and nothing found.
Just the standard DB. No I don’t want to lose all my energy data.
I have now tried creating a differently name time helper. Same problem. Created a date helper and it was ok. Created a date and time helper and same problem. So something seems to not be passed correctly. I’m going to try and open an issue and see if I can get the attention of a dev
Edit: More info: Despite the error the time does appear to be updating as I can trigger an automation based on it. I can also set the time using an automation. However, if I load a view with the entity on it or change the value then that error is thrown (even though it appear to actually work). So maybe a frontend issue?