Removed children from BluetoothDevice.to_json - it makes events too verbose

This commit is contained in:
Fabio Manganiello 2023-03-19 12:48:11 +01:00
parent 4144e4f842
commit 256d9adbf2
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -158,10 +158,6 @@ if 'bluetooth_device' not in Base.metadata:
def to_dict(self):
"""
Overwrites ``to_dict`` to transform private column names into their
public representation, and also include the exposed services and
child entities.
public representation.
"""
return {
**{k.lstrip('_'): v for k, v in super().to_dict().items()},
'children': [child.to_dict() for child in self.children],
}
return {k.lstrip('_'): v for k, v in super().to_dict().items()}