I would like to be able to use time triggers in the rest platform.
Below I have a rest sensor where you can see that I pull every 2 minutes the current price of electricity in Sweden. However, this does not need to be run so often. If rest would support time trigger then I could make it once every hour (or maybe even once per day depending on the data), thus offloading the servers and minimizing the risk of them pulling free access to the api.
- platform: rest
name: NordPool prices
resource_template: https://www.nordpoolgroup.com/api/marketdata/page/29?currency=SEK&endDate={{now().strftime("%d-%m-%Y")}}
value_template: "{{ value_json.data.Rows[now().strftime('%H') | int].Columns[2].Value | replace(',', '.') | float / 1000 }}"
unit_of_measurement: "SEK/kWh"
scan_interval: 120