Get sensor config using REST

Hello,
I’m a new comer to this community
started fiddling with HA lately

I’m in the process of connecting ESP8266 based sensors to HA and been looking for a way to get some parameters (configurations) to the ESP sensor
the idea is the have a base code for several sensors but functionality would change based on configuration that is set in the HA side

Is there a way to have a REST get call to HA that will return a response based on a custom configuration file (or any other way of storing data on HA) ?

Are you looking for the RESTful API ?

well, is there a way to get something that is not from HA core ?
meaning, I want to have a config file for example:
esps.yaml:

esp8266:
  id: 123456
     pins:
       - pin.6.mode: output
       - pin.6.name: Led

and so on

Not sure, but i think storing your values in some input_* and get them via API is all you can do.
Maybe someone knows more.

OK, looking into it
I couldn’t find “input” in the API

You can get the state of any entity.

1 Like

The code here should give you an idea how to call information from a Hass install over the Rest API. You can use it to pull values from input_sliders, the state of a sensor etc. and build and config that way perhaps.