mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 04:16:29 +00:00
Adjust device tracker documentation (#2335)
* Adjust device tracker documentation * Adjust defaults * Add link * Simplify text * Rename
This commit is contained in:
parent
f94f04a562
commit
a52c2ab912
@ -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).
|
@ -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 | <code>int | None</code> | `None` | The battery level of the device. |
|
||||
| hostname | <code>str | None</code> | `None` | The hostname of the device. |
|
||||
| ip_address | <code>str | None</code> | `None` | The IP address of the device. |
|
||||
| is_connected | `bool` | **Required** | The connection state of the device. |
|
||||
| mac_address | <code>str | None</code> | `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 | <code>int | None</code> | `None` | The battery level of the device. |
|
||||
| hostname | <code>str | None</code> | `None` | The hostname of the device. |
|
||||
| ip_address | <code>str | None</code> | `None` | The IP address of the device. |
|
||||
| is_connected | `bool` | **Required** | The connection state of the device. |
|
||||
| mac_address | <code>str | None</code> | `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 | <code>int | None</code> | `None` | The battery level of the device. |
|
||||
| latitude | <code>float | None</code> | `None` | The latitude coordinate of the device. |
|
||||
| location_accuracy | `int` | `0` | The location accuracy (m) of the device. |
|
||||
| location_name | <code>str | None</code> | `None` | The location name of the device. |
|
||||
| longitude | <code>float | None</code> | `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 | <code>int | None</code> | `None` | The battery level of the device. |
|
||||
| latitude | <code>float | None</code> | `None` | The latitude coordinate of the device. |
|
||||
| location_accuracy | `int` | `0` | The location accuracy (m) of the device. |
|
||||
| location_name | <code>str | None</code> | `None` | The location name of the device. |
|
||||
| longitude | <code>float | None</code> | `None` | The longitude coordinate of the device. |
|
||||
| source_type | SourceType | `SourceType.GPS` | The source type of the device. |
|
||||
|
Loading…
x
Reference in New Issue
Block a user