mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 05:33:53 +00:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -294,9 +294,8 @@ async def to_code(config):
|
||||
)
|
||||
)
|
||||
|
||||
if get_esp32_variant() == VARIANT_ESP32:
|
||||
if CONF_IIR_FILTER in config:
|
||||
cg.add(touch.set_iir_filter(config[CONF_IIR_FILTER]))
|
||||
if get_esp32_variant() == VARIANT_ESP32 and CONF_IIR_FILTER in config:
|
||||
cg.add(touch.set_iir_filter(config[CONF_IIR_FILTER]))
|
||||
|
||||
if get_esp32_variant() == VARIANT_ESP32S2 or get_esp32_variant() == VARIANT_ESP32S3:
|
||||
if CONF_FILTER_MODE in config:
|
||||
|
||||
Reference in New Issue
Block a user