From c215fcbcb56a02cc1f6e76fcb0ebe9e72cac70ba Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 31 Jul 2022 13:47:42 +0200 Subject: [PATCH] Update device_tracker source_type properties (#1414) --- ...-29-device-tracker_source-type-deprecation.md | 16 ++++++++++++++++ docs/core/entity/device-tracker.md | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 blog/2022-07-29-device-tracker_source-type-deprecation.md diff --git a/blog/2022-07-29-device-tracker_source-type-deprecation.md b/blog/2022-07-29-device-tracker_source-type-deprecation.md new file mode 100644 index 00000000..19ec98cc --- /dev/null +++ b/blog/2022-07-29-device-tracker_source-type-deprecation.md @@ -0,0 +1,16 @@ +--- +author: Marc Mueller +authorURL: https://github.com/cdce8p +title: "Device tracker deprecations for 2022.9" +--- + +For Home Assistant Core 2022.9, we have deprecated the `device_tracker` +`SOURCE_TYPE_*` constants. +Use the new [`SourceType`](/docs/core/entity/device-tracker) enum instead. + +Deprecated constants: + +- `SOURCE_TYPE_GPS` +- `SOURCE_TYPE_ROUTER` +- `SOURCE_TYPE_BLUETOOTH` +- `SOURCE_TYPE_BLUETOOTH_LE` diff --git a/docs/core/entity/device-tracker.md b/docs/core/entity/device-tracker.md index e0a4ba64..df933bce 100644 --- a/docs/core/entity/device-tracker.md +++ b/docs/core/entity/device-tracker.md @@ -23,7 +23,7 @@ ScannerEntity does not support attribute shorthand for [property implementation] | Name | Type | Default | Description | | ------------- | ------- | ------------ | ------------------------------------------------- | -| source_type | string | **Required** | The source type, eg `gps` or `router`, of the device. | +| source_type | SourceType | **Required** | The source type, eg `gps` or `router`, of the device. | | is_connected | boolean | **Required** | The connection state of the device. | | battery_level | integer | `None` | The battery level of the device. | | ip_address | string | `None` | The IP address of the device. | @@ -54,7 +54,7 @@ TrackerEntity does not support attribute shorthand for [property implementation] | Name | Type | Default | Description | | ----------------- | ------- | ------------ | ------------------------------------------------- | -| source_type | string | **Required** | The source type, eg `gps` or `router`, of the device. | +| source_type | SourceType | **Required** | The source type, eg `gps` or `router`, of the device. | | latitude | string | **Required** | The latitude coordinate of the device. | | longitude | string | **Required** | The longitude coordinate of the device. | | battery_level | integer | `None` | The battery level of the device. |