Can't find a custom sensor - where did i set it up?

Some time in the past I setup some sensors, that (i guess) query the webfront of my 3D printer.
Now, when the printer is not running HA tries to update those sensors and floods the log.

Logger: homeassistant.helpers.template
Source: helpers/template.py:540
First occurred: 27 January 2023 at 13:41:07 (10290 occurrences)
Last logged: 14:13:00

Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.duet_status.attributes.temps.current[0] }}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.duet_status.attributes.temps.bed.active }}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.duet_status.attributes.fractionPrinted }}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.duet_status.attributes.printDuration // 60 }}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.duet_status.attributes.timesLeft.filament // 60 }}'

I’d like to take counter measure, but have no idea where those sensors are defined. I search all configuration files, but can’t find a trace.

You should find the sensor in the Developer Tools > States
image
From there, clicking on the “circled i” , you should find additional information about where it is defined, which integration, bla bla bla …
image

A good habit when templating is to define a default value, like | default(0) or | int(0)

Moreover, this is the old template style, it should be replaced by, for exemple:
{{ state_attr('sensor.duet_status', 'fractionPrinted ') | float(0) }}

EDIT
Could be part of an automation, in a tempate value or condition but you’ll find the information at the same place
image

Thank, unfortunately it only refers to a group.

And when I do the same for the group it just shows it’s members

You advise for giving those a default value would be the final goal. But not until i find those suckers :wink:

Found it :slight_smile:

1 Like