mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
Add example workaround for static uniqueid
Since the sensor's uniqueid is static you have to use the copy sensor instead. Here's an example of doing that.
This commit is contained in:
parent
d8ecd9e175
commit
50eb076c70
@ -23,6 +23,26 @@ measured in decibel-milliwatts (dBm). These values are always negative and the c
|
||||
name: "WiFi Signal Sensor"
|
||||
update_interval: 60s
|
||||
|
||||
Note: since this sensor has a static uniqueid reported to Home Assistant, you can only have one sensor of this type in a device. If you want to have another, use the :ref:`copy-sensor`:
|
||||
|
||||
.. 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"
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user