1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-04 02:52:22 +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

@@ -4,10 +4,7 @@ from esphome.components import sensor
from esphome.const import (
CONF_ID,
UNIT_EMPTY,
ICON_EMPTY,
CONF_COMPONENT_ID,
DEVICE_CLASS_EMPTY,
)
from .. import nextion_ns, CONF_NEXTION_ID
@@ -46,7 +43,9 @@ def _validate(config):
CONFIG_SCHEMA = cv.All(
sensor.sensor_schema(UNIT_EMPTY, ICON_EMPTY, 2, DEVICE_CLASS_EMPTY)
sensor.sensor_schema(
accuracy_decimals=2,
)
.extend(
{
cv.GenerateID(): cv.declare_id(NextionSensor),