2018-06-09 10:43:48 +02:00
WiFi Signal Sensor
==================
2018-11-14 22:12:27 +01:00
.. seo ::
:description: Instructions for setting up WiFi signal sensors that track the RSSI connection strength value to the network.
2021-11-16 03:19:33 +01:00
:image: network-wifi.svg
2018-11-14 22:12:27 +01:00
2018-06-09 10:43:48 +02:00
The `` wifi_signal `` sensor platform allows you to read the signal
2019-02-07 13:54:45 +01:00
strength of the currently connected :doc: `WiFi Access Point </components/wifi>` .
2018-06-09 10:43:48 +02:00
The sensor value is the `"Received signal strength indication" <https://en.wikipedia.org/wiki/Received_signal_strength_indication> `__
2021-05-05 10:13:23 +02:00
measured in decibel-milliwatts (dBm). These values are always negative and the closer they are to zero, the better the signal is.
2018-06-09 10:43:48 +02:00
.. figure :: images/wifi_signal-ui.png
:align: center
:width: 80.0%
2018-11-19 18:32:16 +01:00
.. code-block :: yaml
2018-06-09 10:43:48 +02:00
# Example configuration entry
sensor:
- platform: wifi_signal
name: "WiFi Signal Sensor"
2019-01-06 18:56:14 +01:00
update_interval: 60s
2018-06-09 10:43:48 +02:00
2022-11-28 11:11:15 +01:00
To additionally display signal strength in percentage use the :ref: `copy-sensor` (it's not possible to add the same sensor twice, because it has a static `` uniqueid `` reported to Home Assistant):
2022-10-19 08:18:09 +02:00
.. code-block :: yaml
# Example configuration entry with 2 sensors and filter
sensor:
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
name: "WiFi Signal dB"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: "WiFi Signal Percent"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "Signal %"
entity_category: "diagnostic"
2023-11-15 14:30:17 +01:00
device_class: ""
2022-10-19 08:18:09 +02:00
2018-06-09 10:43:48 +02:00
Configuration variables:
------------------------
2018-12-11 08:57:29 +01:00
- **name** (**Required** , string): The name of the WiFi signal sensor.
2018-06-09 10:43:48 +02:00
- **update_interval** (*Optional* , :ref: `config-time` ): The interval
2019-01-06 18:56:14 +01:00
to check the sensor. Defaults to `` 60s `` .
2018-06-09 10:43:48 +02:00
- **id** (*Optional* , :ref: `config-id` ): Manually specify the ID used for code generation.
2019-02-17 12:28:17 +01:00
- All other options from :ref: `Sensor <config-sensor>` .
2018-06-09 10:43:48 +02:00
.. warning ::
2018-08-22 22:05:28 +02:00
Signal strength readings are only available when WiFi is in station mode. Readings are not valid
2018-06-09 10:43:48 +02:00
if the device is acting as an access point without any station mode connection.
See Also
--------
- :ref: `sensor-filters`
2019-02-07 13:54:45 +01:00
- :doc: `/components/wifi`
2022-12-15 10:00:44 +01:00
- :doc: `/components/text_sensor/wifi_info`
2019-05-12 22:44:59 +02:00
- :apiref: `wifi_signal/wifi_signal_sensor.h`
2019-02-07 13:54:45 +01:00
- :ghedit: `Edit`