I am running Home Assistant on a Raspberry Pi at 192.168.0.15 and using the Rest API to pull sensor information.
In configuration.yaml I have
http:
cors_allowed_origins:
- 'null'
counter:
lap_counter:
initial: 0
step: 1
From the same Pi I issue the following command
curl -X GET -H "Authorization: Bearer llat " http://192.168.0.15:8123/api/states?entity_id=sensor.*
where llat is the long lived access token.
This works perfectly and pulls all the information I’ve requested.
Now I want to add an action so that the counter increments every time the Rest API is queried, but I can’t find any information about what event to use.
I’ve not been successful with all sorts of variants like eg
trigger:
platform: event
event_type: http_request
Can anyone throw any light please.