From a52c2ab9123f51158b09edab02a50a29e98198d4 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Wed, 25 Sep 2024 15:13:46 +0200
Subject: [PATCH] Adjust device tracker documentation (#2335)
* Adjust device tracker documentation
* Adjust defaults
* Add link
* Simplify text
* Rename
---
...9-24-device-tracker-entity-description.md} | 2 +
docs/core/entity/device-tracker.md | 40 ++++++++-----------
2 files changed, 18 insertions(+), 24 deletions(-)
rename blog/{20240924-device-tracker-entity-description.md => 2024-09-24-device-tracker-entity-description.md} (92%)
diff --git a/blog/20240924-device-tracker-entity-description.md b/blog/2024-09-24-device-tracker-entity-description.md
similarity index 92%
rename from blog/20240924-device-tracker-entity-description.md
rename to blog/2024-09-24-device-tracker-entity-description.md
index e8e4725b..1cd78622 100644
--- a/blog/20240924-device-tracker-entity-description.md
+++ b/blog/2024-09-24-device-tracker-entity-description.md
@@ -21,3 +21,5 @@ The following shorthand attributes have also been added:
- `ScannerEntity._attr_ip_address`
- `ScannerEntity._attr_mac_address`
- `ScannerEntity._attr_source_type` (defaults to `SourceType.ROUTER`)
+
+More details can be found in the [device-tracker documentation](/docs/core/entity/device-tracker).
diff --git a/docs/core/entity/device-tracker.md b/docs/core/entity/device-tracker.md
index c54cf2d6..dd1eeadd 100644
--- a/docs/core/entity/device-tracker.md
+++ b/docs/core/entity/device-tracker.md
@@ -17,18 +17,14 @@ Derive a platform entity from [`homeassistant.components.device_tracker.config_e
Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data.
:::
-:::caution
-ScannerEntity does not support attribute shorthand for [property implementation](../entity.md#entity-class-or-instance-attributes)
-:::
-
-| Name | Type | Default | Description |
-| ------------- | ---------------------------- | ------------ | ----------------------------------------------------- |
-| battery_level | int | None
| `None` | The battery level of the device. |
-| hostname | str | None
| `None` | The hostname of the device. |
-| ip_address | str | None
| `None` | The IP address of the device. |
-| is_connected | `bool` | **Required** | The connection state of the device. |
-| mac_address | str | None
| `None` | The MAC address of the device. |
-| source_type | `SourceType` | **Required** | The source type, eg `gps` or `router`, of the device. |
+| Name | Type | Default | Description |
+| ------------- | ---------------------------- | ------------------- | ----------------------------------- |
+| battery_level | int | None
| `None` | The battery level of the device. |
+| hostname | str | None
| `None` | The hostname of the device. |
+| ip_address | str | None
| `None` | The IP address of the device. |
+| is_connected | `bool` | **Required** | The connection state of the device. |
+| mac_address | str | None
| `None` | The MAC address of the device. |
+| source_type | `SourceType` | `SourceType.ROUTER` | The source type of the device. |
### DHCP discovery
@@ -48,15 +44,11 @@ Derive a platform entity from [`homeassistant.components.device_tracker.config_e
Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data.
:::
-:::caution
-TrackerEntity does not support attribute shorthand for [property implementation](../entity.md#entity-class-or-instance-attributes)
-:::
-
-| Name | Type | Default | Description |
-| ----------------- | ------------------------------ | ------------ | ----------------------------------------------------- |
-| battery_level | int | None
| `None` | The battery level of the device. |
-| latitude | float | None
| `None` | The latitude coordinate of the device. |
-| location_accuracy | `int` | `0` | The location accuracy (m) of the device. |
-| location_name | str | None
| `None` | The location name of the device. |
-| longitude | float | None
| `None` | The longitude coordinate of the device. |
-| source_type | SourceType | **Required** | The source type, eg `gps` or `router`, of the device. |
+| Name | Type | Default | Description |
+| ----------------- | ------------------------------ | ---------------- | ---------------------------------------- |
+| battery_level | int | None
| `None` | The battery level of the device. |
+| latitude | float | None
| `None` | The latitude coordinate of the device. |
+| location_accuracy | `int` | `0` | The location accuracy (m) of the device. |
+| location_name | str | None
| `None` | The location name of the device. |
+| longitude | float | None
| `None` | The longitude coordinate of the device. |
+| source_type | SourceType | `SourceType.GPS` | The source type of the device. |