mirror of
https://github.com/oxan/esphome-stream-server.git
synced 2026-05-11 20:16:34 +00:00
Use new socket wake infrastructure to reduce latency (#62)
This commit is contained in:
@@ -2,6 +2,7 @@ import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import uart
|
||||
from esphome.const import CONF_ID, CONF_PORT, CONF_BUFFER_SIZE
|
||||
from esphome.util import parse_esphome_version
|
||||
|
||||
# ESPHome doesn't know the Stream abstraction yet, so hardcode to use a UART for now.
|
||||
|
||||
@@ -44,3 +45,7 @@ async def to_code(config):
|
||||
|
||||
await cg.register_component(var, config)
|
||||
await uart.register_uart_device(var, config)
|
||||
|
||||
esphome_version = parse_esphome_version()
|
||||
if esphome_version >= (2025, 12, 0):
|
||||
uart.request_wake_loop_on_rx()
|
||||
|
||||
Reference in New Issue
Block a user