I have a rather large blueprint that I use to control my Sonoff thermostats.
I use Studio Code Server (CS) when editing my blueprints.
I had the automation, based on this blueprint, opened in the automation editor (AE).
I made some changes to the code in CS,
Then I:
- saved the file,
- refreshed the "template entities" in developer tools
- saved the automation in AE.
AE gave me an error so I corrected the code and performed the 3 steps again but AE gave me the precise same error again.
Then I asked google gemini if it could spot the error.
"It sure could". It gave me several suggestions to change the code structure, but none of these removed the error. Gemini was guessing most of the time off course.
Finally I tried removing all conditions in the action section except one I knew was working.
Did the 3 steps again - same error.
Then I reinserted the code and saved the file, restarted HA and voila! - AE was accepting the changes and the automation was running flawlessly.
Conclusion: HA must be caching the blueprint and sometimes fail to react when the yaml-file's timestamp has changed.
Lesson learned: If the same error is displayed over and over, despite several attempts to remedy the failure, consider restarting HA to see if that solves the problem.