Setting scanning interval for custom sensor in python

I have implented a custom sensor in python based on the example found here. The sensor fetches data from an external api that updates the values once every hour. My sensor works but I would like to only fetch and stores values every hour.

Using the @Throttle decorator reduces the number of actual api call to one every hour. But HA scans the sensor every 30 seconds and stores the last read api value as a new data point. Is there a way to configure the scanning interval in the code?

If you make it a command line sensor, you can set the scan interval in the configuration.

Add a constant of

SCAN_INTERVAL = timedelta(minutes=60)

to your sensor.py