ha-emporia-vue icon indicating copy to clipboard operation
ha-emporia-vue copied to clipboard

Three Vues, solar == complexity

Open skandragon opened this issue 2 years ago • 0 comments

I have three Vue devices monitoring three different panels:

Device "P1" has the main A/B sensors on the grid-side of the connection, and will thus measure the power coming from the grid (as a positive value) or to the grid (as a negative value) I believe.

Device "P1" also has a solar feed, with sensors attached to each of the 2 legs of the solar feed.

Device "P1" also has individual sensors on many other circuits.

The [] indicates a measurement point.

solar ---[]---+--- mains breakers to panel
              |
              []
              |
             grid

P2 has its A/B sensors on the feed lines, which connect to the grid (not P1)

"Shop" is a subpanel of P2, and is not really of interest right now.

I'm not sure how to set this up in HA's energy dashboard.

I made several templates to do some math, but I'm not sure they are at all correct:

- sensor:
    name: Solar Production
    unit_of_measurement: 'W'
    state_class: 'measurement'
    device_class: 'power'
    state: "{{states('sensor.solar_1_1_1min') | float + states('sensor.solar_2_2_1min') | float}}"
- sensor:
    name: Solar Production MON
    unit_of_measurement: 'kWh'
    device_class: 'energy'
    state_class: 'total_increasing'
    state: "{{states('sensor.solar_1_1_1mon') | float + states('sensor.solar_2_2_1mon') | float}}"
- sensor:
    name: Total Energy Usage
    unit_of_measurement: 'W'
    state_class: 'measurement'
    device_class: 'power'
    state: "{{ states('sensor.p1_left_123_1min') | float + states('sensor.p2_right_123_1min') | float + states('sensor.solar_production') | float}}"
- sensor:
    name: Total Energy Usage MON
    unit_of_measurement: 'kWh'
    device_class: 'energy'
    state_class: 'total_increasing'
    state: "{{ states('sensor.p1_left_123_1mon') | float + states('sensor.p2_right_123_1mon') | float + states('sensor.solar_production_mon') | float}}"
- sensor:
    name: Return to Grid MON
    unit_of_measurement: 'kWh'
    device_class: 'energy'
    state_class: 'total_increasing'
    state: "{{ states('sensor.p1_left_123_1mon') | float * -1.0 }}"

The Emporia app handles this setup poorly as well, but I do have a Grafana dashboard that works well for instantaneous power usage, production, and net production.

I'm not quite sure how to put all this together into a useful energy dashboard... Any suggestions?

skandragon avatar May 31 '22 22:05 skandragon