-
Notifications
You must be signed in to change notification settings - Fork 2
/
localvolts_usage.yaml
37 lines (31 loc) · 1.56 KB
/
localvolts_usage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
### Template Sensors ###
template:
# Confirm that the template sensors are providing correct values before using this package,
# or erroneous data will be populated in the Riemann Sum and Utility Meter sensors.
- sensor:
# Current Power Import from Grid / Export to Grid
# The sensor name used here is for the GoodWe integration using an EH inverter
# which provides values in watts.
# Instructions:
# Rewrite the state of these sensors to work with your inverter to return a
# positive value in kW for power imported from the grid and exported to the grid.
# correctionFactor is a multiplier to adjust your inverter's power values so
# they are close to the power values provided by your smart meter to your
# retailer. Start with a value of 1.00 and adjust it when you can compare it
# with your retailer's usage data.
- unique_id: inverter_import_power
name: 'Inverter: Import Power'
device_class: power
unit_of_measurement: kW
state: >
{% set power = states('sensor.meter_active_power_total') | float(0) %}
{% set correctionFactor = 1.04 %}
{{ iif (power < 0, power|abs / 1000 * correctionFactor, 0) | float }}
- unique_id: inverter_export_power
name: 'Inverter: Export Power'
device_class: power
unit_of_measurement: kW
state: >
{% set power = states('sensor.meter_active_power_total') | float(0) %}
{% set correctionFactor = 1.02 %}
{{ iif (power > 0, power / 1000 * correctionFactor, 0) | float }}