Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions homeassistant/components/asuswrt/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,23 @@ def source_type(self) -> str:
@property
def extra_state_attributes(self) -> dict[str, any]:
"""Return the attributes."""
attrs = {
"mac": self._device.mac,
"ip_address": self._device.ip_address,
}
attrs = {}
if self._device.last_activity:
attrs["last_time_reachable"] = self._device.last_activity.isoformat(
timespec="seconds"
)
return attrs

@property
def ip_address(self) -> str:
"""Return the primary ip address of the device."""
return self._device.ip_address
Comment thread
MartinHjelmare marked this conversation as resolved.

@property
def mac_address(self) -> str:
"""Return the mac address of the device."""
return self._device.mac

@property
def device_info(self) -> dict[str, any]:
"""Return the device information."""
Expand Down