Created
July 24, 2023 09:43
-
-
Save fcamblor/c1ba76900fcd04fd4c535fe040eff156 to your computer and use it in GitHub Desktop.
HA Enphase v7 sensors adjustments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
# from https://community.home-assistant.io/t/enphase-envoy-with-energy-dashboard/328668 | |
# Envoy's current_power_consumption / current_power_production are not "subtracting" solar production from it | |
# So we need to deal with it ourselves | |
- sensor: | |
- name: Grid Import Power | |
state_class: measurement | |
icon: mdi:transmission-tower | |
unit_of_measurement: W | |
device_class: power | |
state: > | |
{{ [0, states('sensor.envoy_122242068150_current_power_consumption') | int(0) - states('sensor.envoy_122242068150_current_power_production') | int(0) ] | max }} | |
- name: Grid Export Power | |
state_class: measurement | |
icon: mdi:transmission-tower | |
unit_of_measurement: W | |
device_class: power | |
state: > | |
{{ [0, states('sensor.envoy_122242068150_current_power_production') | int(0) - states('sensor.envoy_122242068150_current_power_consumption') | int(0) ] | max }} | |
sensor: | |
- platform: integration | |
name: Grid Import Energy | |
source: sensor.grid_import_power | |
unit_prefix: k | |
unit_time: h | |
method: left | |
- platform: integration | |
name: Grid Export Energy | |
source: sensor.grid_export_power | |
unit_prefix: k | |
unit_time: h | |
method: left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment