Hello, I would like to retrieve value and I created rest sensor by the documentation. However, it seems it does not return any value and it is very hard to debug it, because I can’t find in any log the actual response from the server. What could be wrong?
The sensor definition is like this:
sensor 47:
- platform: rest
resource: https://slushpool.com/stats/json/btc/
method: GET
headers:
SlushPool-Auth-Token: <authentication token>
value_template: "{{ value_json.round_duration }}"
json_attributes:
- round_duration
name: slush
and part of the json return (if I manually trigger the call by curl
), where I want to get value “round_duration” is this:
{"btc": {"luck_b10": "0.90", "luck_b50": "1.03", "luck_b250": "0.95", "hash_rate_unit": "Gh/s", "pool_scoring_hash_rate": 7735084874.5763, "pool_active_workers": 149715, "round_probability": "0.73", "round_started": 1635783128, "round_duration": 15872,
It is nested in second level of depth.
How do I debug it and see real server response?