OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
Apache License 2.0
133 stars 32 forks source link

Sensor value scaling setting for -plot #104

Open Fettkeewl opened 6 months ago

Fettkeewl commented 6 months ago

Is your feature request related to a problem? Please describe. Displaying two graphs with huge difference in numbers wont look pretty. My power consumption ranges in the 400-7000 W and my temperature sensor is like -20 to 35

Describe the solution you'd like Scaling setting for the sensors used for graphs

Describe alternatives you've considered Create a new sensor that is prescaled

Additional context I guess i'd want a setting like below

- type: plot
  x_start: 5
  y_start: 10
  x_end: 199 # inclusive
  y_end: 119 # inclusive
  duration: 36000 # 10h in seconds
  low: -25 # if all values are larger than 10, we include 10 anyway
  high: 35 # if all values are smaller than 20, we include 20 anyway
  ylegend:
    position: right # show legend on the right
    color: red
  yaxis:
    tick_width: 4 # show very wide ticks
    grid: 3 # place a grid point every 3rd pixel
  data:
    - entity: sensor.power_meter
      width: 3 # show very thick line
      value_scale: 0.001
    - entity: sensor.my_outside_temperature
      color: red
jonasc commented 5 months ago

That sounds easily doable with the current code, I'll have a look at it in the next weeks.