mirror of
https://github.com/esphome/esphome.git
synced 2025-01-07 13:21:44 +01:00
Fixing flake8 suggestions
This commit is contained in:
parent
1ad85619e0
commit
dde08b7eee
3 changed files with 9 additions and 8 deletions
|
@ -18,7 +18,7 @@ CONFIG_SCHEMA = (
|
|||
cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(LD2415HComponent),
|
||||
}
|
||||
}
|
||||
)
|
||||
.extend(uart.UART_DEVICE_SCHEMA)
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
|
@ -32,6 +32,7 @@ FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
|
|||
stop_bits=1,
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
|
|
|
@ -23,12 +23,12 @@ CONF_VIBRATION_CORRECTION = "vibration_correction"
|
|||
CONF_RELAY_TRIGGER_DURATION = "relay_trigger_duration"
|
||||
CONF_RELAY_TRIGGER_SPEED = "relay_trigger_speed"
|
||||
|
||||
MinSpeedThresholdNumber = ld2415h_ns.class_("MinSpeedThresholdNumber" , number.Number)
|
||||
CompensationAngleNumber = ld2415h_ns.class_("CompensationAngleNumber" , number.Number)
|
||||
SensitivityNumber = ld2415h_ns.class_("SensitivityNumber" , number.Number)
|
||||
VibrationCorrectionNumber = ld2415h_ns.class_("VibrationCorrectionNumber" , number.Number)
|
||||
MinSpeedThresholdNumber = ld2415h_ns.class_("MinSpeedThresholdNumber" , number.Number)
|
||||
CompensationAngleNumber = ld2415h_ns.class_("CompensationAngleNumber" , number.Number)
|
||||
SensitivityNumber = ld2415h_ns.class_("SensitivityNumber" , number.Number)
|
||||
VibrationCorrectionNumber = ld2415h_ns.class_("VibrationCorrectionNumber" , number.Number)
|
||||
RelayTriggerDurationNumber = ld2415h_ns.class_("RelayTriggerDurationNumber", number.Number)
|
||||
RelayTriggerSpeedNumber = ld2415h_ns.class_("RelayTriggerSpeedNumber" , number.Number)
|
||||
RelayTriggerSpeedNumber = ld2415h_ns.class_("RelayTriggerSpeedNumber" , number.Number)
|
||||
|
||||
CONFIG_SCHEMA = {
|
||||
cv.GenerateID(CONF_LD2415H_ID): cv.use_id(LD2415HComponent),
|
||||
|
@ -126,4 +126,4 @@ async def to_code(config):
|
|||
step=1,
|
||||
)
|
||||
await cg.register_parented(num, config[CONF_LD2415H_ID])
|
||||
cg.add(ld2415h_component.set_relay_trigger_speed_number(num))
|
||||
cg.add(ld2415h_component.set_relay_trigger_speed_number(num))
|
||||
|
|
|
@ -4,7 +4,7 @@ from esphome.components import sensor
|
|||
from esphome.const import (
|
||||
CONF_ID,
|
||||
CONF_SPEED,
|
||||
DEVICE_CLASS_SPEED,
|
||||
DEVICE_CLASS_SPEED,
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
UNIT_KILOMETER_PER_HOUR,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue