Home assistant - Plotly

As there is some transformer works going on, I thought I'd share my graph that tries to align wind speed with generation on plotly. It's a useful graphing application.

Plotly is installed from HACS / Frontend / Add: Plotly Graph Card (https://github.com/dbuezas/lovelace-plotly-graph-card/issues)

Personally I've created a generation percentage (current generation / member capacity (note they are not the same unit)), but you can do the same with current generation.

The key appears to be fixing the two y axis to generally align, so 5mph is 0% and 35mph is 100%.

type: custom:plotly-graph
entities:
  - entity: sensor.kirk_hill_current_generation_percentage
    line:
      color: black
      width: 3
  - entity: sensor.kirk_hill_wind_speed
    line:
      color: blue
      width: 0.5
    yaxis: y2
hours_to_show: 12
refresh_interval: 60
min_y_axis: 0
max_y_axis: 100
fit_y_data: false
title: Kirk Hill Percentage Generated Recent
layout:
  yaxis:
    range:
      - 0
      - 105
  yaxis2:
    range:
      - 5
      - 35
    overlaying: 'y'
    side: right
    title: Wind Speed (m/s)
  dragmode: false
  shapes:
    - type: rect
      xref: paper
      yref: 'y'
      x0: 0
      x1: 1
      y0: 0
      y1: 2
      fillcolor: red
      opacity: 0.2
      line:
        width: 0
    - type: rect
      xref: paper
      yref: 'y'
      x0: 0
      x1: 1
      y0: 2
      y1: 10
      fillcolor: orange
      opacity: 0.2
      line:
        width: 0
    - type: rect
      xref: paper
      yref: 'y'
      x0: 0
      x1: 1
      y0: 10
      y1: 50
      fillcolor: lightgreen
      opacity: 0.2
      line:
        width: 0
    - type: rect
      xref: paper
      yref: 'y'
      x0: 0
      x1: 1
      y0: 50
      y1: 100
      fillcolor: darkgreen
      opacity: 0.2
      line:
        width: 0
1
2 replies