mirror of
https://github.com/esphome/esphome.git
synced 2025-11-16 23:05:46 +00:00
@@ -21,6 +21,12 @@ def to_code(config):
|
||||
rhs = App.make_hdc1080_sensor(config[CONF_TEMPERATURE][CONF_NAME],
|
||||
config[CONF_HUMIDITY][CONF_NAME],
|
||||
config.get(CONF_UPDATE_INTERVAL))
|
||||
hdc1080 = variable('Application::MakeHDC1080Component', config[CONF_ID], rhs)
|
||||
hdc1080 = variable('Application::MakeHDC1080Sensor', config[CONF_ID], rhs)
|
||||
sensor.setup_sensor(hdc1080.Phdc1080.Pget_temperature_sensor(), config[CONF_TEMPERATURE])
|
||||
sensor.setup_mqtt_sensor_component(hdc1080.Pmqtt_temperature, config[CONF_TEMPERATURE])
|
||||
sensor.setup_sensor(hdc1080.Phdc1080.Pget_humidity_sensor(), config[CONF_HUMIDITY])
|
||||
sensor.setup_mqtt_sensor_component(hdc1080.Pmqtt_humidity, config[CONF_HUMIDITY])
|
||||
|
||||
|
||||
def build_flags(config):
|
||||
return '-DUSE_HDC1080_SENSOR'
|
||||
|
||||
Reference in New Issue
Block a user