1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 23:52:28 +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

@@ -3,7 +3,6 @@ import esphome.config_validation as cv
from esphome.components import sensor
from esphome.const import (
CONF_ID,
DEVICE_CLASS_EMPTY,
STATE_CLASS_MEASUREMENT,
UNIT_PERCENT,
ICON_GAUGE,
@@ -30,7 +29,10 @@ PID_CLIMATE_SENSOR_TYPES = {
CONF_CLIMATE_ID = "climate_id"
CONFIG_SCHEMA = (
sensor.sensor_schema(
UNIT_PERCENT, ICON_GAUGE, 1, DEVICE_CLASS_EMPTY, STATE_CLASS_MEASUREMENT
unit_of_measurement=UNIT_PERCENT,
icon=ICON_GAUGE,
accuracy_decimals=1,
state_class=STATE_CLASS_MEASUREMENT,
)
.extend(
{