I use the RESTful sensor to gather data from certain devices. However, these devices are not always online. When offline, the sensor yields errors as expected.
I do have knowledge about whether these devices are online, so it would be nice if I could add a template that immediately marks a RESTful sensor as unavailable, which could in turn prevent the sensor to execute the REST call. It will reduce errors in the logs and save resources on polling known-unavailable devices.
You could set the scan interval to a huge number (years) and automate the update using an automation with a time pattern trigger for every 30 seconds and a condition for your availability. The action to update the entities is:
Note: if you use the rest integration (as opposed to your current rest sensor platform config) you can update many sensors with the one call to a resource. e.g.