-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhuawei-solar-yield-package.yaml
160 lines (157 loc) · 5.23 KB
/
huawei-solar-yield-package.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# ########## Huawei Solar Integration ##########
#
# huawei-solar-yield-package.yaml
#
# - sensor.inverter_input_power_with_correction
# - sensor.solar_yield
# - sensor.solar_yield_daily
#
# - sensor.solar_yield_without_correction
# - sensor.solar_yield_without_correction_daily
#
# - sensor.solar_yield_quarter_hourly
# - sensor.inverter_yield_quarter_hourly
#
# - sensor.solar_yield_hourly
# - sensor.inverter_yield_hourly
#
# ########## Setting for UPDATE_INTERVAL in const.py ##########
#
# UPDATE_INTERVAL = timedelta(seconds=15)
#
# ########## Start: Inverter Input Power with Correction ##########
#
# - for Riemann Integration:
# - for real Solar Input Energy (Solar Yield )
#
template:
- sensor:
- name: inverter_input_power_with_correction
unique_id: inverter_input_power_with_correction
#friendly_name: "Inverter input power"
state_class: measurement
device_class: power
unit_of_measurement: "W"
icon: mdi:solar-power
state: >-
{# For SUN2000-3-10KTL-M1 (High Current Version) #}
{# Check the Input Voltage of connected MPPTs #}
{# Assuming an Input Voltage above 600 V #}
{# Adjust this value to the rated power of your inverter #}
{% set inv_rating = 6000 %}
{% set inv_input_power = states('sensor.inverter_input_power')|float(0) %}
{% if inv_input_power < (inv_rating*0.05) %}
{# inv_input_power < 300 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.1) %}
{# inv_input_power < 600 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.15) %}
{# inv_input_power < 900 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.2) %}
{# inv_input_power < 1200 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.25) %}
{# inv_input_power < 1500 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.3) %}
{# inv_input_power < 1800 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.0038)|float(0) }}
{% else %}
{# inv_input_power >= 1800 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.0063)|float(0) }}
{% endif %}
availability: >-
{{ (states('sensor.inverter_input_power')|is_number) }}
#
# ########## End: Inverter Input Power with Correction ##########
#
#
# ########## Start: Integration Sensors ##########
#
sensor:
#
# PV Panels Yield without Inverter Input Power Correction
#
# - Only for diagnostic and only used in the diagnostic cards
#
- platform: integration
name: solar_yield_without_correction
unique_id: solar_yield_without_correction
source: sensor.inverter_input_power
unit_prefix: k
method: left
#
# Solar Yield with Inverter Input Power Correction
#
# - For Production and used in the cards
#
- platform: integration
name: solar_yield
unique_id: solar_yield
source: sensor.inverter_input_power_with_correction
unit_prefix: k
method: left
#
# ########## End: Integration Sensors ##########
#
# ########## Start: Utility Meter Sensors ##########
#
utility_meter:
#
# Solar Yield with Inverter Input Correction
#
# - For Production and used in the Energy Cards
#
solar_yield_daily:
unique_id: "solar_yield_daily"
name: "solar_yield_daily"
# friendly_name: 'solar_yield - Energy daily'
source: sensor.solar_yield
cycle: daily
#
# PV Panels Yield without Inverter Input Correction
#
# - Only for diagnostic and only used in the diagnostic cards
#
solar_yield_without_correction_daily:
unique_id: "solar_yield_without_correction_daily"
name: "solar_yield_without_correction_daily"
# friendly_name: 'solar_yield without correction - Energy daily'
source: sensor.solar_yield_without_correction
cycle: daily
#
# Only for Calibration of sensor.solar_yield Correction
#
# - quarter-hourly
#
solar_yield_quarter_hourly:
unique_id: "solar_yield_quarter_hourly"
name: "solar_yield_quarter_hourly"
# friendly_name: 'solar_yield - Energy quarter-hourly'
source: sensor.solar_yield
cycle: quarter-hourly
inverter_yield_quarter_hourly:
unique_id: inverter_yield_quarter_hourly
name: "inverter_yield_quarter_hourly"
# friendly_name: ' inverter_yield - Energy quarter-hourly'
source: sensor.inverter_total_yield
cycle: quarter-hourly
#
# - hourly
#
solar_yield_hourly:
unique_id: "solar_yield_hourly"
name: "solar_yield_hourly"
# friendly_name: 'solar_yield - Energy hourly'
source: sensor.solar_yield
cycle: hourly
inverter_yield_hourly:
unique_id: inverter_yield_hourly
name: "inverter_yield_hourly"
# friendly_name: ' inverter_yield - Energy hourly'
source: sensor.inverter_total_yield
cycle: hourly
#
# ########## Endt: Utility Meter Sensors ##########