Skip to content

Commit c208656

Browse files
authored
Merge pull request #105 from augustynski-lukasz/amiplus-tariffs
Amiplus-patch for tarrifs T1, T2, T3, T4
2 parents dd4a20e + a98a476 commit c208656

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

components/wmbus/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,5 @@ async def to_code(config):
127127
cg.add_library(
128128
None,
129129
None,
130-
"https://github.com/SzczepanLeon/wmbus-drivers#1.3.11",
130+
"https://github.com/SzczepanLeon/wmbus-drivers#1.3.12",
131131
)

components/wmbus/sensor/__init__.py

+56
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,34 @@ def my_key(value):
135135
state_class=STATE_CLASS_TOTAL_INCREASING,
136136
icon="mdi:transmission-tower-export",
137137
),
138+
cv.Optional("total_energy_consumption_t1_kwh"): sensor.sensor_schema(
139+
accuracy_decimals=3,
140+
unit_of_measurement=UNIT_KILOWATT_HOURS,
141+
device_class=DEVICE_CLASS_ENERGY,
142+
state_class=STATE_CLASS_TOTAL_INCREASING,
143+
icon="mdi:transmission-tower-export",
144+
),
145+
cv.Optional("total_energy_consumption_t2_kwh"): sensor.sensor_schema(
146+
accuracy_decimals=3,
147+
unit_of_measurement=UNIT_KILOWATT_HOURS,
148+
device_class=DEVICE_CLASS_ENERGY,
149+
state_class=STATE_CLASS_TOTAL_INCREASING,
150+
icon="mdi:transmission-tower-export",
151+
),
152+
cv.Optional("total_energy_consumption_t3_kwh"): sensor.sensor_schema(
153+
accuracy_decimals=3,
154+
unit_of_measurement=UNIT_KILOWATT_HOURS,
155+
device_class=DEVICE_CLASS_ENERGY,
156+
state_class=STATE_CLASS_TOTAL_INCREASING,
157+
icon="mdi:transmission-tower-export",
158+
),
159+
cv.Optional("total_energy_consumption_t4_kwh"): sensor.sensor_schema(
160+
accuracy_decimals=3,
161+
unit_of_measurement=UNIT_KILOWATT_HOURS,
162+
device_class=DEVICE_CLASS_ENERGY,
163+
state_class=STATE_CLASS_TOTAL_INCREASING,
164+
icon="mdi:transmission-tower-export",
165+
),
138166
cv.Optional("current_power_consumption_kw"): sensor.sensor_schema(
139167
accuracy_decimals=3,
140168
unit_of_measurement=UNIT_KILOWATT,
@@ -149,6 +177,34 @@ def my_key(value):
149177
state_class=STATE_CLASS_TOTAL_INCREASING,
150178
icon="mdi:transmission-tower-import",
151179
),
180+
cv.Optional("total_energy_production_t1_kwh"): sensor.sensor_schema(
181+
accuracy_decimals=3,
182+
unit_of_measurement=UNIT_KILOWATT_HOURS,
183+
device_class=DEVICE_CLASS_ENERGY,
184+
state_class=STATE_CLASS_TOTAL_INCREASING,
185+
icon="mdi:transmission-tower-import",
186+
),
187+
cv.Optional("total_energy_production_t2_kwh"): sensor.sensor_schema(
188+
accuracy_decimals=3,
189+
unit_of_measurement=UNIT_KILOWATT_HOURS,
190+
device_class=DEVICE_CLASS_ENERGY,
191+
state_class=STATE_CLASS_TOTAL_INCREASING,
192+
icon="mdi:transmission-tower-import",
193+
),
194+
cv.Optional("total_energy_production_t3_kwh"): sensor.sensor_schema(
195+
accuracy_decimals=3,
196+
unit_of_measurement=UNIT_KILOWATT_HOURS,
197+
device_class=DEVICE_CLASS_ENERGY,
198+
state_class=STATE_CLASS_TOTAL_INCREASING,
199+
icon="mdi:transmission-tower-import",
200+
),
201+
cv.Optional("total_energy_production_t4_kwh"): sensor.sensor_schema(
202+
accuracy_decimals=3,
203+
unit_of_measurement=UNIT_KILOWATT_HOURS,
204+
device_class=DEVICE_CLASS_ENERGY,
205+
state_class=STATE_CLASS_TOTAL_INCREASING,
206+
icon="mdi:transmission-tower-import",
207+
),
152208
cv.Optional("current_power_production_kw"): sensor.sensor_schema(
153209
accuracy_decimals=3,
154210
unit_of_measurement=UNIT_KILOWATT,

components/wmbus/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#ifndef MY_VERSION
2-
#define MY_VERSION "3.2.1"
2+
#define MY_VERSION "3.2.2"
33
#endif

0 commit comments

Comments
 (0)