Unavailability for Restful sensors

I make use of the restful rest sensors to integrate simple devices that have some kind of API available. However, some of these devices are not always powered on. The system however, seems to keep trying to poll those devices at the configured interval.

It would be interesting to be able to configure a (template) property on these sensors that indicate that the sensor should not poll and should stay unavailable as long as this is the case. In my case, I would set such property to "{{ is_state('switch.foo', 'on') }}". Maybe it would be possible to use the availability property (although this would be a slightly different behavior compared to other usages of such property).

That would be great.
And don’t forget to vote for yourself:)

1 Like