1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-15 14:56:59 +02:00

Merge branch 'loop_done' into integration

This commit is contained in:
J. Nick Koston 2025-06-14 22:37:11 -05:00
commit dc2e0c832b
No known key found for this signature in database
8 changed files with 22 additions and 9 deletions

View File

@ -3,6 +3,8 @@ from esphome.components import number
import esphome.config_validation as cv
from esphome.const import (
CONF_ID,
CONF_MOVE_THRESHOLD,
CONF_STILL_THRESHOLD,
CONF_TIMEOUT,
DEVICE_CLASS_DISTANCE,
DEVICE_CLASS_ILLUMINANCE,
@ -24,8 +26,6 @@ MaxDistanceTimeoutNumber = ld2410_ns.class_("MaxDistanceTimeoutNumber", number.N
CONF_MAX_MOVE_DISTANCE_GATE = "max_move_distance_gate"
CONF_MAX_STILL_DISTANCE_GATE = "max_still_distance_gate"
CONF_LIGHT_THRESHOLD = "light_threshold"
CONF_STILL_THRESHOLD = "still_threshold"
CONF_MOVE_THRESHOLD = "move_threshold"
TIMEOUT_GROUP = "timeout"

View File

@ -3,6 +3,7 @@ from esphome.components import sensor
import esphome.config_validation as cv
from esphome.const import (
CONF_LIGHT,
CONF_MOVING_DISTANCE,
DEVICE_CLASS_DISTANCE,
DEVICE_CLASS_ILLUMINANCE,
ENTITY_CATEGORY_DIAGNOSTIC,
@ -17,7 +18,6 @@ from esphome.const import (
from . import CONF_LD2410_ID, LD2410Component
DEPENDENCIES = ["ld2410"]
CONF_MOVING_DISTANCE = "moving_distance"
CONF_STILL_DISTANCE = "still_distance"
CONF_MOVING_ENERGY = "moving_energy"
CONF_STILL_ENERGY = "still_energy"

View File

@ -2,6 +2,7 @@ import esphome.codegen as cg
from esphome.components import switch
import esphome.config_validation as cv
from esphome.const import (
CONF_BLUETOOTH,
DEVICE_CLASS_SWITCH,
ENTITY_CATEGORY_CONFIG,
ICON_BLUETOOTH,
@ -14,7 +15,6 @@ BluetoothSwitch = ld2410_ns.class_("BluetoothSwitch", switch.Switch)
EngineeringModeSwitch = ld2410_ns.class_("EngineeringModeSwitch", switch.Switch)
CONF_ENGINEERING_MODE = "engineering_mode"
CONF_BLUETOOTH = "bluetooth"
CONFIG_SCHEMA = {
cv.GenerateID(CONF_LD2410_ID): cv.use_id(LD2410Component),

View File

@ -3,6 +3,8 @@ from esphome.components import number
import esphome.config_validation as cv
from esphome.const import (
CONF_ID,
CONF_MOVE_THRESHOLD,
CONF_STILL_THRESHOLD,
DEVICE_CLASS_DISTANCE,
ENTITY_CATEGORY_CONFIG,
ICON_MOTION_SENSOR,
@ -31,8 +33,6 @@ LD2420StillThresholdNumbers = ld2420_ns.class_(
)
CONF_MIN_GATE_DISTANCE = "min_gate_distance"
CONF_MAX_GATE_DISTANCE = "max_gate_distance"
CONF_STILL_THRESHOLD = "still_threshold"
CONF_MOVE_THRESHOLD = "move_threshold"
CONF_GATE_MOVE_SENSITIVITY = "gate_move_sensitivity"
CONF_GATE_STILL_SENSITIVITY = "gate_still_sensitivity"
CONF_GATE_SELECT = "gate_select"

View File

@ -1,13 +1,17 @@
import esphome.codegen as cg
from esphome.components import sensor
import esphome.config_validation as cv
from esphome.const import CONF_ID, DEVICE_CLASS_DISTANCE, UNIT_CENTIMETER
from esphome.const import (
CONF_ID,
CONF_MOVING_DISTANCE,
DEVICE_CLASS_DISTANCE,
UNIT_CENTIMETER,
)
from .. import CONF_LD2420_ID, LD2420Component, ld2420_ns
LD2420Sensor = ld2420_ns.class_("LD2420Sensor", sensor.Sensor, cg.Component)
CONF_MOVING_DISTANCE = "moving_distance"
CONF_GATE_ENERGY = "gate_energy"
CONFIG_SCHEMA = cv.All(

View File

@ -2,6 +2,7 @@ import esphome.codegen as cg
from esphome.components import switch
import esphome.config_validation as cv
from esphome.const import (
CONF_BLUETOOTH,
DEVICE_CLASS_SWITCH,
ENTITY_CATEGORY_CONFIG,
ICON_BLUETOOTH,
@ -13,7 +14,6 @@ from .. import CONF_LD2450_ID, LD2450Component, ld2450_ns
BluetoothSwitch = ld2450_ns.class_("BluetoothSwitch", switch.Switch)
MultiTargetSwitch = ld2450_ns.class_("MultiTargetSwitch", switch.Switch)
CONF_BLUETOOTH = "bluetooth"
CONF_MULTI_TARGET = "multi_target"
CONFIG_SCHEMA = {

View File

@ -89,6 +89,7 @@ CONF_BIT_DEPTH = "bit_depth"
CONF_BITS_PER_SAMPLE = "bits_per_sample"
CONF_BLOCK = "block"
CONF_BLUE = "blue"
CONF_BLUETOOTH = "bluetooth"
CONF_BOARD = "board"
CONF_BOARD_FLASH_MODE = "board_flash_mode"
CONF_BORDER = "border"
@ -527,7 +528,9 @@ CONF_MONTH = "month"
CONF_MONTHS = "months"
CONF_MOSI_PIN = "mosi_pin"
CONF_MOTION = "motion"
CONF_MOVE_THRESHOLD = "move_threshold"
CONF_MOVEMENT_COUNTER = "movement_counter"
CONF_MOVING_DISTANCE = "moving_distance"
CONF_MQTT = "mqtt"
CONF_MQTT_ID = "mqtt_id"
CONF_MULTIPLE = "multiple"
@ -835,6 +838,7 @@ CONF_STEP = "step"
CONF_STEP_DELAY = "step_delay"
CONF_STEP_MODE = "step_mode"
CONF_STEP_PIN = "step_pin"
CONF_STILL_THRESHOLD = "still_threshold"
CONF_STOP = "stop"
CONF_STOP_ACTION = "stop_action"
CONF_STORE_BASELINE = "store_baseline"

View File

@ -98,6 +98,11 @@ void Application::loop() {
this->feed_wdt(last_op_end_time);
for (Component *component : this->looping_components_) {
// Skip components that are done or failed
if (component->should_skip_loop()) {
continue;
}
// Update the cached time before each component runs
this->loop_component_start_time_ = last_op_end_time;