diff --git a/esphome/components/tuya/select/__init__.py b/esphome/components/tuya/select/__init__.py index e5b2e36ce7..9f2b6f1e12 100644 --- a/esphome/components/tuya/select/__init__.py +++ b/esphome/components/tuya/select/__init__.py @@ -54,8 +54,8 @@ async def to_code(config): cg.add(var.set_select_mappings(list(options_map.keys()))) parent = await cg.get_variable(config[CONF_TUYA_ID]) cg.add(var.set_tuya_parent(parent)) - if enum_datapoint := config.get(CONF_ENUM_DATAPOINT, None) is not None: + if (enum_datapoint := config.get(CONF_ENUM_DATAPOINT, None)) is not None: cg.add(var.set_select_id(enum_datapoint, False)) - if int_datapoint := config.get(CONF_INT_DATAPOINT, None) is not None: + if (int_datapoint := config.get(CONF_INT_DATAPOINT, None)) is not None: cg.add(var.set_select_id(int_datapoint, True)) cg.add(var.set_optimistic(config[CONF_OPTIMISTIC]))