mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 04:33:27 +02:00
69879920eb
* Add black Update pre commit Update pre commit add empty line * Format with black
14 lines
394 B
Python
14 lines
394 B
Python
import esphome.codegen as cg
|
|
from esphome.components import binary_sensor, remote_base
|
|
from esphome.const import CONF_NAME
|
|
|
|
DEPENDENCIES = ["remote_receiver"]
|
|
|
|
CONFIG_SCHEMA = remote_base.validate_binary_sensor
|
|
|
|
|
|
def to_code(config):
|
|
var = yield remote_base.build_binary_sensor(config)
|
|
cg.add(var.set_name(config[CONF_NAME]))
|
|
yield binary_sensor.register_binary_sensor(var, config)
|