mirror of
https://github.com/esphome/esphome.git
synced 2025-01-07 05:11:43 +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
a1b395dbee
commit
0b962f32db
1 changed files with 2 additions and 2 deletions
|
@ -53,6 +53,6 @@ async def to_code(config):
|
|||
sens = await sensor.new_sensor(config[CONF_TEMPERATURE])
|
||||
cg.add(var.set_temperature_sensor(sens))
|
||||
|
||||
if CONF_PRESSURE in config:
|
||||
sens = await sensor.new_sensor(config[CONF_PRESSURE])
|
||||
if pressure_config := config.get(CONF_PRESSURE):
|
||||
sens = await sensor.new_sensor(pressure_config)
|
||||
cg.add(var.set_pressure_sensor(sens))
|
||||
|
|
Loading…
Reference in a new issue