Esphome display with bar graph

Hi,

I’m making a energy hub and want to add a small lcd that shows a bar graph for energy prices.

I have one on a dashboard though I want to have a esp32 with a lcd on a strategic position in the house and not use a phone or old tablet.

Though on the esphome display section all I see is a history line graph and I’m not interested in old prices all I want is current hour and some upcoming hours.

Is this possible with esphome or are there other solutions available?

Afaik the existing graph component is very basic and only plots current info from the moment of the last esp boot. I wanted a rain prediction graph. I did not look for any other custom component but drew my own graph from parsing a string and using basic rectangle and line drawing. But there might be libraries out there you can import. Code is so bad I wouldn’t dare share though :slight_smile:

Not esphome, but you could probably build something with openhasp.

1 Like

You can use esphome to achieve this function, but it won’t be very beautiful. I made a minimum and maximum temperature curve for 14 days before and after, which can be displayed on a 3.5-inch TFT.

1 Like

To implement this function, you need to use array variables (globals) to store data, and then use basic methods to draw pictures.

globals:
  - id: max_14_temp
    type: float[14]
    restore_value: yes
  - id: min_14_temp
    type: float[14]
    restore_value: yes

  - id: amax14
    type: float
    restore_value: yes
  - id: amin14
    type: float
    restore_value: yes