Skip to content

Commit

Permalink
fix the default NOx index offset
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingFeng2021 committed Jun 11, 2024
1 parent 7dc07c5 commit 7131592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esphome/components/sen5x/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
): cv.int_range(0, 3000),
cv.Optional(CONF_STD_INITIAL, default=50): cv.int_,
cv.Optional(CONF_GAIN_FACTOR, default=230): cv.int_range(1, 1000),
cv.Optional(CONF_INDEX_OFFSET_NOX, default=1): cv.int_range(1, 250),
}
)
}
Expand Down Expand Up @@ -219,7 +220,7 @@ async def to_code(config):
cfg = config[CONF_NOX][CONF_ALGORITHM_TUNING]
cg.add(
var.set_nox_algorithm_tuning(
cfg[CONF_INDEX_OFFSET],
cfg[CONF_INDEX_OFFSET_NOX],
cfg[CONF_LEARNING_TIME_OFFSET_HOURS],
cfg[CONF_LEARNING_TIME_GAIN_HOURS],
cfg[CONF_GATING_MAX_DURATION_MINUTES],
Expand Down

0 comments on commit 7131592

Please sign in to comment.