How to find a reference to a non-existent helper device?

I have a helper device that I renamed as I was designing the functionality to use it. The desired automations are working correctly, but now I get this error every time the associated motion sensor triggers (the new name is input_text.motion_status_office).

Logger: homeassistant.helpers.service
Source: helpers/service.py:251
First occurred: 08:26:57 (2 occurrences)
Last logged: 08:27:02

Referenced entities input_text.office_motion_status are missing or not currently available

I’ve looked everywhere I can think of and haven’t been able to find what’s referencing this old helper device. There’s only one automation that triggers at this time, and I even deleted that one temporarily, but I still get this message in this log. I also searched in automations.yaml but didn’t find it there either. Any suggestions on how to resolve this?

Have you tried doing a global search in the Visual Studio Editor? It will search every file, I use it all the time to hunt down strange stuff like that.

That’s something I hadn’t thought of (good idea!), so I did that but alas it didn’t show up anywhere. Very odd.

Have you tried the Watchman integration from HACS:

That didn’t find it either, but that’s a handy tool I didn’t know about. It did find a couple of issues whiich I’ve now fixed.

As to the original issue, I even rebooted the HA VM just for kicks, but the issue is still there.

Spook identifies many such errors.

I’ll give that a try as well. Thanks for the pointer.

Spook didn’t find it either, although it also found a couple of other things that I fixed. I’m still very puzzled, so I decided to re-create that helper and now the errors are gone. I may just leave it there for now.