Activate / deactivate sensor and API call

I am using the Swiss Public Transport sensor, the API behind it has a daily call limit. I don’t want to exceed the limit and don’t want to unnecessarily use the resource - I don’t need it to call 24/7.
Is there a way of activating / deactivating the sensor. I could hard code it into the script swiss_public_transport.py but I would prefer it if I could address it through automation. So for instance if condition is met activate sensor, when other condition met deactivate. Is this possible, or is there another approach?
Thanks

1 Like