Commit 691f013
committed
Fix multiple inverters creating duplicate device instead of separate devices
PROBLEM:
When users added a second inverter (different IP address), it recreated
the same device as the first inverter instead of creating a second device
in Home Assistant. Both inverters' entities appeared under one device.
ROOT CAUSE:
Device identifier in coordinator.py used slave_id:
"identifiers": {(DOMAIN, self._slave_id)}
Both inverters typically use slave_id=1 (default), so Home Assistant
considered them the same device and merged all entities into one.
FIX:
Changed device identifier to use config entry_id (coordinator.py:536):
"identifiers": {(DOMAIN, self.entry.entry_id)}
Config entry_id is unique per integration instance, guaranteed to be
different for each inverter added, even if they have the same slave_id.
RESULT:
Users can now add multiple inverters (at different IP addresses) and
each will appear as a separate device with its own sensors.
MIGRATION NOTE:
Existing users will see their device re-created with a new ID after
updating. The old device may need to be manually removed from:
Settings → Devices & Services → Devices (search for old Growatt device)1 parent a5133dc commit 691f013
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
| 536 | + | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
540 | | - | |
| 541 | + | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
548 | | - | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| |||
0 commit comments