From 45861456f15792a5d77ffda470bae001a22a5709 Mon Sep 17 00:00:00 2001 From: RoboMagus <68224306+RoboMagus@users.noreply.github.com> Date: Tue, 11 Oct 2022 01:03:54 +0200 Subject: [PATCH] Fix default unit for ble_rssi sensor (#3874) --- esphome/components/ble_rssi/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/ble_rssi/sensor.py b/esphome/components/ble_rssi/sensor.py index bd8e4f98e3..7c7bfc58a7 100644 --- a/esphome/components/ble_rssi/sensor.py +++ b/esphome/components/ble_rssi/sensor.py @@ -9,7 +9,7 @@ from esphome.const import ( CONF_MAC_ADDRESS, DEVICE_CLASS_SIGNAL_STRENGTH, STATE_CLASS_MEASUREMENT, - UNIT_DECIBEL, + UNIT_DECIBEL_MILLIWATT, ) DEPENDENCIES = ["esp32_ble_tracker"] @@ -31,7 +31,7 @@ def _validate(config): CONFIG_SCHEMA = cv.All( sensor.sensor_schema( BLERSSISensor, - unit_of_measurement=UNIT_DECIBEL, + unit_of_measurement=UNIT_DECIBEL_MILLIWATT, accuracy_decimals=0, device_class=DEVICE_CLASS_SIGNAL_STRENGTH, state_class=STATE_CLASS_MEASUREMENT,