Repository navigation
Commit 5fc7362
committed
Fix deprecated device_registry.async_get_device call
async_get_device() is deprecated (removal targeted for 2027.8.0) because
device identifiers are no longer guaranteed unique across config entries.
Home Assistant logs a deprecation warning on every sw_version update:
Detected that custom integration 'solis_modbus' calls
device_registry.async_get_device, which is deprecated because device
identifiers and connections are no longer unique across config entries
Switch to the non-deprecated async_get_devices() (plural), which performs
the same identifiers-based lookup without the ambiguity concern, and take
the first match to preserve the existing single-device behavior.1 parent 92dec21 commit 5fc7362
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
0 commit comments