Chart showing correlation between power usage, temperature, and humidity

Now with the lovely new Opower integration, I am able to pull my power usage.

I would like to correlate it with temperature & humidity as a line graph.

chart_type: line
period: day
type: statistics-graph
entities:
  - opower:elec_secret_special_magic_acct_no_energy_consumption
  - sensor.hamd_temperature
title: Temp to Power Usage
stat_types:
  - state
  - mean

The sensor.hamd_temperature is the mean temperature of all the temperature sensors in the property.

The above code looks kind of like it (see attached), but the Y scales are obviously not proper. I need a way to set both lines (or three if including humidity), to start at the same spot or closer to each other.

How would I go about it?

Thanks!

2023-08-22 21_43_11-Clipboard

I would say you need to use a more powerful charting tool - although it might be possible using the built-in line chart.

One of the best charting integrations is the apexcharts card (HACS). It takes a bit of work but worth it and the documentation and threads here in the community are extensive.

See below as an example.

Good luck playing with apexcharts. :slight_smile:

image

type: custom:apexcharts-card
all_series_config:
  stroke_width: 2
  show:
    offset_in_name: false
    legend_value: false
    extremas: false
    name_in_header: false
graph_span: 60d
yaxis:
  - id: energy
    min: 0
    max: ~60
    decimals: 0
    apex_config:
      tickAmount: 4
      title:
        text: kWh
        style:
          fontWeight: 400
          fontSize: 11
  - id: hours
    min: 0
    max: ~16
    decimals: 0
    apex_config:
      tickAmount: 4
      title:
        rotate: 90
        text: Hrs
        style:
          fontWeight: 400
          fontSize: 11
    show: true
    opposite: true
  - id: temp
    min: 0
    max: ~20
    decimals: 0
    apex_config:
      tickAmount: 4
      title:
        rotate: 90
        text: Hrs
        style:
          fontWeight: 400
          fontSize: 11
    show: false
    opposite: true
header:
  show: true
  title: Gas Heater Daily (60 days)
  show_states: false
  colorize_states: true
series:
  - entity: sensor.gas_heater_daily_usage
    name: Heater Hrs
    yaxis_id: hours
    color: blue
    type: column
    opacity: 0.1
    statistics:
      type: max
      period: day
      align: start
  - entity: sensor.gas_heater_daily_usage
    transform: return x * 6.2 ;
    name: Energy kWh
    yaxis_id: energy
    color: orange
    type: area
    opacity: 0.1
    statistics:
      type: max
      period: day
      align: start
  - entity: sensor.bom_temp
    name: Min Temp
    yaxis_id: temp
    color: green
    type: line
    curve: smooth
    opacity: 1
    statistics:
      type: min
      period: day
      align: middle

1 Like

I want to use it for my Mitsubishi airco. It had a energy cycle sensor. It does not show hours and kWh. Any idea?