Allow accept/reject delta to be specified. (#5060)

This commit is contained in:
cvwillegen
2024-03-20 09:16:52 +01:00
committed by GitHub
parent 7d9fc3ceaa
commit b95a7f6438
3 changed files with 9 additions and 2 deletions
@@ -32,6 +32,7 @@ from esphome.const import (
CONF_MAGNITUDE,
CONF_WAND_ID,
CONF_LEVEL,
CONF_DELTA,
)
from esphome.core import coroutine
from esphome.schema_extractors import SCHEMA_EXTRACT, schema_extractor
@@ -792,6 +793,7 @@ async def pioneer_action(var, config, args):
PRONTO_SCHEMA = cv.Schema(
{
cv.Required(CONF_DATA): cv.string,
cv.Optional(CONF_DELTA, default=-1): cv.int_,
}
)
@@ -803,6 +805,7 @@ def pronto_binary_sensor(var, config):
cg.StructInitializer(
ProntoData,
("data", config[CONF_DATA]),
("delta", config[CONF_DELTA]),
)
)
)