diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2a13b5f0..042695f5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,10 @@ Changed * ``unpair`` function of ``BleakClient`` in WinRT backend can be called without being connected to remove stored device information * Use relative imports internally. Merged #1007. +Fixed +----- +* Fixed ``tx_power`` not included in ``AdvertisementData.__repr__`` when 0. Merged #1017. + `0.17.0`_ (2022-09-12) ====================== diff --git a/bleak/backends/scanner.py b/bleak/backends/scanner.py index 4b7d8fb4..f1a0fc05 100644 --- a/bleak/backends/scanner.py +++ b/bleak/backends/scanner.py @@ -52,7 +52,7 @@ def __repr__(self) -> str: kwargs.append(f"service_data={repr(self.service_data)}") if self.service_uuids: kwargs.append(f"service_uuids={repr(self.service_uuids)}") - if self.tx_power: + if self.tx_power is not None: kwargs.append(f"tx_power={repr(self.tx_power)}") return f"AdvertisementData({', '.join(kwargs)})"