Files
esphome/esphome/components/remote_receiver/binary_sensor.py
Otto Winter 8e75980ebd Cleanup dashboard JS (#491)
* Cleanup dashboard JS

* Add vscode

* Save start_mark/end_mark

* Updates

* Updates

* Remove need for cv.nameable

It's a bit hacky but removes so much bloat from integrations

* Add enum helper

* Document APIs, and Improvements

* Fixes

* Fixes

* Update PULL_REQUEST_TEMPLATE.md

* Updates

* Updates

* Updates
2019-04-22 21:56:30 +02:00

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)