Skip to content

Commit

Permalink
Include inverter ID in meter and battery names
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Feb 19, 2024
1 parent 3c1cfc2 commit 19adca0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,8 @@ async def init_device(self) -> None:
self.serial = self.decoded_common["C_SerialNumber"]
self.device_address = self.decoded_common["C_Device_address"]
self.name = (
f"{self.hub.hub_id.capitalize()} I{self.inverter_unit_id} M{self.meter_id}"
f"{self.hub.hub_id.capitalize()} "
f"I{self.inverter_unit_id} M{self.meter_id}"
)

inverter_model = self.inverter_common["C_Model"]
Expand Down Expand Up @@ -1688,7 +1689,10 @@ async def init_device(self) -> None:
self.fw_version = self.decoded_common["B_Version"]
self.serial = self.decoded_common["B_SerialNumber"]
self.device_address = self.decoded_common["B_Device_Address"]
self.name = f"{self.hub.hub_id.capitalize()} I{self.inverter_unit_id} B{self.battery_id}"
self.name = (
f"{self.hub.hub_id.capitalize()} "
f"I{self.inverter_unit_id} B{self.battery_id}"
)

inverter_model = self.inverter_common["C_Model"]
inerter_serial = self.inverter_common["C_SerialNumber"]
Expand Down

0 comments on commit 19adca0

Please sign in to comment.