1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 20:52:20 +01:00
This commit is contained in:
Otto Winter
2018-06-03 07:11:11 +02:00
parent 4f3f460105
commit 967aa53bad
31 changed files with 113 additions and 170 deletions

View File

@@ -39,12 +39,10 @@ def to_code(config):
constant = DHT_MODELS[config[CONF_MODEL]]
add(dht.Pdht.set_dht_model(constant))
for _ in sensor.setup_sensor(dht.Pdht.Pget_temperature_sensor(),
dht.Pmqtt_temperature, config[CONF_TEMPERATURE]):
yield
for _ in sensor.setup_sensor(dht.Pdht.Pget_humidity_sensor(),
dht.Pmqtt_humidity, config[CONF_HUMIDITY]):
yield
sensor.setup_sensor(dht.Pdht.Pget_temperature_sensor(),
dht.Pmqtt_temperature, config[CONF_TEMPERATURE])
sensor.setup_sensor(dht.Pdht.Pget_humidity_sensor(),
dht.Pmqtt_humidity, config[CONF_HUMIDITY])
BUILD_FLAGS = '-DUSE_DHT_SENSOR'