"Manual" charts on dashboard

Hello,

I want to know if it is possible to display a manual / own chart on the dashboard (as a widget).
I would like to record some data and display it as chart. For example, I want to record data like power consumption manually - without a sensor / meter (in the first step). I would like to enter the data in a form or a sheet (google) and render it as a chart. This chart should be displayed on the dashboard.
Is that possible? Are there existing addons?

File sensor perhaps?

The last entry in the file gets picked up by the sensor. So if you manually add new readings to the end of the file the sensor will update. Then just use the history graph component to graph the file sensor. Just make sure you add a unit of measurement to the file sensor config.

1 Like

That is a possible solution.

Is there a way to read the values from a Google sheet? Or enter the Data directly in HA?

It is a little bit difficult to write stuff into a TXT file and save it every time on the running System.

Not for reading Google Sheets.

Maybe you could enter the data using an input_text (I haven’t tried this).

Input text configuration

input_text:
  mytext:
    name: MyText
    initial: 0

Template sensor configuration

sensor:
  - platform: template
    sensors:
      my_sensor:
        friendly_name: "My Sensor"
        value_template: {{ input_text.mytext | float }}
        entity_id: input_text.mytext 
        unit_of_measurement: "kW"

This will attach the date and time you enter the reading to the the measurement though.

1 Like

I found this implementation of a component for a manual meter:

It works like a charme (after entering values into the input field the chart updates). But: at the moment it shows the values in the last hours. In my usecase, I want to track my data at the end or beginning of a month. Is there a way to change the time line?

The second thing I would like to know: I want to see the difference to the last value, for example, in January there was a higher energy consumption than in December:
Input October: 3000 kWh
Input December: 4500 kWh (+1500 kWh)
Input January: 7000 kWh (+2500 kWh)

Anyone an idea how to solve that feature?

I know this is an old thread but since I’m looking to also start tracking monthly energy usage, I’m looking for some ideas too. I think the issue with adding data manually is that my Home Assistant config is setup to only keep 7 days of history so as to not bloat the db. If I want to track monthly and see a graph of annual data there will only be the most recent value. So either I set the purge to 365 days and risk having a HUGE db which could affect performance or find another way to graph.

1 Like