mirror of
https://github.com/esphome/esphome.git
synced 2024-12-01 19:24:14 +01:00
Change wifi signal strength unit to dBm (#1734)
This commit is contained in:
parent
ffc6fe9ca0
commit
f7232b199a
1 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@ from esphome.const import (
|
||||||
CONF_ID,
|
CONF_ID,
|
||||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||||
ICON_EMPTY,
|
ICON_EMPTY,
|
||||||
UNIT_DECIBEL,
|
UNIT_DECIBEL_MILLIWATT,
|
||||||
)
|
)
|
||||||
|
|
||||||
DEPENDENCIES = ["wifi"]
|
DEPENDENCIES = ["wifi"]
|
||||||
|
@ -15,7 +15,9 @@ WiFiSignalSensor = wifi_signal_ns.class_(
|
||||||
)
|
)
|
||||||
|
|
||||||
CONFIG_SCHEMA = (
|
CONFIG_SCHEMA = (
|
||||||
sensor.sensor_schema(UNIT_DECIBEL, ICON_EMPTY, 0, DEVICE_CLASS_SIGNAL_STRENGTH)
|
sensor.sensor_schema(
|
||||||
|
UNIT_DECIBEL_MILLIWATT, ICON_EMPTY, 0, DEVICE_CLASS_SIGNAL_STRENGTH
|
||||||
|
)
|
||||||
.extend(
|
.extend(
|
||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(WiFiSignalSensor),
|
cv.GenerateID(): cv.declare_id(WiFiSignalSensor),
|
||||||
|
|
Loading…
Reference in a new issue