Sensor value update from external device

Hi all … I have one DIY device able to send data (KWh) through API to Home Assistant.
The question is:
how I can store the value in Home Assistant. is there a Generic / dummy sensor.

MArco

Does this help?

There are several generic sensors available:

MQTT
Scrape
Rest
Template
HTTP

How do you interact with the API ?

ok, thankyou I have solve it,
I used this:
I send this API from my DIY Device:

curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
       -H "Content-Type: application/json" \
       -d '{"state": "2.5", "attributes": {"unit_of_measurement": "KWh", "friendly_name": "Consumo"}}' \
       http://localhost:8123/api/states/sensor.consumo

and I use this for trigger the Overload

binary_sensor:
  - platform: template
    sensors:
      sovraccarico:
        value_template: "{{ states('sensor.consumo')|float > 3.5 }}"
        friendly_name: 'Sovraccarico contatore ENEL'

Though after Home Assitant restart the “sensor.consumo” not exitst (DIY device send API
sometimes) I not have problem

MArco