esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
285 stars 34 forks source link

Graph draws out of the specified boundary #5748

Closed chiahsing closed 2 weeks ago

chiahsing commented 3 weeks ago

The problem

The graph component doesn't check the y-coordinate and can draw out of the boundary.

Which version of ESPHome has the issue?

2024.4.1

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

No response

Component causing the issue

No response

Example YAML snippet

esphome:
  name: debug

logger:

network:

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true

api:
  encryption:
    key: !secret api_key

esp32:
  board: esp32dev

spi:
  mosi_pin: GPIO23
  clk_pin: GPIO18

debug:
  update_interval: 5s

sensor:
  - platform: uptime
    id: uptime_sensor
    update_interval: 1s
  - platform: template
    id: template_sensor
    update_interval: 1s
    lambda: |-
      return static_cast<int>(id(uptime_sensor).state) % 16;

graph:
  - id: template_graph
    duration: 1min
    width: 100
    height: 100
    x_grid: 15s
    y_grid: 5
    min_value: 5
    max_value: 10
    traces:
      - sensor: template_sensor
        continuous: true

display:
  - platform: waveshare_epaper
    cs_pin: GPIO26
    dc_pin: GPIO27
    reset_pin: GPIO14
    busy_pin: GPIO12
    model: 2.13inv3
    update_interval: 1s
    lambda: |-
      it.graph(20, 20, id(template_graph));

Anything in the logs that might be useful for us?

No response

Additional information

No response