Skip to content

Commit

Permalink
Traduzione di calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelprete committed May 1, 2024
1 parent d8da0bc commit f02d15d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/sinapsi_alfa/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def read_modbus_alfa(self):
_LOGGER.debug(
f"(read_modbus_alfa) Key: {reg_key} Addr: {reg_addr} Type: {reg_type} DevClass: {reg_dev_class}"
)
if reg_type == "calculated":
if reg_type == "calcolato":
self.data["potenza_auto_consumata"] = (
self.data["potenza_prodotta"] - self.data["potenza_immessa"]
)
Expand Down
8 changes: 4 additions & 4 deletions custom_components/sinapsi_alfa/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
"device_class": SensorDeviceClass.POWER,
"state_class": SensorStateClass.MEASUREMENT,
"unit": UnitOfPower.KILO_WATT,
"modbus_type": "calculated",
"modbus_type": "calcolato",
"modbus_addr": None,
},
{
Expand All @@ -290,7 +290,7 @@
"device_class": SensorDeviceClass.POWER,
"state_class": SensorStateClass.MEASUREMENT,
"unit": UnitOfPower.KILO_WATT,
"modbus_type": "calculated",
"modbus_type": "calcolato",
"modbus_addr": None,
},
{
Expand All @@ -300,7 +300,7 @@
"device_class": SensorDeviceClass.ENERGY,
"state_class": SensorStateClass.TOTAL_INCREASING,
"unit": UnitOfEnergy.KILO_WATT_HOUR,
"modbus_type": "calculated",
"modbus_type": "calcolato",
"modbus_addr": None,
},
{
Expand All @@ -310,7 +310,7 @@
"device_class": SensorDeviceClass.ENERGY,
"state_class": SensorStateClass.TOTAL_INCREASING,
"unit": UnitOfEnergy.KILO_WATT_HOUR,
"modbus_type": "calculated",
"modbus_type": "calcolato",
"modbus_addr": None,
},
]

0 comments on commit f02d15d

Please sign in to comment.