mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +01:00
Update esphome/components/lps22/sensor.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
125a27a158
commit
ff66c43d37
1 changed files with 2 additions and 2 deletions
|
@ -49,8 +49,8 @@ async def to_code(config):
|
||||||
await cg.register_component(var, config)
|
await cg.register_component(var, config)
|
||||||
await i2c.register_i2c_device(var, config)
|
await i2c.register_i2c_device(var, config)
|
||||||
|
|
||||||
if CONF_TEMPERATURE in config:
|
if temperature_config := config.get(CONF_TEMPERATURE):
|
||||||
sens = await sensor.new_sensor(config[CONF_TEMPERATURE])
|
sens = await sensor.new_sensor(temperature_config)
|
||||||
cg.add(var.set_temperature_sensor(sens))
|
cg.add(var.set_temperature_sensor(sens))
|
||||||
|
|
||||||
if pressure_config := config.get(CONF_PRESSURE):
|
if pressure_config := config.get(CONF_PRESSURE):
|
||||||
|
|
Loading…
Reference in a new issue