Correct calls to super class in ZHADeviceScannerEntity (#94924)

This commit is contained in:
Erik Montnemery 2023-06-20 22:59:13 +02:00 committed by GitHub
parent 3c34e18130
commit 16aa4c54ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,10 +118,12 @@ class ZHADeviceScannerEntity(ScannerEntity, ZhaEntity):
# We opt ZHA device tracker back into overriding this method because # We opt ZHA device tracker back into overriding this method because
# it doesn't track IP-based devices. # it doesn't track IP-based devices.
# Call Super because ScannerEntity overrode it. # Call Super because ScannerEntity overrode it.
return super(ZhaEntity, self).device_info # mypy doesn't know about fget: https://github.com/python/mypy/issues/6185
return ZhaEntity.device_info.fget(self) # type: ignore[attr-defined]
@property @property
def unique_id(self) -> str: def unique_id(self) -> str:
"""Return unique ID.""" """Return unique ID."""
# Call Super because ScannerEntity overrode it. # Call Super because ScannerEntity overrode it.
return super(ZhaEntity, self).unique_id # mypy doesn't know about fget: https://github.com/python/mypy/issues/6185
return ZhaEntity.unique_id.fget(self) # type: ignore[attr-defined]