So I have HA Container running in docker and am trying to setup a simple REST API POST to my router to get a token value. The REST API works find from testing in postman on my laptop on the same network, But in HA it is timing out connecting. Log shows
2025-06-22 02:07:07.413 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform rest is taking over 10 seconds.
2025-06-22 02:07:42.420 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet; Retrying in background in 30 seconds
This is the code for the REST sensor:
sensor:
- platform: rest
name: “RUTX11 Token”
unique_id: “c137268b-e19f-4cb9-ba69-6671d7fca8ba”
icon: “mdi:router-wireless”
resource: https://192.168.1.1/api/login
verify_ssl: false
method: POST
scan_interval: 240
payload: ‘{ “username”: “myuser”, “password”: “mypass” }’
headers:
User-Agent: Home Assistant REST sensor
Content-Type: application/json
value_template: “{{ value_json[‘data’][‘token’] }}”
Weird thing is, it use to work, but stopped working and cant figure out for the life of me what has changed.