Add model ID to WallboxEntity (#125434)

* chore: Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY

The WallboxEntity model ID is updated to use the CHARGER_PART_NUMBER_KEY value from the coordinator data. This change ensures consistency and accuracy in identifying the model of the Wallbox entity.

* Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY

* chore: Update WallboxEntity model ID to use CHARGER_PART_NUMBER_KEY

* remove obsolete key from test
pull/110489/head^2
Hessel 2024-09-06 20:40:47 +02:00 committed by GitHub
parent b9bd8f6b34
commit 457e66527a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ class WallboxEntity(CoordinatorEntity[WallboxCoordinator]):
},
name=f"Wallbox {self.coordinator.data[CHARGER_NAME_KEY]}",
manufacturer="Wallbox",
model=self.coordinator.data[CHARGER_DATA_KEY][CHARGER_PART_NUMBER_KEY],
model=self.coordinator.data[CHARGER_NAME_KEY].split(" SN")[0],
model_id=self.coordinator.data[CHARGER_DATA_KEY][CHARGER_PART_NUMBER_KEY],
sw_version=self.coordinator.data[CHARGER_DATA_KEY][CHARGER_SOFTWARE_KEY][
CHARGER_CURRENT_VERSION_KEY
],