mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Update sensor.py
This commit is contained in:
parent
d149aaa2d3
commit
06c0b32cea
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,10 @@ DEPENDENCIES = ["uart"]
|
|||
|
||||
ultrasonic_uart_ns = cg.esphome_ns.namespace("ultrasonic_uart")
|
||||
UltrasonicSensorComponent_UART = ultrasonic_uart_ns.class_(
|
||||
"UltrasonicSensorComponent_UART", sensor.Sensor, cg.PollingComponent, uart.UARTDevice,
|
||||
"UltrasonicSensorComponent_UART",
|
||||
sensor.Sensor,
|
||||
cg.PollingComponent,
|
||||
uart.UARTDevice,
|
||||
)
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
|
@ -36,6 +39,7 @@ FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
|
|||
stop_bits=1,
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = await sensor.new_sensor(config)
|
||||
await cg.register_component(var, config)
|
||||
|
|
Loading…
Reference in a new issue