Skip to content

Commit

Permalink
Merge pull request #105 from augustynski-lukasz/amiplus-tariffs
Browse files Browse the repository at this point in the history
Amiplus-patch for tarrifs T1, T2, T3, T4
  • Loading branch information
SzczepanLeon authored Jul 15, 2024
2 parents dd4a20e + a98a476 commit c208656
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/wmbus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@ async def to_code(config):
cg.add_library(
None,
None,
"https://github.com/SzczepanLeon/wmbus-drivers#1.3.11",
"https://github.com/SzczepanLeon/wmbus-drivers#1.3.12",
)
56 changes: 56 additions & 0 deletions components/wmbus/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,34 @@ def my_key(value):
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-export",
),
cv.Optional("total_energy_consumption_t1_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-export",
),
cv.Optional("total_energy_consumption_t2_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-export",
),
cv.Optional("total_energy_consumption_t3_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-export",
),
cv.Optional("total_energy_consumption_t4_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-export",
),
cv.Optional("current_power_consumption_kw"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT,
Expand All @@ -149,6 +177,34 @@ def my_key(value):
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-import",
),
cv.Optional("total_energy_production_t1_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-import",
),
cv.Optional("total_energy_production_t2_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-import",
),
cv.Optional("total_energy_production_t3_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-import",
),
cv.Optional("total_energy_production_t4_kwh"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT_HOURS,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
icon="mdi:transmission-tower-import",
),
cv.Optional("current_power_production_kw"): sensor.sensor_schema(
accuracy_decimals=3,
unit_of_measurement=UNIT_KILOWATT,
Expand Down
2 changes: 1 addition & 1 deletion components/wmbus/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#ifndef MY_VERSION
#define MY_VERSION "3.2.1"
#define MY_VERSION "3.2.2"
#endif

0 comments on commit c208656

Please sign in to comment.