SQL integration Home assistant – Scan interval off, but not working for in yaml-configurated sensors

I have a number of different SQL sensors that I created via the Yaml configuration and also have a number of SQL sensors that I created via the UI.

The sensors and queries work well, but I would like to adjust the interval of the sensors because for some sensors I only want an update once a week/month.

Today I turned off scan interval in the SQL integration and the sensors configured in the UI stopped updating, which is good. However, for the sensors configured in yaml the interval has still remained.

  1. Is this a bug?

  2. Or can I change something in my yaml configuration so that it can also be updated “manually” through automation?