I have an endpoint like this:
command_line:
- sensor:
command: "curl -s -X GET 'http://example.com/api' -H 'Authorization: Bearer {{ state_attr(\"sensor.access_token\", \"access\") }}'"
value_template: "{{ value_json.amount }}"
scan_interval: 31536000
I set the scan interval to a year because I want to control when it updates using actions (homeassistant.update_entity
)
My problem is this updates every time home-assistant restarts. This endpoint has a really aggressive rate limit (4/day). This breaks the sensors every time I want to make changes to config and need to restart/reload home assistant. I can’t do anything about the endpoint. Is it possible to disable this behavior? Or circumvent it?
A restful sensor won’t work because headers can’t be templated and I can’t add the auth token (which only lasts 24h. I need it automated)