1

I see that home assistant supports making requests to a RESTful sensor (https://www.home-assistant.io/components/sensor.rest/). Is there a way to do the reverse? I.e. have a sensor initiate a rest POST into home assistant?

I realize data can be pushed in via MQTT, but this question is centered on pushing data from a sensor to home assistant using HTTP REST.

xnaclay
  • 11
  • 1
  • 1
    If Home assistant is following proper REST semantics then a GET request should return the value and a POST request should update it – hardillb Jan 09 '19 at 10:53
  • 1
    @hardillb, I believe it has proper REST semantics, but from the linked docs, home assistant is initiating the request to the sensor. The question is regarding having the sensor initiate the request to home assistant. This would require home assistant to run an HTTP server and host a REST endpoint that sensors could post to. – xnaclay Jan 09 '19 at 15:14

1 Answers1

1

Yes, the Home Assistance REST API supports POST as well as GET.

This is the relevant documentation page

Sean Houlihane
  • 10,504
  • 1
  • 25
  • 61