Files
shaggy-solar/LVX6048/homeassistant/template_sensors.yaml
2026-05-09 11:34:26 -04:00

55 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Derived template sensors for the 2× LVX6048 parallel stack.
# Each LVX6048 reports its own AC output and MPPT contribution; PI18 GS has
# no system-total field (PGS does, but powermon doesn't poll it). These
# rollups synthesize the household-level numbers from the per-unit data.
#
# Include into configuration.yaml as:
# template: !include lvx6048/template_sensors.yaml
#
# Stack rollups created:
# sensor.lvx6048_stack_ac_output_apparent_power VA (unit_1 + unit_2)
# sensor.lvx6048_stack_ac_output_active_power W (unit_1 + unit_2)
# sensor.lvx6048_stack_mppt1_input_power W (solar in, both units)
#
# Background: with the inverters in 120/240 split-phase wiring, an EV
# pulling 24 A at 240 V drives 24 A through each leg, so each LVX shows
# only its 120 V × 24 A ≈ 2880 VA contribution. The stack rollup is the
# real household-level number.
- sensor:
- name: "lvx6048_stack ac_output_apparent_power"
unique_id: lvx6048_stack_ac_output_apparent_power
unit_of_measurement: "VA"
device_class: apparent_power
state_class: measurement
state: >
{% set p = [
states('sensor.lvx6048_1_ac_output_apparent_power') | float(0),
states('sensor.lvx6048_2_ac_output_apparent_power') | float(0),
] %}
{{ p | sum | round(0) }}
- name: "lvx6048_stack ac_output_active_power"
unique_id: lvx6048_stack_ac_output_active_power
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% set p = [
states('sensor.lvx6048_1_ac_output_active_power') | float(0),
states('sensor.lvx6048_2_ac_output_active_power') | float(0),
] %}
{{ p | sum | round(0) }}
- name: "lvx6048_stack mppt1_input_power"
unique_id: lvx6048_stack_mppt1_input_power
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% set p = [
states('sensor.lvx6048_1_mppt1_input_power') | float(0),
states('sensor.lvx6048_2_mppt1_input_power') | float(0),
] %}
{{ p | sum | round(0) }}