Hi, I have a REST endpoint that can give me cumulative data on how much the energy consumption is hour by hour.
How do I go about creating a manual input energy sensor?
I am new and a bit confused on how to create manual input sensors, and never tried with any energy settings either.
I have an enpoint returning a json with the data, hour by hour.
Thanks in advance!
If you have the values in a rest sensor, why do you want to use that into a input sensor? Why not use the rest sensor directly on whatever you need those values?
I custom made a local REST api that pulls the data from my energy provider cloud (instead of using their dashboard).
The problem is that it shows the values in a 1h interval and especially, rom the day before.
I do not have the real time data but the data of yesterday, hour by hour.
I created a rest sensor in the config now, but I do not know how to instruct it so the value is for a timerange of 1h (the time range also is returned in the JSON).
If I could put the data time range for which the data is valid into home assistant would be great.
Any solution would be great actually, I home I made my issue clear
At the end I would like to have either a bar chart hour by hour or a simple line chart with the daily consumption (delayed 1 day).
Now the sensor has this config:
- platform: rest
name: "Home Energy Consumption (yesterday last hour)"
unique_id: "home_energy_cons_lasthour"
resource: http://..IP../lasthour
method: GET
device_class: energy
state_class: total_increasing
force_update: true
value_template: "{{ value_json.normal }}"
unit_of_measurement: "Wh"