Skip to content

Commit

Permalink
Fix device info
Browse files Browse the repository at this point in the history
  • Loading branch information
ElD4n1 committed Dec 4, 2024
1 parent 0287241 commit 5ccc519
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions custom_components/bmstools/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ def unique_id(self) -> str | None:
@property
def device_info(self) -> DeviceInfo:
"""Return device specific attributes."""
return {
device_info = {
ATTR_IDENTIFIERS: {(DOMAIN, self._config_entry_data[ATTR_SERIAL_NUMBER])},
ATTR_MANUFACTURER: MANUFACTURER,
ATTR_MODEL: self._config_entry_data[ATTR_MODEL],
ATTR_SW_VERSION: self._config_entry_data[ATTR_SW_VERSION],
ATTR_HW_VERSION: self._config_entry_data[ATTR_HW_VERSION],
ATTR_DEFAULT_NAME: DEFAULT_DEVICE_NAME,
ATTR_MODEL_ID: self._config_entry_data[ATTR_MODEL],
ATTR_NAME: f"{MANUFACTURER} {DEFAULT_DEVICE_NAME} {self._config_entry_data[ATTR_MODEL]}",
}

if ATTR_SERIAL_NUMBER in self._config_entry_data:
device_info.ATTR_SERIAL_NUMBER = self._config_entry_data[ATTR_SERIAL_NUMBER]

return device_info
2 changes: 1 addition & 1 deletion custom_components/bmstools/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"documentation": "https://github.com/ElD4n1/home-assistant-bms-tools-integration",
"issue_tracker": "https://github.com/ElD4n1/home-assistant-bms-tools-integration/issues",
"requirements": [
"bmstools==1.2.0rc1"
"bmstools==1.2.1-beta.1"
],
"ssdp": [],
"zeroconf": [],
Expand Down

0 comments on commit 5ccc519

Please sign in to comment.