Hi,
I’m completely stuck with my first REST sensor and I need someone with experience to help me out (or point me in the right direction)…
I’ve filled the configuration.yaml with the most basic example:
rest:
- resource: http://ip.jsontest.com
sensor:
- name: test_rest
value_template: "{{ value_json.ip }}"
The reason for the RESTFull instead of the REST Sensor is that I tried the sensor first and I couldn’t get that to work as well.
After a full restart of the home-assistant I don’t see the new sensor “test_rest” in my system. (Development → States → search on test_rest, nothing found)
I see in the logging that the sensor actually retrieves my IP address every 15 seconds, so it must be doing something. But how do I get the value in an entity which I can use in an automation or the dashboard?
Extract from the logging:
2024-11-15 15:24:11.759 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from http://ip.jsontest.com
2024-11-15 15:24:11.970 DEBUG (MainThread) [homeassistant.components.rest] Finished fetching rest data data in 0.212 seconds (success: True)
2024-11-15 15:24:11.971 DEBUG (MainThread) [homeassistant.components.rest.data] Data fetched from resource: {"ip": "2001:4c3c:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx"}
Any help would be very very welcome!
Thank you all very much for assisting me.
Kind regards,
Marco