From 1c587d2e473e5445fa949744d6f965d0a7e9bcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 20 Apr 2021 23:38:07 +0300 Subject: [PATCH] Fix and add some ScannerEntity property type hints (#49500) --- .../components/device_tracker/config_entry.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/device_tracker/config_entry.py b/homeassistant/components/device_tracker/config_entry.py index 05fa4b4a60d..9a8c77686a1 100644 --- a/homeassistant/components/device_tracker/config_entry.py +++ b/homeassistant/components/device_tracker/config_entry.py @@ -134,29 +134,29 @@ class ScannerEntity(BaseTrackerEntity): """Base class for a tracked device that is on a scanned network.""" @property - def ip_address(self) -> str: + def ip_address(self) -> str | None: """Return the primary ip address of the device.""" return None @property - def mac_address(self) -> str: + def mac_address(self) -> str | None: """Return the mac address of the device.""" return None @property - def hostname(self) -> str: + def hostname(self) -> str | None: """Return hostname of the device.""" return None @property - def state(self): + def state(self) -> str: """Return the state of the device.""" if self.is_connected: return STATE_HOME return STATE_NOT_HOME @property - def is_connected(self): + def is_connected(self) -> bool: """Return true if the device is connected to the network.""" raise NotImplementedError