1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 20:52:20 +01:00

Better typing to components (#225)

* Add better typing

* Fix
This commit is contained in:
Otto Winter
2018-11-08 16:01:07 +01:00
committed by GitHub
parent 94978d0063
commit 3594779401
34 changed files with 79 additions and 7 deletions

View File

@@ -8,8 +8,10 @@ from esphomeyaml.helpers import App, Application, add, variable
DEPENDENCIES = ['mqtt']
MakeMQTTSubscribeTextSensor = Application.MakeMQTTSubscribeTextSensor
MQTTSubscribeTextSensor = text_sensor.text_sensor_ns.MQTTSubscribeTextSensor
PLATFORM_SCHEMA = cv.nameable(text_sensor.TEXT_SENSOR_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(MQTTSubscribeTextSensor),
cv.GenerateID(CONF_MAKE_ID): cv.declare_variable_id(MakeMQTTSubscribeTextSensor),
vol.Required(CONF_TOPIC): cv.subscribe_topic,
vol.Optional(CONF_QOS): cv.mqtt_qos,