How do I go about tracking down the source of this error: (natively installed NUC, 0.92.2)
you probably have a template somewhere that tries to use a sensor’s value that’s not yet available/defined.
I’d start searching for template sensors and automations where you have {{states.domain.component.state}}
and replace with {{states("domain.component")}}
and do the same for state attributes if you have any:
{{states.domain.component.attributes.attribute_name}}
to be replaced with {{state_attr("domain.component", "attribute_name")}}
I normally got those when a custom lovelace card had been updated but I hadn’t yet cleared my browser cache. Try a browser cache clear (Crtl + F5 in Chrome)
@sparkydave That was it! Consistent with the error count keeps repeating. Thank you.
@lolouk44 Very interesting. Such errors would be startup related? Are errors caused by not available/defined, non fatal? Thank you .
I think what @lolouk44 is referring to is instances such as a template which includes an input_datetime
where no initial value is coded and you haven’t yet entered a value. In this case the template will throw an error every minute until to give the input_datetime
a valid entry.
yeah, it’s not just input_datetime, it’s any sensor that does not have a value, yet you have a template (template sensor, condition, trigger or other automation) that checks for the sensor’s value.
Depending on what you’re trying to check, you’d get unknown
for the sensor’s state or undefined
for a sensor’s attributes if not yet initialised (thinking about the Waze sensor that takes several minutes to initialise)
Yep, I was just using that as an example. Sounds like it’s sorted though which is good
Thank you very much for the explanations!
I’m getting the same error:
http://hassio.local:8123/frontend_latest/app.7bd99ba1.js:2:60384 TypeError: can't convert undefined to object
Is there any way to determine which sensor is doing this? I have over 100 sensors and trial and error would take quite a while.
Have a look in your states list in the dev panel. See what is listed as the current state for each. The one(s) that don’t have a valid value will show up as ‘undefined’ (i believe)
Example of column to look at:
Thanks for the pointer. I have one such error remaining, it appears the a Vera Minimote (a battery operated z-wave remote), connected through a VeraPlus, reports unknown a few seconds after reporting each key press. Not using time at this time anywhere.
so now you need to check if you have any automations and change the state as I described earlier, it should fix your errors.
Do you know where the documentation for this method is located?
Look at the templating page, it has a few examples and explanations:
Thanks, I’ve done a search and none of my sensors are currently showing undefined, but I’m now no longer getting the error.
I think it may be a wifi webcam going offline, I’ll search next time the error occurs.