Fix Freebox call sensor when no call in history (#40001)

This commit is contained in:
Quentame 2020-09-13 01:13:57 +02:00 committed by GitHub
parent 285408b46c
commit 13df452dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,7 @@ class FreeboxCallSensor(FreeboxSensor):
def async_update_state(self) -> None: def async_update_state(self) -> None:
"""Update the Freebox call sensor.""" """Update the Freebox call sensor."""
self._call_list_for_type = [] self._call_list_for_type = []
if self._router.call_list:
for call in self._router.call_list: for call in self._router.call_list:
if not call["new"]: if not call["new"]:
continue continue