diff --git a/source/_integrations/thethingsnetwork.markdown b/source/_integrations/thethingsnetwork.markdown
index 16ecca77052..8ef8a295daf 100644
--- a/source/_integrations/thethingsnetwork.markdown
+++ b/source/_integrations/thethingsnetwork.markdown
@@ -5,32 +5,28 @@ ha_category:
- Hub
- Sensor
ha_release: 0.55
-ha_iot_class: Local Push
+ha_iot_class: Cloud Polling
ha_codeowners:
- - '@fabaff'
+ - '@angelnu'
ha_domain: thethingsnetwork
ha_platforms:
- sensor
ha_integration_type: integration
---
-
- This integration only supports TTNv2 that has been definitively switched off in 2022 (deprecated).
- For TTNv3, use the [MQTT integration](/integrations/mqtt).
-
-
The `thethingsnetwork` integration allows one to interact with the [The Things Network](https://www.thethingsnetwork.org). This community-driven and open network supports [LoRaWAN](https://www.lora-alliance.org/) for long range (~5 to 15 km) communication with a low bandwidth (51 bytes/message). [Gateways](https://www.thethingsnetwork.org/docs/gateways/) transfers the received data from the sensors to the The Things Network.
The Things network support various integrations to make the data available:
| The Things Network Integration | Home Assistant platform |
|---|---|
-| [MQTT](https://www.thethingsnetwork.org/docs/applications/mqtt/) | |
-| [Storage](https://www.thethingsnetwork.org/docs/applications/storage/) | [`thethingsnetwork`](#sensor) |
-| [HTTP](https://www.thethingsnetwork.org/docs/applications/http/) | |
+| [MQTT](https://www.thethingsindustries.com/docs/integrations/mqtt) | [`MQTT`](integrations/mqtt) |
+| [Storage](https://www.thethingsindustries.com/docs/integrations/storage) | [`thethingsnetwork`](#setup) |
+| [HTTP](https://www.thethingsindustries.com/docs/integrations/webhooks) | |
There is currently support for the following device types within Home Assistant:
+- [Setup](#setup)
- [Sensor](#sensor)
## Setup
@@ -39,106 +35,25 @@ Visit the [The Things Network Console](https://console.thethingsnetwork.org/) we
The **Application ID** is used to identify the scope of your data.
-
-
-Application overview
-
+
-You need an access key to be able to read the data from your application.
+1. Under the integrations menu, enable the storage integration:
-
-
-Access keys
-
+
-## Configuration
+2. Ensure you have an [Uplink Payload Formatter](https://www.thethingsindustries.com/docs/integrations/payload-formatters/) for your device.
-To enable this integration, add the following lines to your `configuration.yaml`:
+
-```yaml
-# Example configuration.yaml entry
-thethingsnetwork:
- app_id: sensor-123
- access_key: ttn-account-v2.xxxxxxxxxxx_yyyyyyyyyyy
-```
+3. You need an API key to be able to read the data from your application.
+ - The minimal required right is `Read Application Traffic (uplink and downlink)`.
-{% configuration %}
-app_id:
- description: The Application ID.
- required: true
- type: string
-access_key:
- description: The access key.
- required: true
- type: string
-{% endconfiguration %}
+
+
+
+{% include integrations/config_flow.md %}
## Sensor
-The `thethingsnetwork` sensor platform allows you to get data from a [The Things Network Storage Integration](https://www.thethingsnetwork.org/docs/applications/storage/).
+All uplink messages decoded by The Things Network (including a `decoded_payload` entry) will be processes by this integration. Each field in `decoded_payload` will be added as Home Assistant sensor entity.
-This platform requires that the [The Things Network integration](#configuration) is set up and the [The Things Network Storage Integration](https://www.thethingsnetwork.org/docs/applications/storage/) as well.
-
-### Prerequisites
-
-Visit the [The Things Network Console](https://console.thethingsnetwork.org/) website, log in with your The Things Network credentials, choose your application from **Applications** and go to **Integrations**.
-
-Add a new integration.
-
-
-
-Add a The Things Network integration
-
-
-Select **Data Storage**.
-
-
-
-Choose a The Things Network integration
-
-
-Click **Add integration** to finish the process.
-
-
-
-Add a The Things Network Data Storage integration
-
-
-When done, the status of the integration should be **Running**. You could check the output after clicking on **go to platform** in an interactive web interface.
-
-
-
-Add a The Things Network integration
-
-
-Select **Devices** to get the ID of your device that you want to use.
-
-
-
-Devices overview
-
-
-### Configuration
-
-To enable this platform, add the following lines to your `configuration.yaml`:
-
-```yaml
-# Example configuration.yaml entry
-sensor:
- - platform: thethingsnetwork
- device_id: ha-demo
- values:
- current: ampere
- voltage: V
-```
-
-{% configuration %}
- device_id:
- description: The ID of the device.
- required: true
- type: string
- values:
- description: The sensor values with their unit of measurement
- required: true
- type: list
-{% endconfiguration %}
diff --git a/source/images/integrations/thethingsnetwork/access_key.png b/source/images/integrations/thethingsnetwork/access_key.png
deleted file mode 100644
index 3746ece7a7f..00000000000
Binary files a/source/images/integrations/thethingsnetwork/access_key.png and /dev/null differ
diff --git a/source/images/integrations/thethingsnetwork/add_integration.png b/source/images/integrations/thethingsnetwork/add_integration.png
deleted file mode 100644
index 524791679dc..00000000000
Binary files a/source/images/integrations/thethingsnetwork/add_integration.png and /dev/null differ
diff --git a/source/images/integrations/thethingsnetwork/apis_key.png b/source/images/integrations/thethingsnetwork/apis_key.png
new file mode 100644
index 00000000000..2dbfaa511f4
Binary files /dev/null and b/source/images/integrations/thethingsnetwork/apis_key.png differ
diff --git a/source/images/integrations/thethingsnetwork/applications.png b/source/images/integrations/thethingsnetwork/applications.png
index 8aafe071dbb..9c02fb5dcad 100644
Binary files a/source/images/integrations/thethingsnetwork/applications.png and b/source/images/integrations/thethingsnetwork/applications.png differ
diff --git a/source/images/integrations/thethingsnetwork/choose_integration.png b/source/images/integrations/thethingsnetwork/choose_integration.png
deleted file mode 100644
index ad7d2a2802b..00000000000
Binary files a/source/images/integrations/thethingsnetwork/choose_integration.png and /dev/null differ
diff --git a/source/images/integrations/thethingsnetwork/confirm_integration.png b/source/images/integrations/thethingsnetwork/confirm_integration.png
deleted file mode 100644
index 16ebecf21aa..00000000000
Binary files a/source/images/integrations/thethingsnetwork/confirm_integration.png and /dev/null differ
diff --git a/source/images/integrations/thethingsnetwork/devices.png b/source/images/integrations/thethingsnetwork/devices.png
deleted file mode 100644
index 1f83f223ef3..00000000000
Binary files a/source/images/integrations/thethingsnetwork/devices.png and /dev/null differ
diff --git a/source/images/integrations/thethingsnetwork/payload_formatters.png b/source/images/integrations/thethingsnetwork/payload_formatters.png
new file mode 100644
index 00000000000..1cd340e1334
Binary files /dev/null and b/source/images/integrations/thethingsnetwork/payload_formatters.png differ
diff --git a/source/images/integrations/thethingsnetwork/storage_integration.png b/source/images/integrations/thethingsnetwork/storage_integration.png
index d8cb74fae5f..376f7445317 100644
Binary files a/source/images/integrations/thethingsnetwork/storage_integration.png and b/source/images/integrations/thethingsnetwork/storage_integration.png differ