Input_datetime fails on simple UI change

Tried a non-sub view and same thing

Let us know when you’ve tried this.

Another thing: Which custom frontend components do you have installed? Perhaps start commenting out the loading of such resources one by one under the resources section in your configuration.yaml.

Yes done. Thats what I meant about a non-sub view. I just put it on my regular test view and same problem

Quite a few

lovelace:
  mode: yaml
  # Include external resources only add when mode is yaml, otherwise manage in the resources in the lovelace configuration panel.
  resources:
  - type: module
    url: /hacsfiles/ha-floorplan/floorplan.js
  - type: module  
    url: /hacsfiles/bom-weather-card/bom-weather-card.js
  - type: module
    url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
  - type: module
    url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
  - type: module
    url: /hacsfiles/bar-card/bar-card.js
  - type: module
    url: /hacsfiles/lovelace-valetudo-map-card/valetudo-map-card.js
  - type: module
    url: /hacsfiles/button-card/button-card.js
  - type: module
    url: /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js
  - type: js 
    url: /hacsfiles/lovelace-card-templater/lovelace-card-templater.js?v=0.0.2
  - type: module
    url: /hacsfiles/lovelace-card-tools/card-tools.js
  - type: module
    url: /hacsfiles/apexcharts-card/apexcharts-card.js?v=1.10.0
  - type: module
    url: /hacsfiles/mini-media-player/mini-media-player-bundle.js?v=1.16.2

Edit:
Unfortunately no good. I commented everything but floorplan and still same problem

And did you do a hard refresh to make sure nothing’s cached? You can also open your browser’s dev tools and disable the cache completely.

The next step, I think, would be to rename your custom_components directory too just to be completely sure none of that code is being loaded — and do include the floorplan card too. I’ve seen it spew lots of JS errors.

when you look at the entity in the state tab of developer tools, is there a editable tag?

im just wondering is something was changed and not documented

actually i seem to remember something with milliseconds… i had issues a long time ago when something changed…

also what if you disable the automation? to confirm its just the card service call

Actually editable is false :flushed: WTF that isn’t mentioned in the docs

Edit: just tried to add an editable key and that failed… Open to ideas!

It might mean it’s editable as an input helper, not the value… I’m not 100% on what it’s for

I did read somewhere that datetime only has hh:mm and time has hh:mm:ss but I can’t find anything about it now.

Can you just create a new datetime with a helper?

OK I created the datetime via the UI.Same problem. I don’t use the defailt config could there be some dependency issue?

so just creating the helper, and adding it to a entities card doesnt work? on mine it does…

did the editable attribute change when you created via the helper ui?

i have no idea why it wouldnt work, im just spitballing ideas

Yes

I know… this is painful and will be more so if it turns out to be something obvious…

This is bizarre…

New theory:

Did you perhaps create that helper the first time when you were in UI mode for editing dashboards and then switched to YAML mode?

If you could, can you find all the references to this helper in the .storage JSON files?

Similar post, also unsolved, but the source of the above:

No I generally don’t use UI mode. The first time I ever created anything other than one dashboard was today doing testing with this. OK will delete the helper from the UI then see if it still exists in the .storage folder. Also that does look like a similar problem.

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?

1 Like

When you’ve logged the issue, please share the link here. I’d like to follow it.

Do you think frontend or core?

I agree with your reasoning. I think frontend. They can always move it if we learn something during the investigation.

1 Like
1 Like