mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
Limit range on filter time period for remote_receiver (#4604)
* Limit range on filter time period for remote_receiver * pylint
This commit is contained in:
parent
be69b49880
commit
e4ba3ff1db
1 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,7 @@ from esphome.const import (
|
|||
CONF_TOLERANCE,
|
||||
CONF_MEMORY_BLOCKS,
|
||||
)
|
||||
from esphome.core import CORE
|
||||
from esphome.core import CORE, TimePeriod
|
||||
|
||||
AUTO_LOAD = ["remote_base"]
|
||||
remote_receiver_ns = cg.esphome_ns.namespace("remote_receiver")
|
||||
|
@ -33,9 +33,10 @@ CONFIG_SCHEMA = remote_base.validate_triggers(
|
|||
cv.SplitDefault(
|
||||
CONF_BUFFER_SIZE, esp32="10000b", esp8266="1000b"
|
||||
): cv.validate_bytes,
|
||||
cv.Optional(
|
||||
CONF_FILTER, default="50us"
|
||||
): cv.positive_time_period_microseconds,
|
||||
cv.Optional(CONF_FILTER, default="50us"): cv.All(
|
||||
cv.positive_time_period_microseconds,
|
||||
cv.Range(max=TimePeriod(microseconds=255)),
|
||||
),
|
||||
cv.Optional(
|
||||
CONF_IDLE, default="10ms"
|
||||
): cv.positive_time_period_microseconds,
|
||||
|
|
Loading…
Reference in a new issue