When ever I try to set a scan_interval, I find that my rest template sensors, and also my latest sensor continue to automatically update every 60 seconds. For my rest sensors this is not an issue, but it is for the uk_transport integration I’m trying as it has a limit of 30 api requests per 24 hours.
I don’t see any automation doing this. Any ideas what I am doing wrong please?
Yes, but that literally will not affect what you wrote. It’s not a solution, I unmarked it. You most likely forgot to restart/reload when adjusting it.
Of course it is possible. However I am very clear to perform a reload or restart. Perhaps it was quick reload instead of restart and thus does not actually activate this change. I found other similar that would only change upon restart.
I’m having the same issue of the “scan interval” not preventing regular scanning and updates. I wanted to stop it updating automatically and only when I press an “update button” (using “update entity”).
I’ve got it set to 604800 so should only be updating approx once a week, with the line in the same position as you have it. But it’s still updating all the time.
I have 100% definitely done full HA restarts (not just after adding this, but for other reasons, intergrations and additions) so it’s not that.
Not sure what else to do to make it stop updating.
Yes I understand the restart will cause it to update. I was just noting that after adding the scan interval line to the yaml, I did do a full restart.
What I want to be able to do is stop the script from updating every few minutes, as the “scan-interval: 604800” doesn’t seem to do that. Every time I navigate to the page with the train & bus times on it, they have updated. I thought adding the scan interval line in would cause them to only update once a week (not counting HA restarts of course).
What do you mean “they have updated”? Are these time sensors?
Timestamp sensors show updates in the UI however they don’t actually update. The time essentially just counts down (or up) to a specific moment in time.
The next train times and the next scheduled bus times - as shown in the pic of my transport page on HA.
On the Transport API website it says I am still getting 480 hits/calls on the API a day, which I want to reduce to below 30. I thought putting in the scan_interval line would do that, by stopping the yaml script for these train and bus times being updated, unless I press the button (shown on the screenshot) to trigger the update entity and get the latest bus and train times.
It seemed to work for the Op here - and my yaml seems to be the same as his - but I must be missing something.