1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-11 22:33:49 +01:00

Convert sensor_schema to use kwargs (#2094)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Otto Winter
2021-08-01 12:21:32 +02:00
committed by GitHub
parent 81ae6709e4
commit 5c65f9f9ad
115 changed files with 1337 additions and 1371 deletions

View File

@@ -8,7 +8,6 @@ from esphome.const import (
DEVICE_CLASS_SIGNAL_STRENGTH,
STATE_CLASS_MEASUREMENT,
UNIT_DECIBEL,
ICON_EMPTY,
)
DEPENDENCIES = ["esp32_ble_tracker"]
@@ -20,11 +19,10 @@ BLERSSISensor = ble_rssi_ns.class_(
CONFIG_SCHEMA = cv.All(
sensor.sensor_schema(
UNIT_DECIBEL,
ICON_EMPTY,
0,
DEVICE_CLASS_SIGNAL_STRENGTH,
STATE_CLASS_MEASUREMENT,
unit_of_measurement=UNIT_DECIBEL,
accuracy_decimals=0,
device_class=DEVICE_CLASS_SIGNAL_STRENGTH,
state_class=STATE_CLASS_MEASUREMENT,
)
.extend(
{